changeset 4967:6119ecbd4462

pass user-specific compiler flags to the unit tests of the shared library
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 26 Mar 2022 09:31:54 +0100
parents ee6d7937a6cf
children 1b6b88f017b9
files OrthancFramework/SharedLibrary/CMakeLists.txt
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/SharedLibrary/CMakeLists.txt	Sat Mar 26 09:23:49 2022 +0100
+++ b/OrthancFramework/SharedLibrary/CMakeLists.txt	Sat Mar 26 09:31:54 2022 +0100
@@ -526,6 +526,11 @@
     -DUNIT_TESTS_WITH_HTTP_CONNEXIONS:BOOL=${UNIT_TESTS_WITH_HTTP_CONNEXIONS}
     -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE:BOOL=${USE_GOOGLE_TEST_DEBIAN_PACKAGE}
     -DUSE_SYSTEM_GOOGLE_TEST:BOOL=${USE_SYSTEM_GOOGLE_TEST}
+
+    -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+    -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
+    -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+    -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
     )
 
   add_dependencies(UnitTests OrthancFramework)