diff options
-rw-r--r-- | CompileFlags.cmake | 9 |
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() |