From 1e822419c59d92273ac4180bf0dc0e120423ee5d Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sun, 31 May 2020 00:21:35 -0400 Subject: [PATCH] Replace CXX_COMPILER_ID generator expressions --- CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index da3e06716..ab79451ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,11 +169,15 @@ else() endif() add_compile_options($<$:-fno-rtti> $<$:-fno-exceptions> - $<$:-Wno-unknown-warning-option> - $<$:-Wno-unused-private-field> -Wall -Wno-multichar -Werror=implicit-fallthrough - -Wno-lto-type-mismatch -Wno-unused-variable -Wno-unused-result + -Wno-unused-variable -Wno-unused-result -Wno-unused-function -Wno-sign-compare -Wno-unknown-pragmas -Werror) + # doesn't work with generator expression in add_compile_options? + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + add_compile_options(-Wno-unknown-warning-option -Wno-unused-private-field) + elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + add_compile_options(-Wno-lto-type-mismatch) + endif() add_compile_definitions(FMT_EXCEPTIONS=0) if(APPLE)