diff --git a/cmake/modules/RootNewMacros.cmake b/cmake/modules/RootNewMacros.cmake index 37c0f1a9b59fc8f795ee49097d886ebf93fd2616..629487a6b62929dee876ae74985686d41ecd3729 100644 --- a/cmake/modules/RootNewMacros.cmake +++ b/cmake/modules/RootNewMacros.cmake @@ -207,10 +207,11 @@ endmacro() #--------------------------------------------------------------------------------------------------- #---ROOT_GENERATE_DICTIONARY( dictionary headerfiles MODULE module DEPENDENCIES dep1 dep2 +# BUILTINS dep1 dep2 # STAGE1 LINKDEF linkdef OPTIONS opt1 opt2 ...) #--------------------------------------------------------------------------------------------------- function(ROOT_GENERATE_DICTIONARY dictionary) - CMAKE_PARSE_ARGUMENTS(ARG "STAGE1;MULTIDICT;NOINSTALL" "MODULE" "LINKDEF;OPTIONS;DEPENDENCIES" ${ARGN}) + CMAKE_PARSE_ARGUMENTS(ARG "STAGE1;MULTIDICT;NOINSTALL" "MODULE" "LINKDEF;OPTIONS;DEPENDENCIES;BUILTINS" ${ARGN}) # Check if OPTIONS start with a dash. if (ARG_OPTIONS) @@ -404,6 +405,14 @@ function(ROOT_GENERATE_DICTIONARY dictionary) DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) endif() endif() + + if(ARG_BUILTINS) + foreach(arg1 ${ARG_BUILTINS}) + if(${arg1}_TARGET) + add_dependencies(${dictname} ${${arg1}_TARGET}) + endif() + endforeach() + endif() # FIXME: Support mulptiple dictionaries. In some cases (libSMatrix and # libGenVector) we have to have two or more dictionaries (eg. for math, # we need the two for double vs Double32_t template specializations). diff --git a/core/imt/CMakeLists.txt b/core/imt/CMakeLists.txt index 9d2743fe15b530ee3deffc88ea97980b8cbf7220..394af0d0fcfa04015400b926e7ee82cca46479ec 100644 --- a/core/imt/CMakeLists.txt +++ b/core/imt/CMakeLists.txt @@ -6,7 +6,7 @@ set(sources base.cxx) if (imt) set(headers ROOT/TPoolManager.hxx ROOT/TThreadExecutor.hxx) - ROOT_GENERATE_DICTIONARY(G__Imt ${headers} STAGE1 MODULE Imt LINKDEF LinkDef.h DEPENDENCIES Core Thread) # For auto{loading,parsing} + ROOT_GENERATE_DICTIONARY(G__Imt ${headers} STAGE1 MODULE Imt LINKDEF LinkDef.h DEPENDENCIES Core Thread BUILTINS TBB) # For auto{loading,parsing} set(sources ${sources} TImplicitMT.cxx TThreadExecutor.cxx TPoolManager.cxx G__Imt.cxx) endif() diff --git a/graf2d/asimage/CMakeLists.txt b/graf2d/asimage/CMakeLists.txt index c70c3b0e6aaf3cd6c25d748ce5f963fe2a7e29db..95965c736e9a079ec1914d7d0498aa50c6c58216 100644 --- a/graf2d/asimage/CMakeLists.txt +++ b/graf2d/asimage/CMakeLists.txt @@ -10,7 +10,7 @@ endif() #---Build ASImage/ASImageGui libraries--------------------------------------- include_directories(${FREETYPE_INCLUDE_DIRS} ${AFTERIMAGE_INCLUDE_DIR} ${X11_INCLUDE_DIR}) -ROOT_GENERATE_DICTIONARY(G__ASImage TASImage.h TASImagePlugin.h TASPluginGS.h MODULE ASImage LINKDEF LinkDef.h OPTIONS "-writeEmptyRootPCM" DEPENDENCIES Graf) +ROOT_GENERATE_DICTIONARY(G__ASImage TASImage.h TASImagePlugin.h TASPluginGS.h MODULE ASImage LINKDEF LinkDef.h OPTIONS "-writeEmptyRootPCM" DEPENDENCIES Graf BUILTINS AFTERIMAGE) ROOT_LINKER_LIBRARY(ASImage TASImage.cxx TASPluginGS.cxx G__ASImage.cxx LIBRARIES Core ${AFTERIMAGE_LIBRARIES} ${FREETYPE_LIBRARIES} ${ASEXTRA_LIBRARIES} ${X11_LIBRARIES} diff --git a/graf2d/fitsio/CMakeLists.txt b/graf2d/fitsio/CMakeLists.txt index cdb854b23ca5c20b773b0cdd85489aa12904d545..bb0cfeb334a8db7323cc1adcf5cc6ff81b100ced 100644 --- a/graf2d/fitsio/CMakeLists.txt +++ b/graf2d/fitsio/CMakeLists.txt @@ -5,7 +5,7 @@ include_directories(${CFITSIO_INCLUDE_DIR}) -ROOT_GENERATE_DICTIONARY(G__FITSIO *.h MODULE FITSIO LINKDEF LinkDef.h OPTIONS "-writeEmptyRootPCM" DEPENDENCIES Hist Gpad Graf) +ROOT_GENERATE_DICTIONARY(G__FITSIO *.h MODULE FITSIO LINKDEF LinkDef.h OPTIONS "-writeEmptyRootPCM" DEPENDENCIES Hist Gpad Graf BUILTINS CFITSIO) ROOT_LINKER_LIBRARY(FITSIO *.cxx G__FITSIO.cxx LIBRARIES ${CFITSIO_LIBRARIES} DEPENDENCIES Hist Gpad Graf Matrix BUILTINS CFITSIO) diff --git a/graf2d/graf/CMakeLists.txt b/graf2d/graf/CMakeLists.txt index 82a5305d660dcd1070c3a377c9d5ca585063f64f..725c015d02891dc2367ab897caac2b780ca74a6a 100644 --- a/graf2d/graf/CMakeLists.txt +++ b/graf2d/graf/CMakeLists.txt @@ -3,7 +3,7 @@ # @author Pere Mato, CERN ############################################################################ -ROOT_GENERATE_DICTIONARY(G__Graf MODULE Graf *.h LINKDEF LinkDef.h OPTIONS "-writeEmptyRootPCM" DEPENDENCIES Hist Matrix MathCore RIO) +ROOT_GENERATE_DICTIONARY(G__Graf MODULE Graf *.h LINKDEF LinkDef.h OPTIONS "-writeEmptyRootPCM" DEPENDENCIES Hist Matrix MathCore RIO BUILTINS FREETYPE) include_directories(${FREETYPE_INCLUDE_DIRS}) diff --git a/math/fftw/CMakeLists.txt b/math/fftw/CMakeLists.txt index 711a8b4ec488cc6d10c69bac86d0af46713dc7f1..f4113c42fe3d74a1e764ec2ab654558823a89e37 100644 --- a/math/fftw/CMakeLists.txt +++ b/math/fftw/CMakeLists.txt @@ -5,7 +5,7 @@ include_directories(${FFTW_INCLUDE_DIR}) -ROOT_GENERATE_DICTIONARY(G__FFTW *.h MODULE FFTW LINKDEF LinkDef.h DEPENDENCIES Core) +ROOT_GENERATE_DICTIONARY(G__FFTW *.h MODULE FFTW LINKDEF LinkDef.h DEPENDENCIES Core BUILTINS FFTW3) ROOT_LINKER_LIBRARY(FFTW *.cxx G__FFTW.cxx LIBRARIES Core ${FFTW_LIBRARIES} BUILTINS FFTW3) diff --git a/math/mathcore/CMakeLists.txt b/math/mathcore/CMakeLists.txt index c25807de19e95ca972fb0c237bdb4653c1626cd5..4683204e8c13c6e330219a21cb64d0f2df199253 100644 --- a/math/mathcore/CMakeLists.txt +++ b/math/mathcore/CMakeLists.txt @@ -17,7 +17,12 @@ set(MATHCORE_HEADERS TRandom.h Math/MersenneTwisterEngine.h Math/MixMaxEngine.h TRandomGen.h Math/LCGEngine.h ) -ROOT_GENERATE_DICTIONARY(G__MathCore TComplex.h TMath.h ${MATHCORE_HEADERS} Fit/*.h MODULE MathCore LINKDEF LinkDef.h OPTIONS "-writeEmptyRootPCM" DEPENDENCIES Core Imt) +if(veccore) + set(MATHCORE_LIBRARIES ${VecCore_LIBRARIES}) + set(MATHCORE_BUILTINS VECCORE) +endif() + +ROOT_GENERATE_DICTIONARY(G__MathCore TComplex.h TMath.h ${MATHCORE_HEADERS} Fit/*.h MODULE MathCore LINKDEF LinkDef.h OPTIONS "-writeEmptyRootPCM" DEPENDENCIES Core Imt BUILTINS ${MATHCORE_BUILTINS}) add_definitions(-DUSE_ROOT_ERROR) ROOT_ADD_C_FLAG(_flags -Wno-strict-overflow) # Avoid what it seems a compiler false positive warning @@ -30,11 +35,6 @@ if(imt) set(MATHCORE_DEPENDENCIES Imt) endif() -if(veccore) - set(MATHCORE_LIBRARIES ${VecCore_LIBRARIES}) - set(MATHCORE_BUILTINS VECCORE) -endif() - ROOT_LINKER_LIBRARY(MathCore *.cxx *.c G__MathCore.cxx LIBRARIES ${CMAKE_THREAD_LIBS_INIT} ${MATHCORE_LIBRARIES} DEPENDENCIES Core ${MATHCORE_DEPENDENCIES} BUILTINS ${MATHCORE_BUILTINS}) if(veccore) diff --git a/math/mathmore/CMakeLists.txt b/math/mathmore/CMakeLists.txt index bcc8a05b88277c7216b84de6adfff3b15deeb116..38976d59402943d39ef0a2b7c88269bd0849c750 100644 --- a/math/mathmore/CMakeLists.txt +++ b/math/mathmore/CMakeLists.txt @@ -19,7 +19,7 @@ set(headers Math/DistFuncMathMore.h Math/SpecFuncMathMore.h Math/PdfFuncMathMore Math/VavilovAccurateCdf.h Math/VavilovAccurateQuantile.h Math/VavilovFast.h ) set(linkdefs Math/LinkDef.h Math/LinkDef_Func.h Math/LinkDef_RootFinding.h) -ROOT_GENERATE_DICTIONARY(G__MathMore ${headers} MODULE MathMore LINKDEF Math/LinkDef.h OPTIONS "-writeEmptyRootPCM" DEPENDENCIES MathCore) +ROOT_GENERATE_DICTIONARY(G__MathMore ${headers} MODULE MathMore LINKDEF Math/LinkDef.h OPTIONS "-writeEmptyRootPCM" DEPENDENCIES MathCore BUILTINS GSL) ROOT_LINKER_LIBRARY(MathMore *.cxx G__MathMore.cxx LIBRARIES ${GSL_LIBRARIES} DEPENDENCIES MathCore BUILTINS GSL) diff --git a/net/davix/CMakeLists.txt b/net/davix/CMakeLists.txt index e30991b907e2e9a1a2b975c6f83b10853a007eb5..8409ce56f9efbf9c4017a5ef402eac31302a11ce 100644 --- a/net/davix/CMakeLists.txt +++ b/net/davix/CMakeLists.txt @@ -11,7 +11,7 @@ ROOT_ADD_CXX_FLAG(CMAKE_CXX_FLAGS -Wno-unused-parameter) ROOT_ADD_CXX_FLAG(CMAKE_CXX_FLAGS -Wno-deprecated-declarations) # Davix getAllReplicas -ROOT_GENERATE_DICTIONARY(G__DAVIX *.h MODULE RDAVIX LINKDEF LinkDef.h DEPENDENCIES RIO Net) +ROOT_GENERATE_DICTIONARY(G__DAVIX *.h MODULE RDAVIX LINKDEF LinkDef.h DEPENDENCIES RIO Net BUILTINS DAVIX) ROOT_LINKER_LIBRARY(RDAVIX *.cxx G__DAVIX.cxx LIBRARIES ${DAVIX_LIBRARIES} ${OPENSSL_LIBRARIES} ${LIBXML2_LIBRARIES} ${SYSLIBS} DEPENDENCIES RIO Net BUILTINS DAVIX) diff --git a/net/net/CMakeLists.txt b/net/net/CMakeLists.txt index 4ad3e41f5c9b5ff10d6e55e5b018ae76db5a9002..1632ceb8aaf36471684c1ee1df0becb8928dd374 100644 --- a/net/net/CMakeLists.txt +++ b/net/net/CMakeLists.txt @@ -27,7 +27,7 @@ if(MACOSX_SSL_DEPRECATED) set_source_files_properties(src/TSSLSocket.cxx COMPILE_FLAGS "-Wno-deprecated-declarations" ) endif() -ROOT_GENERATE_DICTIONARY(G__Net ${headers} MODULE Net LINKDEF LinkDef.h OPTIONS "-writeEmptyRootPCM" DEPENDENCIES RIO) +ROOT_GENERATE_DICTIONARY(G__Net ${headers} MODULE Net LINKDEF LinkDef.h OPTIONS "-writeEmptyRootPCM" DEPENDENCIES RIO BUILTINS OPENSSL) ROOT_LINKER_LIBRARY(Net ${sources} G__Net.cxx LIBRARIES ${ssllib} ${CRYPTLIBS} DEPENDENCIES RIO BUILTINS OPENSSL) diff --git a/net/netx/CMakeLists.txt b/net/netx/CMakeLists.txt index a5023d97bf81dd4dc403a074dcdce2d30a6c56cf..fbab60c0adcf1ff21fe85c5bd1c523e9fe54fa68 100644 --- a/net/netx/CMakeLists.txt +++ b/net/netx/CMakeLists.txt @@ -8,7 +8,7 @@ include_directories(${CMAKE_SOURCE_DIR}/proof/proofd/inc) add_definitions(${XROOTD_CFLAGS}) #--------------------------------------------------------------------------- -ROOT_GENERATE_DICTIONARY(G__Netx *.h MODULE Netx LINKDEF LinkDef.h DEPENDENCIES Net RIO Thread) +ROOT_GENERATE_DICTIONARY(G__Netx *.h MODULE Netx LINKDEF LinkDef.h DEPENDENCIES Net RIO Thread BUILTINS XROOTD) ROOT_LINKER_LIBRARY(Netx *.cxx G__Netx.cxx LIBRARIES ${XROOTD_LIBRARIES} DEPENDENCIES Net RIO Thread BUILTINS XROOTD) diff --git a/roofit/histfactory/CMakeLists.txt b/roofit/histfactory/CMakeLists.txt index 5fc204d4cd66b041007cb7291e88a20bffab69b7..0566fa5194c74a00a191f7cad181afb40eda87fc 100644 --- a/roofit/histfactory/CMakeLists.txt +++ b/roofit/histfactory/CMakeLists.txt @@ -3,7 +3,7 @@ # @author Pere Mato, CERN ############################################################################ -ROOT_GENERATE_DICTIONARY(G__HistFactory RooStats/HistFactory/*.h MODULE HistFactory LINKDEF LinkDef.h OPTIONS "-writeEmptyRootPCM") +ROOT_GENERATE_DICTIONARY(G__HistFactory RooStats/HistFactory/*.h MODULE HistFactory LINKDEF LinkDef.h OPTIONS "-writeEmptyRootPCM" BUILTINS GSL) ROOT_GLOB_SOURCES(sources src/*.cxx)