summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Windows-Clang.cmake
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2021-03-13 13:37:19 (GMT)
committerRaul Tambre <raul@tambre.ee>2021-03-17 15:51:56 (GMT)
commit56c759b000ab5041aff9a92d51a6cc471e7d34a4 (patch)
treec8b181920834eaa63970012a4f0bd848d11078ff /Modules/Platform/Windows-Clang.cmake
parent982f7bb5063453d3c0be102c917bb660ec21978b (diff)
downloadCMake-56c759b000ab5041aff9a92d51a6cc471e7d34a4.zip
CMake-56c759b000ab5041aff9a92d51a6cc471e7d34a4.tar.gz
CMake-56c759b000ab5041aff9a92d51a6cc471e7d34a4.tar.bz2
Per-language Win32/Console flags
Allows using different compilers with different flags for different languages. For example Clang with GNU-like commandline for CXX and MSVC as host compiler for CUDA. Should help with #21914.
Diffstat (limited to 'Modules/Platform/Windows-Clang.cmake')
-rw-r--r--Modules/Platform/Windows-Clang.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/Platform/Windows-Clang.cmake b/Modules/Platform/Windows-Clang.cmake
index c508ac1..7365ff5 100644
--- a/Modules/Platform/Windows-Clang.cmake
+++ b/Modules/Platform/Windows-Clang.cmake
@@ -71,8 +71,8 @@ macro(__windows_compiler_clang_gnu lang)
set(CMAKE_${lang}_LINK_EXECUTABLE
"<CMAKE_${lang}_COMPILER> -fuse-ld=lld-link -nostartfiles -nostdlib <FLAGS> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -Xlinker /implib:<TARGET_IMPLIB> -Xlinker /pdb:<TARGET_PDB> -Xlinker /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> ${CMAKE_GNULD_IMAGE_VERSION} <LINK_LIBRARIES>")
- set(CMAKE_CREATE_WIN32_EXE "-Xlinker /subsystem:windows")
- set(CMAKE_CREATE_CONSOLE_EXE "-Xlinker /subsystem:console")
+ set(CMAKE_${lang}_CREATE_WIN32_EXE "-Xlinker /subsystem:windows")
+ set(CMAKE_${lang}_CREATE_CONSOLE_EXE "-Xlinker /subsystem:console")
if(NOT "${lang}" STREQUAL "ASM")
set(CMAKE_${lang}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreaded -Xclang -flto-visibility-public-std -D_MT -Xclang --dependent-lib=libcmt)