summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-07-07 13:23:50 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-07-07 13:23:58 (GMT)
commit18eeb51ebb32346e922b493df1c4a711f5e6a349 (patch)
tree88bbb3bdc1eb3f7c15092aa585b6785e086b37e7
parentd21b391cdec4d6d8ac5baa80a584aa3442ea5239 (diff)
parent28b1c5f9b3cde00c88b7729b96613ff0e51132d9 (diff)
downloadCMake-18eeb51ebb32346e922b493df1c4a711f5e6a349.zip
CMake-18eeb51ebb32346e922b493df1c4a711f5e6a349.tar.gz
CMake-18eeb51ebb32346e922b493df1c4a711f5e6a349.tar.bz2
Merge topic 'lcc-warningless-release-build-with-flag'
28b1c5f9b3 LCC: get rid of excess -Wunused-but-set-variable on release builds Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7460
-rw-r--r--CompileFlags.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/CompileFlags.cmake b/CompileFlags.cmake
index e6fb20b..5641de4 100644
--- a/CompileFlags.cmake
+++ b/CompileFlags.cmake
@@ -136,3 +136,12 @@ OFF to disable /MP completely." )
endif()
endif()
endif()
+
+# Get rid of excess -Wunused-but-set-variable on release builds with LCC >= 1.26
+foreach(l C CXX)
+ if(CMAKE_${l}_COMPILER_ID STREQUAL "LCC" AND NOT CMAKE_${l}_COMPILER_VERSION VERSION_LESS 1.26)
+ foreach(c MINSIZEREL RELEASE RELWITHDEBINFO)
+ string(APPEND "CMAKE_${l}_FLAGS_${c}" " -Wno-unused-but-set-variable")
+ endforeach()
+ endif()
+endforeach()