diff options
-rw-r--r-- | Help/release/3.24.rst | 11 | ||||
-rw-r--r-- | Modules/Compiler/GNU.cmake | 9 | ||||
-rw-r--r-- | Modules/Compiler/TI.cmake | 1 |
3 files changed, 20 insertions, 1 deletions
diff --git a/Help/release/3.24.rst b/Help/release/3.24.rst index 02252e0..3141255 100644 --- a/Help/release/3.24.rst +++ b/Help/release/3.24.rst @@ -348,3 +348,14 @@ Other Changes * A precompiled Windows ``arm64`` binary is now provided on `cmake.org`_. .. _`cmake.org`: https://cmake.org/download/ + +Updates +======= + +Changes made since CMake 3.24.0 include the following. + +3.24.1 +------ + +* The :prop_tgt:`COMPILE_WARNING_AS_ERROR` target property now supports the + TI compiler. diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake index db1eab5..48639cd 100644 --- a/Modules/Compiler/GNU.cmake +++ b/Modules/Compiler/GNU.cmake @@ -79,8 +79,15 @@ macro(__compiler_gnu lang) # * https://gcc.gnu.org/onlinedocs/gcc-9.5.0/gcc/Optimize-Options.html#Optimize-Options (no) # * https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Optimize-Options.html#Optimize-Options (yes) # Since GCC 12.1, the abundance of a parameter produces a warning if compiling multiple targets. - if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 10.1) + # FIXME: What version of GCC for Windows added support for -flto=auto? 10.3 does not have it. + if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 11.0) list(APPEND __lto_flags -flto=auto) + elseif(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 10.1) + if (CMAKE_HOST_WIN32) + list(APPEND __lto_flags -flto=1) + else() + list(APPEND __lto_flags -flto=auto) + endif() else() list(APPEND __lto_flags -flto) endif() diff --git a/Modules/Compiler/TI.cmake b/Modules/Compiler/TI.cmake index 0f9ded3..6cb115b 100644 --- a/Modules/Compiler/TI.cmake +++ b/Modules/Compiler/TI.cmake @@ -15,6 +15,7 @@ set(__COMPILER_TI_SOURCE_FLAG_CXX "--cpp_file") set(__COMPILER_TI_SOURCE_FLAG_ASM "--asm_file") macro(__compiler_ti lang) + set(CMAKE_${lang}_COMPILE_OPTIONS_WARNING_AS_ERROR "--emit_warnings_as_errors") set(CMAKE_${lang}_RESPONSE_FILE_FLAG "--cmd_file=") # Using --cmd_file flag is not possible after the --run_linker flag. # By using a whitespace only the filename is used without flag. |