CMake: Disable -Wall, disable LTO for GCC+gold

This commit is contained in:
Luke Street 2022-05-31 20:44:53 -04:00
parent 40a444d800
commit 2364c4cdba
2 changed files with 12 additions and 4 deletions

View File

@ -252,9 +252,9 @@ else()
endif()
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fno-rtti>
$<$<COMPILE_LANGUAGE:CXX>:-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)

View File

@ -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
}
}
},
{