Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support install target and build without tests #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ option(enable-lazy-lock "Enable lazy locking (only lock when multi-threaded" OFF
option(force_lazy_lock "Forcing lazy-lock to avoid allocator/threading bootstrap issues" OFF)
# install_prefix - installation directory prefix
# with-xslroot=<path> XSL stylesheet root path
option(build-tests "Build tests" OFF)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just use CMake/CTest variable BUILD_TESTING instead of a new option.


set (PACKAGE_NAME "jemalloc")
project (${PACKAGE_NAME} C)
Expand Down Expand Up @@ -825,6 +826,17 @@ if(C_UTIL_INTEGRATION_DEFS)
"${C_UTIL_INTEGRATION_DEFS}")
endif()

install(FILES include/jemalloc/jemalloc${install_suffix}.h
DESTINATION include/jemalloc)

install(TARGETS ${LIBJEMALLOCSO}
EXPORT JemallocTargets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
install(EXPORT JemallocTargets NAMESPACE jemalloc:: DESTINATION share/jemalloc)

if (build-tests)
##################################################################
# Common source for Unit, Integration and stress test libraries
set(C_TESTLIB_SRCS
Expand Down Expand Up @@ -1028,4 +1040,4 @@ foreach(sourcefile ${TESTS_INTEGRATION})
add_test(NAME ${exename} COMMAND ${exename})
add_dependencies(check ${exename})
endforeach(sourcefile ${TESTS_UNIT})

endif()