summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/CYGWIN-GNU.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/CYGWIN-GNU.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/CYGWIN-GNU.cmake')
-rw-r--r--Modules/Platform/CYGWIN-GNU.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/Platform/CYGWIN-GNU.cmake b/Modules/Platform/CYGWIN-GNU.cmake
index 4fa14ce..b81bd4d 100644
--- a/Modules/Platform/CYGWIN-GNU.cmake
+++ b/Modules/Platform/CYGWIN-GNU.cmake
@@ -10,7 +10,6 @@ set(__CYGWIN_COMPILER_GNU 1)
# TODO: Is -Wl,--enable-auto-import now always default?
string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " -Wl,--enable-auto-import")
-set(CMAKE_CREATE_WIN32_EXE "-mwindows")
set(CMAKE_GNULD_IMAGE_VERSION
"-Wl,--major-image-version,<TARGET_VERSION_MAJOR>,--minor-image-version,<TARGET_VERSION_MINOR>")
@@ -23,6 +22,7 @@ macro(__cygwin_compiler_gnu lang)
"<CMAKE_${lang}_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES>")
set(CMAKE_${lang}_LINK_EXECUTABLE
"<CMAKE_${lang}_COMPILER> <FLAGS> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -Wl,--out-implib,<TARGET_IMPLIB> ${CMAKE_GNULD_IMAGE_VERSION} <LINK_LIBRARIES>")
+ set(CMAKE_${lang}_CREATE_WIN32_EXE "-mwindows")
# No -fPIC on cygwin
set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "")