Skip to content

Commit 51f25b1

Browse files
committed
bin: add compilation and preload helpers
- Clean unneeded files
1 parent 6fd62a4 commit 51f25b1

File tree

7 files changed

+26
-187
lines changed

7 files changed

+26
-187
lines changed

CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ mpc_check_openpa()
5454
message(STATUS "============== SUMMARY ==================")
5555
message(STATUS "CMAKE_BUILD_TYPE : ${CMAKE_BUILD_TYPE}")
5656
print_variable_status("ENABLE_RPATH")
57-
print_variable_status("DISABLE_UNIT_TESTS")
5857
print_variable_status("HWLOC_FOUND")
5958
print_variable_status("OPENPA_FOUND")
6059
message(STATUS "=========================================")
@@ -71,3 +70,12 @@ endif(NOT DISABLE_UNIT_TESTS)
7170
install(FILES include/mpcalloc.h DESTINATION include/)
7271

7372
install(FILES src/sctk_alloc_posix.h src/sctk_alloc_common.h src/sctk_alloc_to_recode.h src/sctk_alloc_on_node.h DESTINATION include/mpcalloc/)
73+
74+
75+
#Compilation Helpers
76+
77+
configure_file(bin/mpcalloc_cflags.in bin/mpcalloc_cflags @ONLY)
78+
configure_file(bin/mpcalloc_ldflags.in bin/mpcalloc_ldflags @ONLY)
79+
configure_file(bin/mpcalloc_preload.in bin/mpcalloc_preload @ONLY)
80+
81+
install(FILES ${CMAKE_BINARY_DIR}/bin/mpcalloc_cflags ${CMAKE_BINARY_DIR}/bin/mpcalloc_ldflags ${CMAKE_BINARY_DIR}/bin/mpcalloc_preload DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)

MPC_Allocator.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

bin/mpcalloc_cflags.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
MPCALLOC_PREFIX=@CMAKE_INSTALL_PREFIX@
4+
5+
echo "-I${MPCALLOC_PREFIX}/include -I${MPCALLOC_PREFIX}/mpcalloc/"

bin/mpcalloc_ldflags.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
MPCALLOC_PREFIX=@CMAKE_INSTALL_PREFIX@
4+
5+
echo "-L${MPCALLOC_PREFIX}/lib -Wl,-rpath ${MPCALLOC_PREFIX}/lib -lmpcalloc"

bin/mpcalloc_preload.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
MPCALLOC_PREFIX=@CMAKE_INSTALL_PREFIX@
4+
5+
export LD_PRELOAD=${MPCALLOC_PREFIX}/lib/libmpcalloc.so
6+
7+
"$@"

config-meta.xml

Lines changed: 0 additions & 56 deletions
This file was deleted.

sys_dep

Lines changed: 0 additions & 109 deletions
This file was deleted.

0 commit comments

Comments
 (0)