Changeset - r26703:9220ecb287e5
[Not reviewed]
master
0 1 0
glx22 - 19 months ago 2022-12-29 23:48:57
glx@openttd.org
Fix 57717a2: [CMake] Don't apply 'cl' workaround to 'clang-cl'
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
cmake/CompileFlags.cmake
Show inline comments
 
@@ -47,25 +47,25 @@ macro(compile_flags)
 
            add_compile_options(
 
                "$<$<CONFIG:Debug>:-Wa,-mbig-obj>" # Switch to pe-bigobj-x86-64 as x64 Debug builds push pe-x86-64 to the limits (linking errors with ASLR, ...)
 
            )
 
        endif()
 
    endif()
 

	
 
    # Prepare a generator that checks if we are not a debug, and don't have asserts
 
    # on. We need this later on to set some compile options for stable releases.
 
    set(IS_STABLE_RELEASE "$<AND:$<NOT:$<CONFIG:Debug>>,$<NOT:$<BOOL:${OPTION_USE_ASSERTS}>>>")
 

	
 
    if(MSVC)
 
        add_compile_options(/W3)
 
        if(MSVC_VERSION GREATER 1929)
 
        if(MSVC_VERSION GREATER 1929 AND CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
 
            # Starting with version 19.30, there is an optimisation bug, see #9966 for details
 
            # This flag disables the broken optimisation to work around the bug
 
            add_compile_options(/d2ssa-rse-)
 
        endif()
 
    elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
 
        add_compile_options(
 
            -W
 
            -Wall
 
            -Wcast-qual
 
            -Wextra
 
            -Wsign-compare
 
            -Wundef
0 comments (0 inline, 0 general)