diff --git a/cint/ROOT/CMakeLists.txt b/cint/ROOT/CMakeLists.txt index 7c36dbdaffc0d1a1be0fd271ed3f9396ce475340..fc4acf791b3196f5361f9dc43f831438db8991f5 100644 --- a/cint/ROOT/CMakeLists.txt +++ b/cint/ROOT/CMakeLists.txt @@ -95,7 +95,7 @@ foreach(_name ${CINTSTLDLLNAMES}) add_Custom_Command(OUTPUT ${OutFileName} COMMAND cint_tmp -w1 -z${_name} -n${OutFileName} ${AdditionalFlags} -D__MAKECINT__ -DG__MAKECINT ${IncludeDirs} -c-1 -A -Z0 ${InFileName} ${AdditionalHeaderFiles} WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - DEPENDS cint_tmp + DEPENDS ${CINTDEP} ) list(FIND CINTBUILDLOADER ${_name} _position) @@ -119,7 +119,20 @@ foreach(_name ${CINTSTLDLLNAMES}) endif() set(linkdeffile "${CMAKE_SOURCE_DIR}/core/metautils/src/${_name}Linkdef.h") - ROOT_GENERATE_DICTIONARY( ${Dictionary} ${_name1} LINKDEF ${linkdeffile}) + #ROOT_GENERATE_DICTIONARY( ${Dictionary} ${_name1} LINKDEF ${linkdeffile}) + add_custom_command(OUTPUT ${Dictionary}.cxx ${Dictionary}.h + COMMAND rootcint_tmp -cint -f ${Dictionary}.cxx -c + -I${CMAKE_CURRENT_SOURCE_DIR}/inc + -I${CMAKE_BINARY_DIR}/include + -I${CMAKE_SOURCE_DIR}/cint/cint/include + -I${CMAKE_SOURCE_DIR}/cint/cint/stl + -I${CMAKE_SOURCE_DIR}/cint/cint/lib + -I${CMAKE_SOURCE_DIR}/core/base/inc + -I${CMAKE_SOURCE_DIR}/core/meta/inc + -I${CMAKE_SOURCE_DIR}/core/clib/inc + ${_name1} ${linkdeffile} + DEPENDS ${linkdeffile} ${ROOTCINTDEP}) + set_source_files_properties(${Dictionary}.cxx COMPILE_FLAGS "${CINTDLLCXXFLAGS} -DG__CINTBODY -I${HEADER_OUTPUT_PATH}" ) @@ -161,7 +174,7 @@ foreach(_name ${CINTINCDLLNAMES}) add_custom_command(OUTPUT ${OutFileName} COMMAND cint_tmp -K -w1 -z${_name} -n${OutFileName} -D__MAKECINT__ -DG__MAKECINT ${IncludeDirs} -c-2 -Z0 ${InFileName} ${AdditionalHeaderFiles} WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - DEPENDS cint_tmp + DEPENDS ${CINTDEP} ) set_source_files_properties(${OutFileName} @@ -178,7 +191,7 @@ foreach(_name ${CINTINCDLLNAMES}) add_custom_command(OUTPUT ${OutFileName} COMMAND cint_tmp -K -w1 -z${_name} -n${OutFileName} -D__MAKECINT__ -DG__MAKECINT ${IncludeDirs} -c-2 -Z0 ${InFileName} ${AdditionalHeaderFiles} WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - DEPENDS ${CMAKE_BINARY_DIR}/cint/cint/include/sys/types.h cint_tmp + DEPENDS ${CMAKE_BINARY_DIR}/cint/cint/include/sys/types.h ${CINTDEP} ) set_source_files_properties(${OutFileName} @@ -216,7 +229,7 @@ foreach(_name ${CINTINCDLLNAMES}) add_custom_command(OUTPUT ${OutFileName} COMMAND cint_tmp -K -w1 -z${_name} -n${OutFileName} -D__MAKECINT__ -DG__MAKECINT ${_ExtraFlag} -c-2 -Z0 ${InFileName} ${AdditionalHeaderFiles} ${CMAKE_BINARY_DIR}/cint/cint/include/sys/types.h ${CMAKE_SOURCE_DIR}/cint/cint/lib/posix/posix.h WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - DEPENDS ${CMAKE_BINARY_DIR}/cint/cint/include/sys/types.h cint_tmp + DEPENDS ${CMAKE_BINARY_DIR}/cint/cint/include/sys/types.h ${CINTDEP} ) set_source_files_properties(${OutFileName} COMPILE_FLAGS "${CINT_C_DEFINITIONS} -DG__HAVE_CONFIG -DG__NOMAKEINFO -I${CMAKE_SOURCE_DIR}/cint/cint/inc -I${CMAKE_SOURCE_DIR}/cint/cint/src -I${CMAKE_SOURCE_DIR}/cint/cint/src/dict -DG__SYSTYPES_H" diff --git a/cint/cint/CMakeLists.txt b/cint/cint/CMakeLists.txt index fe87ec8a7c82664deb2e791a18e2361a7586b5b7..452082e3286889d97a93a7247e84fa10b24392ef 100644 --- a/cint/cint/CMakeLists.txt +++ b/cint/cint/CMakeLists.txt @@ -79,7 +79,7 @@ else() COMMAND cint_tmp -I${CMAKE_CURRENT_SOURCE_DIR}/include -I${CMAKE_CURRENT_SOURCE_DIR}/stl -I${CMAKE_CURRENT_SOURCE_DIR}/lib -I${HEADER_OUTPUT_PATH} ${PROJECT_SOURCE_DIR}/cint/iosenum/iosenum.cxx - DEPENDS cint_tmp + DEPENDS ${CINTDEP} ) endif() @@ -138,6 +138,9 @@ ROOT_EXECUTABLE(cint.exe ${CMAKE_CURRENT_SOURCE_DIR}/main/cppmain.cxx LIBRARIES ROOT_EXECUTABLE(cint_tmp ${CMAKE_CURRENT_SOURCE_DIR}/main/cppmain.cxx ${CMAKE_CURRENT_BINARY_DIR}/loadfile_tmp.cxx LIBRARIES Cint_static ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS}) +#---Trick to avoid building all dictionaties when CINT is changed------------------------------------------- +add_custom_target(CINTTARGET DEPENDS cint_tmp) + #---Create the makecint executable-------------------------------------------------------------------------- ROOT_EXECUTABLE(makecint ${CMAKE_SOURCE_DIR}/cint/tool/makecint.cxx LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) diff --git a/cmake/modules/RootNewMacros.cmake b/cmake/modules/RootNewMacros.cmake index 0c3854da5b8adfbe37ad4fc7f4069d1fb062ec0d..8b777e0c1184ae6a631c09ec7e23468f41cf87d2 100644 --- a/cmake/modules/RootNewMacros.cmake +++ b/cmake/modules/RootNewMacros.cmake @@ -63,6 +63,9 @@ else() endif() set(rlibmap_cmd rlibmap) endif() +#---Dictionary dependencies to ${CMAKE_SOURCE_DIR}/cint/cint/inc/cintdictversion.h and rootcint executable +set(ROOTCINTDEP ${CMAKE_SOURCE_DIR}/cint/cint/inc/cintdictversion.h ROOTCINTTARGET) +set(CINTDEP ${CMAKE_SOURCE_DIR}/cint/cint/inc/cintdictversion.h CINTTARGET) set(CMAKE_VERBOSE_MAKEFILES OFF) set(CMAKE_INCLUDE_CURRENT_DIR OFF) @@ -210,7 +213,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary) add_custom_command(OUTPUT ${dictionary}.cxx ${dictionary}.h COMMAND ${rootcint_cmd} -cint -f ${dictionary}.cxx -c ${ARG_OPTIONS} ${definitions} ${includedirs} ${rheaderfiles} ${_linkdef} - DEPENDS ${headerfiles} ${_linkdef} rootcint) + DEPENDS ${headerfiles} ${_linkdef} ${ROOTCINTDEP}) endfunction() diff --git a/core/utils/CMakeLists.txt b/core/utils/CMakeLists.txt index 8352212e0007cfb95395bf410bd4e516778e776a..e57dc746157d842b5e696ab156404968b5d15529 100644 --- a/core/utils/CMakeLists.txt +++ b/core/utils/CMakeLists.txt @@ -29,6 +29,9 @@ ROOT_EXECUTABLE(rootcint_tmp rootcint_tmp.cxx RStl_tmp.cxx loadfile_tmp.cxx LIBRARIES Cint_static ${CMAKE_DL_LIBS}) add_dependencies(rootcint_tmp IOSENUM_H) +#---Trick to avoid building all dictionaties when CINT is changed------------- +add_custom_target(ROOTCINTTARGET DEPENDS rootcint rootcint_tmp) + #---rlibmap executable-------------------------------------------------------- ROOT_EXECUTABLE(rlibmap rlibmap.cxx LIBRARIES ${CMAKE_THREAD_LIBS_INIT})