diff options
author | Drew DeVault <ddevault@vistarmedia.com> | 2017-07-12 09:24:11 -0400 |
---|---|---|
committer | Drew DeVault <ddevault@vistarmedia.com> | 2017-07-12 09:24:11 -0400 |
commit | 73a908665d203503e37db21fbcb199e9b86ac78e (patch) | |
tree | 548aa15d05d960e44e12f368b75802237e34fa01 | |
parent | b08aa9fd35d650b15a5322bd1b6edea01f152f27 (diff) |
Fix unused variables in release builds
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d1276f8b..5a9ca7d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,10 @@ if (CMAKE_COMPILER_IS_GNUCC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wimplicit-fallthrough=0") endif() endif() +if (CMAKE_BUILD_TYPE MATCHES Release) + # Some variables are only used for assertions + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-variable") +endif() list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_SOURCE_DIR}/CMake |