-
Administrator authored
Add support for C++17 Check for c++ version c++11 or above (11, 14 or 17). With this change it becomes possible to compile CbmRoot with C++17. Add missing library. The FairMQ state machine is now in an extra library which has to be added for linking when using FairSoft nov20. Test if the library exist and create the list of dependencies accordingly. Add missing include directory. VMC is not any longer included in ROOT but a standealone package, so the include directory has to be added such that the header files are found. Add gtest as an optional external package. With the latest version of FairSoft googletest was removed due to a recommendation of the gtest developers. Since gtest is no longer part of FairSoft we have to provide an own version which is compiled as external project. Add proper dependency to external gtest project This dependency is needed to compile the test only if the gtest library is already available. Fix compilation error with FairRoot v18.4.2 on macosx In FairRoot v18.4.2 some linker settings were removed from the CMake setup. This breaks the compilation of CbmRoot. Put back the needed seetings for the linker on macosx in our build system. Fix NicaFemto installation
Administrator authoredAdd support for C++17 Check for c++ version c++11 or above (11, 14 or 17). With this change it becomes possible to compile CbmRoot with C++17. Add missing library. The FairMQ state machine is now in an extra library which has to be added for linking when using FairSoft nov20. Test if the library exist and create the list of dependencies accordingly. Add missing include directory. VMC is not any longer included in ROOT but a standealone package, so the include directory has to be added such that the header files are found. Add gtest as an optional external package. With the latest version of FairSoft googletest was removed due to a recommendation of the gtest developers. Since gtest is no longer part of FairSoft we have to provide an own version which is compiled as external project. Add proper dependency to external gtest project This dependency is needed to compile the test only if the gtest library is already available. Fix compilation error with FairRoot v18.4.2 on macosx In FairRoot v18.4.2 some linker settings were removed from the CMake setup. This breaks the compilation of CbmRoot. Put back the needed seetings for the linker on macosx in our build system. Fix NicaFemto installation
NicaFemto.patch 1.08 KiB
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 60ab7e6..b70ab36 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,7 +52,11 @@ if(NOT DEFINED NICAFEMTO_SUBDIR_BUILD)
If(NOT _HAS_CXX11_FLAG)
Message(FATAL_ERROR "The used C++ compiler (${CMAKE_CXX_COMPILER}) does not support C++11. NicaFemto can only be compiled with compilers supporting C++11. Please install such an compiler.")
EndIf()
-
+
+ if(APPLE)
+ SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -single_module -undefined dynamic_lookup")
+ endif()
+
Execute_process(COMMAND $ENV{SIMPATH}/bin/fairsoft-config --cxxflags OUTPUT_VARIABLE _res_fairsoft_config OUTPUT_STRIP_TRAILING_WHITESPACE)
String(FIND ${_res_fairsoft_config} "-std=c++11" POS_C++11)
If(${POS_C++11} EQUAL -1)
@@ -131,7 +135,7 @@ if(NOT DEFINED NICAFEMTO_SUBDIR_BUILD)
if(APPLE)
set(GSL_DIR /usr/local)
else()
- unset(GSL_DIR)
+ set(GSL_DIR /usr)
endif()
find_package(GSL REQUIRED)
endif()