Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[skip-ci] [build] Use hsimple.root file from tutorials directory #1139

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 13 additions & 32 deletions root/tree/cloning/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,38 +68,19 @@ else()
set(ROOT_DIR ${ROOT_SOURCE_DIR})
endif()

if(NOT TARGET hsimple)
add_custom_target(hsimple-file ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/hsimple.root)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/hsimple.root
COMMAND ${ROOT_root_CMD} -q -l -b ${ROOT_TUTORIALS_DIR}/hsimple.C -e "{ TFile f(\"hsimple.root\"); TTree *ntuple; f.GetObject(\"ntuple\",ntuple); return ntuple ? 0 : 1; }" > hsimple.log
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${HSimpleDependencies}
VERBATIM)
add_custom_command(
TARGET hsimple-file
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_BINARY_DIR}/hsimple.root
hsimple1.root
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_BINARY_DIR}/hsimple.root
hsimple2.root)
else()
add_custom_target(hsimple-file ALL DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/hsimple1.root
${CMAKE_CURRENT_BINARY_DIR}/hsimple2.root
)
set(HSimpleDependencies "hsimple")
add_dependencies(hsimple-file ${HSimpleDependencies})
add_custom_command(OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/hsimple1.root
${CMAKE_CURRENT_BINARY_DIR}/hsimple2.root
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_BINARY_DIR}/tutorials/hsimple.root
hsimple1.root
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_BINARY_DIR}/tutorials/hsimple.root
hsimple2.root)
endif()
add_custom_target(hsimple-file ALL DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/hsimple1.root
${CMAKE_CURRENT_BINARY_DIR}/hsimple2.root
)
add_custom_command(OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/hsimple1.root
${CMAKE_CURRENT_BINARY_DIR}/hsimple2.root
COMMAND ${CMAKE_COMMAND} -E copy
${ROOT_TUTORIALS_DIR}/hsimple.root
${CMAKE_CURRENT_BINARY_DIR}/hsimple1.root
COMMAND ${CMAKE_COMMAND} -E copy
${ROOT_TUTORIALS_DIR}/hsimple.root
${CMAKE_CURRENT_BINARY_DIR}/hsimple2.root)

ROOTTEST_ADD_TEST(runtreeCloneTest2
MACRO runtreeCloneTest2.C
Expand Down