Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmake][windows] Add Ninja support on Windows #16690

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ Install path: ${CMAKE_INSTALL_PREFIX}
Compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}
C++ standard: ${CMAKE_CXX_STANDARD}
Compiler flags:")
if(MSVC)
if(MSVC AND NOT CMAKE_GENERATOR MATCHES Ninja)
message(STATUS "
- C: ${CMAKE_C_FLAGS}
- C (build type specific):
Expand Down
2 changes: 1 addition & 1 deletion builtins/cfitsio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if(NOT WIN32)
set(CFITSIO_C_FLAGS -fPIC)
endif()

if(WIN32)
if(WIN32 AND NOT CMAKE_GENERATOR MATCHES Ninja)
if(winrtdebug)
set(CFITSIO_BUILD_COMMAND_FLAGS "--config Debug")
else()
Expand Down
18 changes: 12 additions & 6 deletions builtins/pcre/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@ foreach(var PCRE_FOUND PCRE_VERSION PCRE_INCLUDE_DIR PCRE_PCRE_LIBRARY PCRE_LIBR
endforeach()

if(WIN32)
if(winrtdebug)
set(PCRE_POSTFIX $<$<CONFIG:Debug>:d>)
set(pcre_config_kind "Debug")
if(CMAKE_GENERATOR MATCHES Ninja)
if (CMAKE_BUILD_TYPE MATCHES Debug)
set(PCRE_POSTFIX d)
endif()
else()
set(pcre_config_kind "Release")
if(winrtdebug)
set(PCRE_POSTFIX $<$<CONFIG:Debug>:d>)
set(pcre_config_kind "Debug")
else()
set(pcre_config_kind "Release")
endif()
set(pcre_config "--config ${pcre_config_kind}")
endif()
set(pcre_config "--config")
endif()

set(PCRE_VERSION "8.43" CACHE INTERNAL "" FORCE)
Expand Down Expand Up @@ -52,7 +58,7 @@ ExternalProject_Add(PCRE
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=TRUE

BUILD_COMMAND
${CMAKE_COMMAND} --build <BINARY_DIR> ${pcre_config} ${pcre_config_kind} --target pcre
${CMAKE_COMMAND} --build <BINARY_DIR> ${pcre_config} --target pcre

BUILD_BYPRODUCTS
${PCRE_BYPRODUCTS}
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/RootMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1848,7 +1848,7 @@ function(ROOT_ADD_GTEST test_suite)
endif(ARG_INCLUDE_DIRS)

if(MSVC)
set(test_exports "/EXPORT:_Init_thread_abort /EXPORT:_Init_thread_epoch
set(test_exports "/EXPORT:_Init_thread_abort /EXPORT:_Init_thread_epoch \
/EXPORT:_Init_thread_footer /EXPORT:_Init_thread_header /EXPORT:_tls_index")
set_property(TARGET ${test_suite} APPEND_STRING PROPERTY LINK_FLAGS ${test_exports})
endif()
Expand Down
87 changes: 63 additions & 24 deletions cmake/modules/SearchInstalledSoftware.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -186,20 +186,31 @@ if(builtin_freetype)
message(STATUS "Building freetype version ${freetype_version} included in ROOT itself")
set(FREETYPE_LIBRARY ${CMAKE_BINARY_DIR}/FREETYPE-prefix/src/FREETYPE/objs/.libs/${CMAKE_STATIC_LIBRARY_PREFIX}freetype${CMAKE_STATIC_LIBRARY_SUFFIX})
if(WIN32)
set(freetypebuild "Release")
set(freetypelib freetype.lib)
if(winrtdebug)
set(freetypebuild "Debug")
set(freetypelib freetyped.lib)
set(FREETYPE_LIB_DIR ".")
if(CMAKE_GENERATOR MATCHES Ninja)
set(freetypelib freetype.lib)
if (CMAKE_BUILD_TYPE MATCHES Debug)
set(freetypelib freetyped.lib)
endif()
else()
set(freetypebuild Release)
set(freetypelib freetype.lib)
if(winrtdebug)
set(freetypebuild Debug)
set(freetypelib freetyped.lib)
endif()
set(FREETYPE_LIB_DIR "${freetypebuild}")
set(FREETYPE_EXTRA_BUILD_ARGS --config ${freetypebuild})
endif()
ExternalProject_Add(
FREETYPE
URL ${CMAKE_SOURCE_DIR}/graf2d/freetype/src/freetype-${freetype_version}.tar.gz
URL_HASH SHA256=efe71fd4b8246f1b0b1b9bfca13cfff1c9ad85930340c27df469733bbb620938
INSTALL_DIR ${CMAKE_BINARY_DIR}
CMAKE_ARGS -G ${CMAKE_GENERATOR} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DFT_DISABLE_BZIP2=TRUE
BUILD_COMMAND ${CMAKE_COMMAND} --build . --config ${freetypebuild}
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_if_different ${freetypebuild}/${freetypelib} ${FREETYPE_LIBRARY}
CMAKE_ARGS -G ${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DFT_DISABLE_BZIP2=TRUE
BUILD_COMMAND ${CMAKE_COMMAND} --build . ${FREETYPE_EXTRA_BUILD_ARGS}
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_if_different ${FREETYPE_LIB_DIR}/${freetypelib} ${FREETYPE_LIBRARY}
LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1 BUILD_IN_SOURCE 0
BUILD_BYPRODUCTS ${FREETYPE_LIBRARY}
TIMEOUT 600
Expand Down Expand Up @@ -299,6 +310,7 @@ if(builtin_lzma)
BUILD_COMMAND ""
INSTALL_COMMAND ""
LOG_DOWNLOAD 1
BUILD_BYPRODUCTS ${LIBLZMA_LIBRARIES}
TIMEOUT 600
)
set(LIBLZMA_INCLUDE_DIR ${CMAKE_BINARY_DIR}/LZMA/src/LZMA/include)
Expand Down Expand Up @@ -453,18 +465,24 @@ if(asimage)
#---AfterImage---------------------------------------------------------------
set(AFTERIMAGE_LIBRARIES ${CMAKE_BINARY_DIR}/lib/libAfterImage${CMAKE_STATIC_LIBRARY_SUFFIX})
if(WIN32)
if(winrtdebug)
set(astepbld "Debug")
else()
set(astepbld "Release")
set(ASTEP_LIB_DIR ".")
if(NOT CMAKE_GENERATOR MATCHES Ninja)
if(winrtdebug)
set(astepbld Debug)
else()
set(astepbld Release)
endif()
set(ASTEP_LIB_DIR "${astepbld}")
set(ASTEP_EXTRA_BUILD_ARGS --config ${astepbld})
endif()
ExternalProject_Add(
AFTERIMAGE
DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/graf2d/asimage/src/libAfterImage AFTERIMAGE
INSTALL_DIR ${CMAKE_BINARY_DIR}
CMAKE_ARGS -G ${CMAKE_GENERATOR} -DCMAKE_VERBOSE_MAKEFILE=ON -DFREETYPE_INCLUDE_DIR=${FREETYPE_INCLUDE_DIR} -DZLIB_INCLUDE_DIR=${ZLIB_INCLUDE_DIR}
BUILD_COMMAND ${CMAKE_COMMAND} --build . --config ${astepbld}
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_if_different ${astepbld}/libAfterImage.lib <INSTALL_DIR>/lib/
CMAKE_ARGS -G ${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DFREETYPE_INCLUDE_DIR=${FREETYPE_INCLUDE_DIR} -DZLIB_INCLUDE_DIR=${ZLIB_INCLUDE_DIR}
BUILD_COMMAND ${CMAKE_COMMAND} --build . ${ASTEP_EXTRA_BUILD_ARGS}
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ASTEP_LIB_DIR}/libAfterImage.lib <INSTALL_DIR>/lib/
LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1 BUILD_IN_SOURCE 0
BUILD_BYPRODUCTS ${AFTERIMAGE_LIBRARIES}
TIMEOUT 600
Expand Down Expand Up @@ -1239,12 +1257,19 @@ if(builtin_tbb)
set(tbb_sha256 1ce48f34dada7837f510735ff1172f6e2c261b09460e3bf773b49791d247d24e)

if(MSVC)
set(tbb_build Release)
if(winrtdebug)
set(tbb_build Debug)
set(tbbsuffix "_debug")
if(CMAKE_GENERATOR MATCHES Ninja)
if(CMAKE_BUILD_TYPE MATCHES Debug)
set(tbbsuffix "_debug")
endif()
else()
set(tbb_build Release)
if(winrtdebug)
set(tbb_build Debug)
set(tbbsuffix "_debug")
endif()
endif()
set(TBB_LIBRARIES ${CMAKE_BINARY_DIR}/lib/tbb12${tbbsuffix}.lib)
set(TBB_CXXFLAGS "-D__TBB_NO_IMPLICIT_LINKAGE=1")
install(DIRECTORY ${CMAKE_BINARY_DIR}/bin/ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries FILES_MATCHING PATTERN "tbb*.dll")
install(DIRECTORY ${CMAKE_BINARY_DIR}/lib/ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries FILES_MATCHING PATTERN "tbb*.lib")
else()
Expand Down Expand Up @@ -1822,9 +1847,21 @@ if (builtin_gtest)

set(GTEST_CXX_FLAGS "${ROOT_EXTERNAL_CXX_FLAGS}")
if(MSVC)
set(gtestbuild "Release")
if(winrtdebug)
set(gtestbuild "Debug")
if(winrtdebug)
set(GTEST_BUILD_TYPE Debug)
else()
set(GTEST_BUILD_TYPE Release)
endif()
set(_gtest_byproducts
${_gtest_byproduct_binary_dir}/lib/gtest.lib
${_gtest_byproduct_binary_dir}/lib/gtest_main.lib
${_gtest_byproduct_binary_dir}/lib/gmock.lib
${_gtest_byproduct_binary_dir}/lib/gmock_main.lib
)
if(CMAKE_GENERATOR MATCHES Ninja)
set(GTEST_BUILD_COMMAND "BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR>")
else()
set(GTEST_BUILD_COMMAND "BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --config ${GTEST_BUILD_TYPE}")
endif()
if(asan)
if(NOT winrtdebug)
Expand All @@ -1838,7 +1875,9 @@ if (builtin_gtest)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=${_gtest_byproduct_binary_dir}/lib/
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO:PATH=${_gtest_byproduct_binary_dir}/lib/
-Dgtest_force_shared_crt=ON
BUILD_COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --config ${gtestbuild})
${GTEST_BUILD_COMMAND})
else()
set(GTEST_BUILD_TYPE Release)
endif()
if(APPLE)
set(EXTRA_GTEST_OPTS
Expand All @@ -1857,7 +1896,7 @@ if (builtin_gtest)
# -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=ReleaseLibs
# -Dgtest_force_shared_crt=ON
CMAKE_ARGS -G ${CMAKE_GENERATOR}
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_BUILD_TYPE=${GTEST_BUILD_TYPE}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
Expand Down
4 changes: 1 addition & 3 deletions core/metacling/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ if(MSVC)
target_include_directories(MetaCling PRIVATE
${CMAKE_SOURCE_DIR}/core/winnt/inc
)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set_source_files_properties(TCling.cxx COMPILE_FLAGS $<$<CONFIG:Debug>:/bigobj>)
endif()
set_source_files_properties(TCling.cxx COMPILE_FLAGS /bigobj)
endif()

add_dependencies(MetaCling CLING)
Expand Down
4 changes: 3 additions & 1 deletion core/rootcling_stage1/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@ if (CMAKE_SYSTEM_NAME MATCHES FreeBSD)
target_link_libraries(rootcling_stage1 util procstat)
endif()

set_target_properties(rootcling_stage1 PROPERTIES RUNTIME_OUTPUT_DIRECTORY src)
if(NOT (WIN32 AND CMAKE_GENERATOR MATCHES Ninja))
set_target_properties(rootcling_stage1 PROPERTIES RUNTIME_OUTPUT_DIRECTORY src)
endif()
add_dependencies(rootcling_stage1 ClingUtils)
13 changes: 10 additions & 3 deletions graf2d/win32gdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,17 @@ file(GLOB iconvfiles "gdk/src/iconv/*.*")
file(GLOB_RECURSE glibfiles "gdk/src/glib/*.*")
file(GLOB_RECURSE gdkfiles "gdk/src/gdk/*.*")

if(winrtdebug)
set(nmcxxflags "${CMAKE_CXX_FLAGS_DEBUG}" DEBUG=1)
if(CMAKE_GENERATOR MATCHES Ninja)
set(nmcxxflags ${CMAKE_CXX_FLAGS_${_BUILD_TYPE_UPPER}})
if (CMAKE_BUILD_TYPE MATCHES "Debug")
set(nmcxxflags "${nmcxxflags}" DEBUG=1)
endif()
else()
set(nmcxxflags "${CMAKE_CXX_FLAGS_RELEASE}")
if(winrtdebug)
set(nmcxxflags "${CMAKE_CXX_FLAGS_DEBUG}" DEBUG=1)
else()
set(nmcxxflags "${CMAKE_CXX_FLAGS_RELEASE}")
endif()
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(nmcxxflags "${nmcxxflags} -D_WIN64")
Expand Down
1 change: 1 addition & 0 deletions hist/unfold/inc/TUnfold.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@

#include <TH1D.h>
#include <TH2D.h>
#include <TGraph.h>
#include <TObject.h>
#include <TArrayI.h>
#include <TSpline.h>
Expand Down
6 changes: 5 additions & 1 deletion interpreter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,13 @@ if(builtin_llvm)
get_directory_property(LLVM_TARGETS_TO_BUILD DIRECTORY llvm-project/llvm DEFINITION LLVM_TARGETS_TO_BUILD)

if(MSVC)
if(CMAKE_GENERATOR MATCHES Ninja)
set(LLVM_TABLEGEN_EXE "${LLVM_BINARY_DIR}/bin/llvm-tblgen.exe")
else()
set(LLVM_TABLEGEN_EXE "${LLVM_BINARY_DIR}/$<CONFIG>/bin/llvm-tblgen.exe")
endif()
else()
set(LLVM_TABLEGEN_EXE "${LLVM_BINARY_DIR}/bin/llvm-tblgen")
set(LLVM_TABLEGEN_EXE "${LLVM_BINARY_DIR}/bin/llvm-tblgen")
endif()
else()
# Rely on llvm-config.
Expand Down
7 changes: 4 additions & 3 deletions interpreter/cling/tools/plugins/clad/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set(CLAD_INCLUDE_DIRS ${clad_install_dir})
# Clad Libraries
set(CLAD_CXX_FLAGS ${CMAKE_CXX_FLAGS})
set(_clad_build_type ${CMAKE_CFG_INTDIR})
if(MSVC)
if(MSVC AND NOT CMAKE_GENERATOR MATCHES Ninja)
if (winrtdebug)
set(_clad_build_type Debug)
else()
Expand All @@ -23,16 +23,17 @@ if(MSVC)
if(asan)
set(CLAD_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ASAN_EXTRA_CXX_FLAGS}")
endif()
set(EXTRA_BUILD_ARGS --config ${_clad_build_type})
endif(MSVC)
if(NOT _clad_build_type STREQUAL "" AND NOT _clad_build_type STREQUAL ".")
set(EXTRA_BUILD_ARGS --config ${_clad_build_type})
endif()
set(_CLAD_LIBRARY_PATH ${CMAKE_CURRENT_BINARY_DIR}/clad-prefix/src/clad-build/${_clad_build_type}/lib${LLVM_LIBDIR_SUFFIX})

# build byproducts only needed by Ninja
if("${CMAKE_GENERATOR}" STREQUAL "Ninja")
if(CMAKE_GENERATOR MATCHES Ninja)
set(CLAD_BYPRODUCTS
${_CLAD_LIBRARY_PATH}/${CMAKE_STATIC_LIBRARY_PREFIX}cladPlugin${CMAKE_STATIC_LIBRARY_SUFFIX}
${_CLAD_LIBRARY_PATH}/${CMAKE_STATIC_LIBRARY_PREFIX}cladPlugin${CMAKE_STATIC_LIBRARY_SUFFIX}
${_CLAD_LIBRARY_PATH}/${CMAKE_STATIC_LIBRARY_PREFIX}cladDifferentiator${CMAKE_STATIC_LIBRARY_SUFFIX}
)
endif()
Expand Down
4 changes: 2 additions & 2 deletions main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ if(NOT WIN32)
endif()
ROOT_EXECUTABLE(root.exe rmain.cxx LIBRARIES Core Rint)
if(MSVC)
set(root_exports "/EXPORT:_Init_thread_abort /EXPORT:_Init_thread_epoch
/EXPORT:_Init_thread_footer /EXPORT:_Init_thread_header /EXPORT:_tls_index
set(root_exports "/EXPORT:_Init_thread_abort /EXPORT:_Init_thread_epoch \
/EXPORT:_Init_thread_footer /EXPORT:_Init_thread_header /EXPORT:_tls_index \
/STACK:4000000 setargv.obj")
set_property(TARGET root.exe APPEND_STRING PROPERTY LINK_FLAGS ${root_exports})
add_custom_command(TARGET root.exe POST_BUILD
Expand Down
2 changes: 1 addition & 1 deletion math/mathcore/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ ROOT_STANDARD_LIBRARY_PACKAGE(TrackMathCoreUnitDict
LINKDEF stress/TrackMathCoreLinkDef.h
DEPENDENCIES Core MathCore RIO GenVector Smatrix)

if(MSVC)
if(MSVC AND NOT CMAKE_GENERATOR MATCHES Ninja)
add_custom_command(TARGET TrackMathCoreUnitDict POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libTrackMathCoreUnitDict.dll
${CMAKE_CURRENT_BINARY_DIR}/libTrackMathCoreUnitDict.dll)
Expand Down
5 changes: 3 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ROOT_STANDARD_LIBRARY_PACKAGE(Event
HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Event.h
SOURCES Event.cxx LINKDEF EventLinkDef.h
DEPENDENCIES Hist MathCore)
if(MSVC)
if(MSVC AND NOT CMAKE_GENERATOR MATCHES Ninja)
if(NOT runtime_cxxmodules)
add_custom_command(TARGET Event POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libEvent_rdict.pcm
Expand Down Expand Up @@ -233,7 +233,7 @@ ROOT_STANDARD_LIBRARY_PACKAGE(TrackMathCoreDict
HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/TrackMathCore.h
LINKDEF TrackMathCoreLinkDef.h
DEPENDENCIES Core MathCore RIO GenVector Smatrix)
if(MSVC)
if(MSVC AND NOT CMAKE_GENERATOR MATCHES Ninja)
add_custom_command(TARGET TrackMathCoreDict POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libTrackMathCoreDict.dll
${CMAKE_CURRENT_BINARY_DIR}/libTrackMathCoreDict.dll)
Expand Down Expand Up @@ -277,6 +277,7 @@ if(WIN32)
set(cleantmpfiles POSTCMD cmd /c del AutoDict_*)
endif()
ROOT_ADD_TEST(test-stressinterpreter COMMAND stressInterpreter
WORKING_DIR ${CMAKE_BINARY_DIR}
PRECMD ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/stressInterpreter.cxx
$<TARGET_FILE_DIR:stressInterpreter>/stressInterpreter.cxx
${cleantmpfiles}
Expand Down
2 changes: 1 addition & 1 deletion test/RootShower/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ target_link_libraries(RootShower ROOT::Core ROOT::Rint ROOT::Gui ROOT::RIO ROOT:
ROOT::Graf ROOT::EG ROOT::Html ROOT::Geom ROOT::Tree
)
set_target_properties(RootShower PROPERTIES ENABLE_EXPORTS 1)
if(MSVC)
if(MSVC AND NOT CMAKE_GENERATOR MATCHES Ninja)
add_custom_command(TARGET RootShower POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/RootShower.exe
${CMAKE_CURRENT_BINARY_DIR}
Expand Down
2 changes: 1 addition & 1 deletion tree/dataframe/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ if(root7)
LINKDEF NTupleStructLinkDef.h
DEPENDENCIES RIO)
configure_file(NTupleStruct.hxx . COPYONLY)
if(MSVC)
if(MSVC AND NOT CMAKE_GENERATOR MATCHES Ninja)
add_custom_command(TARGET NTupleStruct POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libNTupleStruct.dll
${CMAKE_CURRENT_BINARY_DIR}/libNTupleStruct.dll)
Expand Down
2 changes: 1 addition & 1 deletion tree/ntuple/v7/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ROOT_STANDARD_LIBRARY_PACKAGE(CustomStruct
LINKDEF CustomStructLinkDef.h
DEPENDENCIES RIO)
configure_file(CustomStruct.hxx . COPYONLY)
if(MSVC)
if(MSVC AND NOT CMAKE_GENERATOR MATCHES Ninja)
add_custom_command(TARGET CustomStruct POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libCustomStruct.dll
${CMAKE_CURRENT_BINARY_DIR}/libCustomStruct.dll)
Expand Down
2 changes: 1 addition & 1 deletion tree/ntupleutil/v7/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ROOT_STANDARD_LIBRARY_PACKAGE(CustomStructUtil
LINKDEF CustomStructUtilLinkDef.h
DEPENDENCIES RIO)
configure_file(CustomStructUtil.hxx . COPYONLY)
if(MSVC)
if(MSVC AND NOT CMAKE_GENERATOR MATCHES Ninja)
add_custom_command(TARGET CustomStructUtil POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libCustomStructUtil.dll
${CMAKE_CURRENT_BINARY_DIR}/libCustomStructUtil.dll)
Expand Down
2 changes: 1 addition & 1 deletion tree/tree/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ROOT_GENERATE_DICTIONARY(ElementStructDict ElementStruct.h LINKDEF ElementStruct
ROOT_ADD_GTEST(testTOffsetGeneration TOffsetGeneration.cxx ElementStruct.cxx ElementStructDict.cxx
LIBRARIES RIO Tree MathCore
)
if(MSVC)
if(MSVC AND NOT CMAKE_GENERATOR MATCHES Ninja)
add_custom_command(TARGET testTOffsetGeneration POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libElementStructDict_rdict.pcm
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libElementStructDict_rdict.pcm)
Expand Down
Loading