Strip query modules in release build
Reviewers: teon.banek Reviewed By: teon.banek Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D2599
This commit is contained in:
parent
dda74e0554
commit
e9f55e2f31
@ -12,6 +12,15 @@ set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "query_modules")
|
||||
add_library(example SHARED example.c)
|
||||
target_include_directories(example PRIVATE ${CMAKE_SOURCE_DIR}/include)
|
||||
target_compile_options(example PRIVATE -Wall)
|
||||
|
||||
# Strip the library in release build.
|
||||
string(TOLOWER ${CMAKE_BUILD_TYPE} lower_build_type)
|
||||
if (lower_build_type STREQUAL "release")
|
||||
add_custom_command(TARGET example POST_BUILD
|
||||
COMMAND strip -s $<TARGET_FILE:example>
|
||||
COMMENT "Stripping symbols and sections from example module")
|
||||
endif()
|
||||
|
||||
install(PROGRAMS $<TARGET_FILE:example>
|
||||
DESTINATION lib/memgraph/query_modules
|
||||
RENAME example.so)
|
||||
|
@ -5,6 +5,14 @@ include_directories(src)
|
||||
add_library(connectivity SHARED ${MODULE})
|
||||
target_include_directories(connectivity PRIVATE ${CMAKE_SOURCE_DIR}/include)
|
||||
|
||||
# Strip the library in release build.
|
||||
string(TOLOWER ${CMAKE_BUILD_TYPE} lower_build_type)
|
||||
if (lower_build_type STREQUAL "release")
|
||||
add_custom_command(TARGET connectivity POST_BUILD
|
||||
COMMAND strip -s $<TARGET_FILE:connectivity>
|
||||
COMMENT "Stripping symbols and sections from connectivity module")
|
||||
endif()
|
||||
|
||||
install(PROGRAMS $<TARGET_FILE:connectivity>
|
||||
DESTINATION lib/memgraph/query_modules
|
||||
RENAME connectivity.so)
|
||||
|
@ -18,6 +18,14 @@ add_library(louvain SHARED ${MODULE})
|
||||
target_link_libraries(louvain louvain-core)
|
||||
target_include_directories(louvain PRIVATE ${CMAKE_SOURCE_DIR}/include)
|
||||
|
||||
# Strip the library in release build.
|
||||
string(TOLOWER ${CMAKE_BUILD_TYPE} lower_build_type)
|
||||
if (lower_build_type STREQUAL "release")
|
||||
add_custom_command(TARGET louvain POST_BUILD
|
||||
COMMAND strip -s $<TARGET_FILE:louvain>
|
||||
COMMENT "Stripping symbols and sections from louvain module")
|
||||
endif()
|
||||
|
||||
if (NOT MG_COMMUNITY)
|
||||
install(PROGRAMS $<TARGET_FILE:louvain>
|
||||
DESTINATION lib/memgraph/query_modules
|
||||
|
@ -25,10 +25,10 @@ string(TOLOWER ${CMAKE_BUILD_TYPE} lower_build_type)
|
||||
if (lower_build_type STREQUAL "release")
|
||||
add_custom_command(TARGET mg_import_csv POST_BUILD
|
||||
COMMAND strip -s mg_import_csv
|
||||
COMMENT Stripping symbols and sections from mg_import_csv)
|
||||
COMMENT "Stripping symbols and sections from mg_import_csv")
|
||||
add_custom_command(TARGET mg_client POST_BUILD
|
||||
COMMAND strip -s mg_client
|
||||
COMMENT Stripping symbols and sections from mg_client)
|
||||
COMMENT "Stripping symbols and sections from mg_client")
|
||||
endif()
|
||||
|
||||
# TODO (mferencevic): Currently the `mg_import_csv` tool is tailored to the old
|
||||
|
Loading…
Reference in New Issue
Block a user