Skip to content

Commit fc60d55

Browse files
committed
[roottest] Use native pathlists in transient/base/CMakeLists.txt
This is for correct Windows support.
1 parent a51b4a0 commit fc60d55

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

roottest/root/io/transient/base/CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,18 @@ else()
3030
set(outref_suffix "ZLIB")
3131
endif()
3232

33+
set(root_includepaths
34+
${CMAKE_CURRENT_SOURCE_DIR}
35+
${DEFAULT_ROOT_INCLUDE_PATH}
36+
)
37+
cmake_path(CONVERT "${root_includepaths}" TO_NATIVE_PATH_LIST root_includepaths_native)
38+
# Like in tutorials/CMakeLists.txt, we use this generator expression to make
39+
# sure the semicolon in Windows path separators doesn't get used up for list
40+
# parsing at configuration time in ROOTTEST_ADD_TEST.
41+
string(REPLACE ";" "$<SEMICOLON>" root_includepaths_escaped "${root_includepaths_native}")
42+
3343
ROOTTEST_ADD_TEST(hadd_autoload
3444
COMMAND hadd -f data_merge.root data1.root data2.root
3545
OUTREF hadd_autoload${outref_suffix}.ref
3646
FIXTURES_REQUIRED root-io-transient-base-WriteFile-fixture
37-
ENVIRONMENT ROOT_INCLUDE_PATH=${CMAKE_CURRENT_SOURCE_DIR}:${DEFAULT_ROOT_INCLUDE_PATH})
47+
ENVIRONMENT ROOT_INCLUDE_PATH=${root_includepaths_escaped})

0 commit comments

Comments
 (0)