Skip to content

Commit 910ffce

Browse files
committed
[roottest] Use root target file in dotLibraries test command
The `root` executable should not be used directly in the test command, because if there was no `root` CMake target, it might use the literal string "root" in the command, potentially resolving to a ROOT install on the system and not the ROOT from the build directory. It is safer to use a `TARGET_FILE` generator expression here.
1 parent 79a1cd5 commit 910ffce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

roottest/root/rint/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ROOTTEST_ADD_TEST(missingSymbol
2121
if (NOT MSVC)
2222
# ROOT-5843
2323
ROOTTEST_ADD_TEST(dotLibraries
24-
COMMAND root -b -q -l -e ".libraries"
24+
COMMAND $<TARGET_FILE:root> -b -q -l -e ".libraries"
2525
PASSREGEX "libRint")
2626
endif()
2727

0 commit comments

Comments
 (0)