# HG changeset patch # User Sebastien Jodogne # Date 1515055778 -3600 # Node ID 591bfe198944f72d65e59956e3bde76fd4d89b0d # Parent d5a717cfa00f93f4418e7a7db0c329a2d4823d62 sync diff -r d5a717cfa00f -r 591bfe198944 CMakeLists.txt --- a/CMakeLists.txt Thu Jan 04 07:40:31 2018 +0100 +++ b/CMakeLists.txt Thu Jan 04 09:49:38 2018 +0100 @@ -38,8 +38,8 @@ set(USE_SYSTEM_UUID ON CACHE BOOL "Use the system version of the uuid library from e2fsprogs") # Distribution-specific settings -set(USE_GTEST_DEBIAN_SOURCE_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)") -mark_as_advanced(USE_GTEST_DEBIAN_SOURCE_PACKAGE) +set(USE_GOOGLE_TEST_DEBIAN_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)") +mark_as_advanced(USE_GOOGLE_TEST_DEBIAN_PACKAGE) set(ORTHANC_ROOT ${CMAKE_SOURCE_DIR}/Orthanc) set(ENABLE_LOCALE OFF) # Disable support for locales (notably in Boost) diff -r d5a717cfa00f -r 591bfe198944 Orthanc/Resources/CMake/Compiler.cmake --- a/Orthanc/Resources/CMake/Compiler.cmake Thu Jan 04 07:40:31 2018 +0100 +++ b/Orthanc/Resources/CMake/Compiler.cmake Thu Jan 04 09:49:38 2018 +0100 @@ -200,7 +200,12 @@ # exist a duplicate object name (e.g. a/Foo.cpp.o, b/Foo.cpp.o), the # resulting static library can end up having only one of the # duplicate objects. [...] This bug only happens if there are many - # objects." https://cmake.org/Bug/view.php?id=14874 + # objects." The trick consists in replacing the "r" argument + # ("replace") provided to "ar" (as used in CMake < 3.1) by the "q" + # argument ("quick append"). This is because of the fact that CMake + # will invoke "ar" several times with several batches of ".o" + # objects, and using "r" would overwrite symbols defined in + # preceding batches. https://cmake.org/Bug/view.php?id=14874 set(CMAKE_CXX_ARCHIVE_APPEND " q ") endif()