Skip to content

Commit f5af848

Browse files
committed
[rootx] Turn root executable into symbolic link to root.exe
There is no need to two separate executables anymore, but for backwards compatibility we keep `root.exe` and then `root` is a symbolic link to it.
1 parent 4b49caa commit f5af848

File tree

4 files changed

+17
-211
lines changed

4 files changed

+17
-211
lines changed

CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,9 +426,6 @@ add_subdirectory (montecarlo)
426426
if(geom)
427427
add_subdirectory (geom)
428428
endif()
429-
if(NOT WIN32)
430-
add_subdirectory (rootx)
431-
endif()
432429
add_subdirectory (misc)
433430
add_subdirectory (main)
434431
add_subdirectory (bindings)

main/CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,24 @@ if(NOT WIN32)
1616
endif()
1717
ROOT_EXECUTABLE(roots.exe roots.cxx LIBRARIES Core MathCore CMAKENOEXPORT)
1818
endif()
19+
1920
ROOT_EXECUTABLE(root.exe rmain.cxx LIBRARIES Core Rint)
21+
22+
if(NOT MSVC)
23+
# Create a symlink in the build tree
24+
add_custom_command(TARGET root.exe POST_BUILD
25+
COMMAND ${CMAKE_COMMAND} -E create_symlink "root.exe" ${CMAKE_BINARY_DIR}/bin/root
26+
)
27+
# Create symlink in the install tree
28+
install(CODE "
29+
execute_process(COMMAND
30+
\"${CMAKE_COMMAND}\" -E create_symlink
31+
root.exe
32+
\"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/root\")
33+
")
34+
endif()
35+
36+
2037
if(MSVC)
2138
set(root_exports "/EXPORT:_Init_thread_abort /EXPORT:_Init_thread_epoch \
2239
/EXPORT:_Init_thread_footer /EXPORT:_Init_thread_header /EXPORT:_tls_index \

rootx/CMakeLists.txt

Lines changed: 0 additions & 29 deletions
This file was deleted.

rootx/src/rootx.cxx

Lines changed: 0 additions & 179 deletions
This file was deleted.

0 commit comments

Comments
 (0)