Skip to content

Commit 77f5d80

Browse files
committed
[cmake][Win][Ninja] Fix Ninja build on Windows
On Windows, with Ninja, there is no `$<CONFIG>` subdirectory
1 parent d1546f3 commit 77f5d80

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

roottest/root/io/bigevent/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ROOT_LINKER_LIBRARY(IoBigEventGeneration
77
G__IoBigEventGeneration.cxx
88
LIBRARIES Core Tree Hist MathCore Physics Graf Matrix)
99

10-
if(MSVC)
10+
if(MSVC AND NOT CMAKE_GENERATOR MATCHES Ninja)
1111
add_custom_command(TARGET IoBigEventGeneration POST_BUILD
1212
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libIoBigEventGeneration.dll
1313
${CMAKE_CURRENT_BINARY_DIR}/libIoBigEventGeneration.dll

roottest/root/treeformula/references/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ROOT_LINKER_LIBRARY(TreeFormulaReferencesGeneration
77
G__TreeFormulaReferencesGeneration.cxx
88
LIBRARIES Core Tree Hist MathCore)
99

10-
if(MSVC)
10+
if(MSVC AND NOT CMAKE_GENERATOR MATCHES Ninja)
1111
add_custom_command(TARGET TreeFormulaReferencesGeneration POST_BUILD
1212
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libTreeFormulaReferencesGeneration.dll
1313
${CMAKE_CURRENT_BINARY_DIR}/libTreeFormulaReferencesGeneration.dll

tree/ntuple/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ target_compile_options(StreamerFieldXMLDict PRIVATE $<TARGET_PROPERTY:rfield_str
117117
target_compile_definitions(StreamerFieldXMLDict PRIVATE $<TARGET_PROPERTY:rfield_streamer,COMPILE_DEFINITIONS>)
118118
target_compile_features(StreamerFieldXMLDict PRIVATE $<TARGET_PROPERTY:rfield_streamer,COMPILE_FEATURES>)
119119
target_include_directories(StreamerFieldXMLDict PRIVATE $<TARGET_PROPERTY:rfield_streamer,INCLUDE_DIRECTORIES>)
120-
if(MSVC)
120+
if(MSVC AND NOT CMAKE_GENERATOR MATCHES Ninja)
121121
add_custom_command(TARGET rfield_streamer POST_BUILD
122122
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/librfield_streamer_rdict.pcm
123123
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/librfield_streamer_rdict.pcm

0 commit comments

Comments
 (0)