From 2bcdc41f5f5b99a8161f9cf9c0faa98ca19ef27f Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de> Date: Fri, 3 Jul 2020 23:03:10 +0200 Subject: [PATCH] Note on static linkage of RootMinimizer --- ThirdParty/Fit/RootMinimizers/CMakeLists.txt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ThirdParty/Fit/RootMinimizers/CMakeLists.txt b/ThirdParty/Fit/RootMinimizers/CMakeLists.txt index da4fd5b621f..adc75d51dac 100644 --- a/ThirdParty/Fit/RootMinimizers/CMakeLists.txt +++ b/ThirdParty/Fit/RootMinimizers/CMakeLists.txt @@ -1,9 +1,5 @@ -############################################################################ -# CMakeLists.txt file for building libRootMinimizers package -############################################################################ set(library_name RootMinimizers) -# --- source and include files --------- set(include_dirs ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/base @@ -19,7 +15,6 @@ file(GLOB source_files "base/*.cxx" ) -# --- definitions --------- add_definitions(-DWARNINGMSG) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMATH_NO_PLUGIN_MANAGER -DHAS_MINUIT2 -DR__HAS_MATHMORE") if(NOT WIN32) @@ -28,12 +23,16 @@ else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4267") endif() -# --- making library ------------ add_library(${library_name} STATIC ${source_files}) +# For the time being, it has to be STATIC +# because we don't have a DLL for the GSL library yet. +# (at least not up to date and from reliable source +# TODO: try https://www.nuget.org/packages/gsl-msvc14-x64) +# The ROOT code in directory mathcore depends on GSL. + set(${library_name}_INCLUDE_DIRS ${include_dirs} CACHE INTERNAL "") set(${library_name}_LIBRARY ${library_name} CACHE INTERNAL "") -# --- external dependencies --- target_include_directories(${library_name} PUBLIC ${GSL_INCLUDE_DIR} ${Boost_INCLUDE_DIRS}) target_link_libraries(${library_name} ${GSL_LIBRARIES} ${Boost_LIBRARIES}) target_include_directories(${library_name} PUBLIC ${include_dirs}) -- GitLab