diff options
| author | Alexander Karatarakis <alex@karatarakis.com> | 2017-09-21 12:22:00 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-21 12:22:00 -0700 |
| commit | fac96eb344a500405ab65b7e7f3755af0ad00b7e (patch) | |
| tree | f9e3376ca1a8f2de408e087e42ae393f224d6c42 /ports/jemalloc/fix-cmakelists.patch | |
| parent | 46db0f03fcb42d9f738474885fda372160362e44 (diff) | |
| parent | 1bbce1ee844262647f994afd5f31da12d938e7ee (diff) | |
| download | vcpkg-fac96eb344a500405ab65b7e7f3755af0ad00b7e.tar.gz vcpkg-fac96eb344a500405ab65b7e7f3755af0ad00b7e.zip | |
Merge branch 'master' into master
Diffstat (limited to 'ports/jemalloc/fix-cmakelists.patch')
| -rw-r--r-- | ports/jemalloc/fix-cmakelists.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/ports/jemalloc/fix-cmakelists.patch b/ports/jemalloc/fix-cmakelists.patch new file mode 100644 index 000000000..a19cb4050 --- /dev/null +++ b/ports/jemalloc/fix-cmakelists.patch @@ -0,0 +1,67 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 06e83ef..229e17a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -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) + + set (PACKAGE_NAME "jemalloc") + project (${PACKAGE_NAME} C) +@@ -711,12 +712,8 @@ endif() + + # The original library, delivery product + set(LIBJEMALLOCLIB jemalloc${install_suffix}) +-add_library(${LIBJEMALLOCLIB} STATIC ${C_SRCS}) +- +-# Now add shared library. Needed for integration tests +-# and a benchmark +-set(LIBJEMALLOCSO jemallocso${install_suffix}) +-add_library(${LIBJEMALLOCSO} SHARED ${C_SRCS}) ++set(LIBJEMALLOCSO ${LIBJEMALLOCLIB}) ++add_library(${LIBJEMALLOCLIB} ${C_SRCS}) + + if(WIN32) + # May want to replace /d2Zi+ to /Zo +@@ -745,8 +745,6 @@ if(WIN32) + # either impport or export which is both wrong for a static library + set_target_properties(${LIBJEMALLOCLIB} + PROPERTIES +- COMPILE_DEFINITIONS +- "JEMALLOC_EXPORT=" + CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_DEBUG + ${PROJECT_BINARY_DIR}/Debug + CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_RELEASE +@@ -754,6 +752,9 @@ if(WIN32) + COMPILE_PDB_NAME + ${LIBJEMALLOCLIB} + ) ++ if(NOT BUILD_SHARED_LIBS) ++ target_compile_definitions(${LIBJEMALLOCLIB} "JEMALLOC_EXPORT=") ++ endif() + + endif() + +@@ -825,6 +822,14 @@ if(C_UTIL_INTEGRATION_DEFS) + "${C_UTIL_INTEGRATION_DEFS}") + endif() + ++install(FILES include/jemalloc/jemalloc${install_suffix}.h ++ DESTINATION include/jemalloc) ++ ++install(TARGETS ${LIBJEMALLOCSO} ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++if (build-tests) + ################################################################## + # Common source for Unit, Integration and stress test libraries + set(C_TESTLIB_SRCS +@@ -1028,4 +1033,4 @@ foreach(sourcefile ${TESTS_INTEGRATION}) + add_test(NAME ${exename} COMMAND ${exename}) + add_dependencies(check ${exename}) + endforeach(sourcefile ${TESTS_UNIT}) +- ++endif() |
