]> git.ipfire.org Git - thirdparty/git.git/commitdiff
cmake (Windows): complain when encountering an unknown compiler
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 30 Sep 2020 15:26:21 +0000 (15:26 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 Sep 2020 20:25:59 +0000 (13:25 -0700)
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>
contrib/buildsystems/CMakeLists.txt

index 55d09600022d877770c0cf1cd03d7038c19d27f0..78b90abe5ebd417a5e4bfbcccca837454b6c30e4 100644 (file)
@@ -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)