Skip to content
Snippets Groups Projects
Commit 3d62e176 authored by Pere Mato Vila's avatar Pere Mato Vila
Browse files

Use a stamp file control copying files (avoids unneeded actions when using...

Use a stamp file control copying files (avoids unneeded actions when using Ninja). Test stressGoFTest requires mathmore.
parent 654dfd59
No related branches found
No related tags found
No related merge requests found
......@@ -65,13 +65,18 @@ foreach(var ${variables})
endforeach()
#---Move (copy) the headers and other directories to binary tree---------------------------------
add_custom_target(move_headers COMMAND ${CMAKE_COMMAND} -DPREFIX=${CMAKE_BINARY_DIR} -DCOMPONENTS="headers"
-P ${CMAKE_SOURCE_DIR}/cmake/scripts/local_install.cmake
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/etc ${CMAKE_BINARY_DIR}/etc
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/icons ${CMAKE_BINARY_DIR}/icons
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/fonts ${CMAKE_BINARY_DIR}/fonts
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/macros ${CMAKE_BINARY_DIR}/macros
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/tutorials ${CMAKE_BINARY_DIR}/tutorials)
set(stamp_file ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/move_headers.stamp)
add_custom_command(OUTPUT ${stamp_file}
COMMAND ${CMAKE_COMMAND} -DPREFIX=${CMAKE_BINARY_DIR} -DCOMPONENTS="headers"
-P ${CMAKE_SOURCE_DIR}/cmake/scripts/local_install.cmake
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/etc ${CMAKE_BINARY_DIR}/etc
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/icons ${CMAKE_BINARY_DIR}/icons
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/fonts ${CMAKE_BINARY_DIR}/fonts
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/macros ${CMAKE_BINARY_DIR}/macros
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/tutorials ${CMAKE_BINARY_DIR}/tutorials
COMMAND ${CMAKE_COMMAND} -E touch ${stamp_file}
COMMENT "Moving headers and other directorties such as etc, icons, fonts,...")
add_custom_target(move_headers DEPENDS ${stamp_file})
#---Recurse into the given subdirectories. This does not actually cause another cmake executable
# to run. The same process will walk through the project's entire directory structure.
......
......@@ -71,8 +71,9 @@ set_source_files_properties(src/LinkdefReader.cxx PROPERTIES COMPILE_FLAGS -fno-
set_source_files_properties(src/rootclingTCling.cxx PROPERTIES COMPILE_FLAGS -I${CMAKE_SOURCE_DIR}/core/meta/src)
#---Deal with LLVM resource here----------------------------------------------
set(files_to_copy COMMAND cmake -E copy ${CMAKE_BINARY_DIR}/interpreter/llvm/src/include/llvm/Config/llvm-config.h
set(copy_commands COMMAND cmake -E copy ${CMAKE_BINARY_DIR}/interpreter/llvm/src/include/llvm/Config/llvm-config.h
${CMAKE_BINARY_DIR}/etc/cling/llvm/Config/llvm-config.h)
set(files_to_copy ${CMAKE_BINARY_DIR}/interpreter/llvm/src/include/llvm/Config/llvm-config.h)
install(DIRECTORY ${CMAKE_BINARY_DIR}/etc/cling/llvm/Config DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/cling/llvm)
install(DIRECTORY ${CMAKE_BINARY_DIR}/interpreter/llvm/src/lib/clang/${LLVM_VERSION}/include/
......@@ -93,13 +94,15 @@ foreach(file Interpreter/DynamicExprInfo.h
Interpreter/RuntimeUniverse.h
Interpreter/Value.h)
get_filename_component(path ${file} PATH)
list(APPEND files_to_copy COMMAND cmake -E copy ${clinginclude}/cling/${file} ${CMAKE_BINARY_DIR}/etc/cling/${file})
list(APPEND copy_commands COMMAND cmake -E copy ${clinginclude}/cling/${file} ${CMAKE_BINARY_DIR}/etc/cling/${file})
list(APPEND files_to_copy ${clinginclude}/cling/${file})
set_property(GLOBAL APPEND PROPERTY CLINGETCPCH etc/cling/${file})
install(FILES ${clinginclude}/cling/${file} DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/cling/${path})
endforeach()
foreach(file multimap multiset)
list(APPEND files_to_copy COMMAND cmake -E copy ${CMAKE_SOURCE_DIR}/interpreter/cling/include/cling/cint/${file} ${CMAKE_BINARY_DIR}/etc/cling/cint/${file})
list(APPEND copy_commands COMMAND cmake -E copy ${CMAKE_SOURCE_DIR}/interpreter/cling/include/cling/cint/${file} ${CMAKE_BINARY_DIR}/etc/cling/cint/${file})
list(APPEND files_to_copy ${CMAKE_SOURCE_DIR}/interpreter/cling/include/cling/cint/${file})
install(FILES ${CMAKE_SOURCE_DIR}/interpreter/cling/include/cling/cint/${file} DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/cling/cint)
endforeach()
......@@ -120,22 +123,28 @@ foreach( file llvm/ADT/IntrusiveRefCntPtr.h
llvm/Support/type_traits.h )
get_filename_component(path ${file} PATH)
if(EXISTS ${llvminclude}/${file})
list(APPEND files_to_copy COMMAND cmake -E copy ${llvminclude}/${file} ${CMAKE_BINARY_DIR}/etc/cling/${file})
list(APPEND copy_commands COMMAND cmake -E copy ${llvminclude}/${file} ${CMAKE_BINARY_DIR}/etc/cling/${file})
list(APPEND files_to_copy ${llvminclude}/${file})
install(FILES ${llvminclude}/${file} DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/cling/${path})
else()
list(APPEND files_to_copy COMMAND cmake -E copy ${llvminclude-bin}/${file} ${CMAKE_BINARY_DIR}/etc/cling/${file})
list(APPEND copy_commands COMMAND cmake -E copy ${llvminclude-bin}/${file} ${CMAKE_BINARY_DIR}/etc/cling/${file})
list(APPEND files_to_copy ${llvminclude-bin}/${file})
install(FILES ${llvminclude-bin}/${file} DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/cling/${path})
endif()
set_property(GLOBAL APPEND PROPERTY CLINGETCPCH etc/cling/${file})
endforeach()
add_custom_target(LLVMRES COMMAND cmake -E make_directory
${CMAKE_BINARY_DIR}/etc/cling/lib/clang/${LLVM_VERSION}/include
COMMAND cmake -E copy_directory
set(stamp_file ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/LLVMRES.stamp)
add_custom_command(OUTPUT ${stamp_file}
COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/etc/cling/lib/clang/${LLVM_VERSION}/include
COMMAND cmake -E copy_directory
${CMAKE_BINARY_DIR}/interpreter/llvm/src/lib/clang/${LLVM_VERSION}/include
${CMAKE_BINARY_DIR}/etc/cling/lib/clang/${LLVM_VERSION}/include
${files_to_copy}
DEPENDS CLING)
${copy_commands}
COMMAND cmake -E touch ${stamp_file}
DEPENDS ${files_to_copy}
COMMENT "Copying LLVM respurce and header files")
add_custom_target(LLVMRES DEPENDS ${stamp_file} CLING)
#---Trick to avoid building all dictionaties when CINT is changed-------------
......
......@@ -12,7 +12,6 @@ set(TestSource
testSortOrder.cxx
stressTMath.cxx
stressTF1.cxx
stressGoFTest.cxx
testIntegration.cxx
testRootFinder.cxx
testSampleQuantiles.cxx
......@@ -37,12 +36,15 @@ set(TestSource
if(ROOT_roofit_FOUND)
list(APPEND TestSource fit/testRooFit.cxx)
list(APPEND Libraries RooFit)
if(ROOT_mathmore_FOUND)
list(APPEND TestSource fit/testFitPerf.cxx)
endif()
endif()
if(ROOT_mathmore_FOUND)
list(APPEND TestSource fit/testFitPerf.cxx)
list(APPEND TestSource stressGoFTest.cxx)
list(APPEND Libraries MathMore)
endif()
endif()
if(ROOT_minuit2_FOUND)
list(APPEND TestSource fit/testMinim.cxx)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment