diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2020-09-30 18:26:21 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-09-30 23:25:59 +0300 |
commit | 2d9eb4ed2cd8a0105c65167fdc9ddb0ddcde42c5 (patch) | |
tree | 847eba2d195aa73d979e2bc13dded3d420d61520 /contrib | |
parent | 8c35e82898f6418bb010c2f3bb5025b52023ba91 (diff) |
cmake (Windows): complain when encountering an unknown compiler
We have some custom handling regarding the link options, which are
specific to each compiler.
Therefore: let's not just continue without setting the link options if
configuring for a currently unhandled compiler, but error out.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/buildsystems/CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index 55d0960002..78b90abe5e 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -617,6 +617,8 @@ if(WIN32) target_link_options(common-main PUBLIC -municode -Wl,-nxcompat -Wl,-dynamicbase -Wl,-entry:wmainCRTStartup -Wl,invalidcontinue.obj) elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC") target_link_options(common-main PUBLIC /IGNORE:4217 /IGNORE:4049 /NOLOGO /ENTRY:wmainCRTStartup /SUBSYSTEM:CONSOLE invalidcontinue.obj) + else() + message(FATAL_ERROR "Unhandled compiler: ${CMAKE_C_COMPILER_ID}") endif() elseif(UNIX) target_link_libraries(common-main pthread rt) |