Skip to content

Commit f80ee47

Browse files
committed
[cmake][win] Fix error in root_compile_macro
Fix potential error message in root_compile_macro, like: Error in <TUrl::TUrl>: "C:/root-dev/build/x64/relwithdebinfo/roottest/root/io/newstl" malformed, URL must contain "://"
1 parent 5786c5b commit f80ee47

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmake/modules/RootMacros.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2368,8 +2368,9 @@ macro(ROOTTEST_COMPILE_MACRO filename)
23682368
list(APPEND RootMacroDirDefines "-e;#define ${d}")
23692369
endforeach()
23702370

2371+
cmake_path(CONVERT "${CMAKE_CURRENT_BINARY_DIR}" TO_NATIVE_PATH_LIST NATIVE_BINARY_DIR)
23712372
set(root_compile_macro ${CMAKE_COMMAND} -E env
2372-
ROOT_LIBRARY_PATH="${CMAKE_CURRENT_BINARY_DIR}"
2373+
ROOT_LIBRARY_PATH="${NATIVE_BINARY_DIR}"
23732374
ROOT_INCLUDE_PATH="${CMAKE_CURRENT_BINARY_DIR}:${DEFAULT_ROOT_INCLUDE_PATH}"
23742375
${ROOT_root_CMD}
23752376
-e "gSystem->SetBuildDir(\"${CMAKE_CURRENT_BINARY_DIR}\", true)"

0 commit comments

Comments
 (0)