diff --git a/CMakeLists.txt b/CMakeLists.txt index 93460e2bd..93b3c728e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -252,9 +252,9 @@ else() endif() add_compile_options($<$:-fno-rtti> $<$:-fno-exceptions> - -Wall -Wno-multichar -Werror=implicit-fallthrough + -Wall -Wno-multichar -Wno-unused-variable -Wno-unused-result -Wno-unused-but-set-variable - -Wno-unused-function -Wno-sign-compare -Wno-unknown-pragmas -Werror) + -Wno-unused-function -Wno-sign-compare -Wno-unknown-pragmas) # doesn't work with generator expression in add_compile_options? if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") add_compile_options(-Wno-unknown-warning-option -Wno-unused-private-field) diff --git a/CMakePresets.json b/CMakePresets.json index e4464707b..66d5ad8a8 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -29,7 +29,11 @@ "generator": "Ninja", "binaryDir": "${sourceDir}/build/${presetName}", "cacheVariables": { - "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install" + "CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install", + "USE_LTO": { + "type": "BOOL", + "value": false + } }, "vendor": { "microsoft.com/VisualStudioSettings/CMake/1.0": { @@ -66,7 +70,11 @@ ], "cacheVariables": { "CMAKE_C_COMPILER": "clang", - "CMAKE_CXX_COMPILER": "clang++" + "CMAKE_CXX_COMPILER": "clang++", + "USE_LTO": { + "type": "BOOL", + "value": true + } } }, {