From: agrigora Date: Wed, 28 Jan 2015 14:40:46 +0000 (+0100) Subject: CMake: Propagate DATE flags to dictionary generation X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=38cadb359baa5da825f0da60619ccb07d49eb4d6 CMake: Propagate DATE flags to dictionary generation --- diff --git a/ITS/ITSbase/CMakeLists.txt b/ITS/ITSbase/CMakeLists.txt index 67e531a1e96..4db1d782dc7 100644 --- a/ITS/ITSbase/CMakeLists.txt +++ b/ITS/ITSbase/CMakeLists.txt @@ -155,7 +155,7 @@ string(REPLACE ".cxx" ".h" HDRS "${SRCS}") # Generate the dictionary # It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument get_directory_property(incdirs INCLUDE_DIRECTORIES) -generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}") +generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}" "${MODULE_COMPILE_FLAGS}") # Setting the dependencies set(ROOT_DEPENDENCIES Core EG GenVector Geom Gpad Graf3d Graf Gui HistPainter Hist MathCore Matrix Minuit Physics RIO Tree) diff --git a/MONITOR/MONITORzmq/CMakeLists.txt b/MONITOR/MONITORzmq/CMakeLists.txt index 50072cfe884..7c3cd1b7577 100644 --- a/MONITOR/MONITORzmq/CMakeLists.txt +++ b/MONITOR/MONITORzmq/CMakeLists.txt @@ -67,7 +67,7 @@ string(REPLACE ".cxx" ".h" HDRS "${SRCS}") # Generate the dictionary # It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument get_directory_property(incdirs INCLUDE_DIRECTORIES) -generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}") +generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}" "${MODULE_COMPILE_FLAGS}") # Generate the ROOT map # Dependecies diff --git a/RAW/RAWDatarecOnline/CMakeLists.txt b/RAW/RAWDatarecOnline/CMakeLists.txt index 6dd272ee0a0..4f3debec41c 100644 --- a/RAW/RAWDatarecOnline/CMakeLists.txt +++ b/RAW/RAWDatarecOnline/CMakeLists.txt @@ -35,10 +35,19 @@ set(SRCS # Headers from sources string(REPLACE ".cxx" ".h" HDRS "${SRCS}") +# Compile and link flags +set(MODULE_COMPILE_FLAGS) +set(MODULE_LINK_FLAGS) + +if(DATE_FOUND) + set(MODULE_COMPILE_FLAGS "${DATE_CFLAGS}") + set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${DATE_LIBS}") +endif(DATE_FOUND) + # Generate the dictionary # It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument get_directory_property(incdirs INCLUDE_DIRECTORIES) -generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}") +generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}" "${MODULE_COMPILE_FLAGS}") # Setting the dependencies set(ROOT_DEPENDENCIES Core) @@ -61,14 +70,6 @@ target_link_libraries(${MODULE} ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES}) # Public include folders that will be propagated to the dependecies target_include_directories(${MODULE} PUBLIC ${incdirs}) -# Compile and link flags -set(MODULE_COMPILE_FLAGS) -set(MODULE_LINK_FLAGS) - -if(DATE_FOUND) - set(MODULE_COMPILE_FLAGS "${DATE_CFLAGS}") - set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${DATE_LIBS}") -endif(DATE_FOUND) # System dependent: Modify the way the library is build if(${CMAKE_SYSTEM} MATCHES Darwin) diff --git a/TPC/TPCmon/CMakeLists.txt b/TPC/TPCmon/CMakeLists.txt index a157cd71217..1550a1bd460 100644 --- a/TPC/TPCmon/CMakeLists.txt +++ b/TPC/TPCmon/CMakeLists.txt @@ -44,15 +44,19 @@ set(SRCS # Check for DATE if(DATE_FOUND) set(SRCS ${SRCS} AliTPCMonitorDateMonitor.cxx) + + set(MODULE_COMPILE_FLAGS "${DATE_CFLAGS}") + set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${DATE_LIBS}") endif(DATE_FOUND) + # Headers from sources string(REPLACE ".cxx" ".h" HDRS "${SRCS}") # Generate the dictionary # It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument get_directory_property(incdirs INCLUDE_DIRECTORIES) -generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}") +generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}" "${MODULE_COMPILE_FLAGS}") # Generate the ROOT map # Dependecies @@ -63,13 +67,6 @@ generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE} add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx) target_link_libraries(${MODULE} ${LIBDEPS}) -set(MODULE_COMPILE_FLAGS) -set(MODULE_LINK_FLAGS) - -if(DATE_FOUND) - set(MODULE_COMPILE_FLAGS "${DATE_CFLAGS}") - set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${DATE_LIBS}") -endif(DATE_FOUND) # System dependent: Modify the way the library is build if(${CMAKE_SYSTEM} MATCHES Darwin) diff --git a/TRD/TRDbase/CMakeLists.txt b/TRD/TRDbase/CMakeLists.txt index 99af01f4f64..cfd30402825 100644 --- a/TRD/TRDbase/CMakeLists.txt +++ b/TRD/TRDbase/CMakeLists.txt @@ -135,10 +135,22 @@ if(DATE_FOUND) set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${DATE_LIBS} ${DATE_DYNMONLIBS}") endif(DATE_FOUND) +# Check if CRS support was enabled +if(TRD_RAW_CRC) + message(STATUS "CRC support for AliTRDrawStream enabled") + set(MODULE_COMPILE_FLAGS "-DTRD_RAW_CRC ${MODULE_COMPILE_FLAGS}") +endif(TRD_RAW_CRC) + +# Check if RAW debug enabled +if(TRD_RAW_DEBUG) + message(STATUS "Debug support for AliTRDrawStream enabled") + set(MODULE_COMPILE_FLAGS "-DTRD_RAW_DEBUG ${MODULE_COMPILE_FLAGS}") +endif(TRD_RAW_DEBUG) + # Generate the dictionary # It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument get_directory_property(incdirs INCLUDE_DIRECTORIES) -generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}") +generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}" "${MODULE_COMPILE_FLAGS}") set(ROOT_DEPENDENCIES Core GenVector Geom Gpad Graf Gui Hist MathCore Matrix Minuit Net RIO Tree VMC XMLParser) set(ALIROOT_DEPENDENCIES STEERBase STEER ESD CDB RAWDatabase RAWDatarec) @@ -167,17 +179,6 @@ if(${CMAKE_SYSTEM} MATCHES Darwin) set(MODULE_LINK_FLAGS "-undefined dynamic_lookup ${MODULE_LINK_FLAGS}") endif(${CMAKE_SYSTEM} MATCHES Darwin) -# Check if CRS support was enabled -if(TRD_RAW_CRC) - message(STATUS "CRC support for AliTRDrawStream enabled") - add_definitions(-DTRD_RAW_CRC) -endif(TRD_RAW_CRC) - -# Check if RAW debug enabled -if(TRD_RAW_DEBUG) - message(STATUS "Debug support for AliTRDrawStream enabled") - add_definitions(-DTRD_RAW_DEBUG) -endif(TRD_RAW_DEBUG) # Setting the correct headers for the object as gathered from the dependencies # Additional compilation flags