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

Run hsimple.C macro instead of executable. Fix for ROOT-7878

parent e79321af
No related branches found
No related tags found
No related merge requests found
......@@ -229,16 +229,15 @@ endif(cxxmodules)
if(NOT gnuinstall) # TODO hsimple.root for gnuinstall
add_custom_target(hsimple ALL DEPENDS tutorials/hsimple.root)
add_dependencies(hsimple onepcm)
ROOT_EXECUTABLE(hsimple.exe test/hsimple.cxx NOINSTALL LIBRARIES RIO Tree Hist)
if(WIN32)
add_custom_command(OUTPUT tutorials/hsimple.root
COMMAND set PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} && $<TARGET_FILE:hsimple.exe>
WORKING_DIRECTORY tutorials DEPENDS Cling)
COMMAND set PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} &&
$<TARGET_FILE:root.exe> -l -q -b -n -x hsimple.C -e return
WORKING_DIRECTORY tutorials DEPENDS root.exe Cling)
else()
add_custom_command(OUTPUT tutorials/hsimple.root
COMMAND ${ld_library_path}=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}:$ENV{${ld_library_path}}
$<TARGET_FILE:hsimple.exe>
WORKING_DIRECTORY tutorials DEPENDS Cling)
COMMAND $<TARGET_FILE:root> -l -q -b -n -x hsimple.C -e return
WORKING_DIRECTORY tutorials DEPENDS root Cling)
endif()
install(FILES ${CMAKE_BINARY_DIR}/tutorials/hsimple.root DESTINATION ${CMAKE_INSTALL_TUTDIR} COMPONENT tests)
endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment