cmake: Stop using CMAKE_* variables for flags

It is not recommended anyway and the -Werror flag set in CI was getting
set when compiling gtest, breaking our build.
This commit is contained in:
patrick96
2021-07-11 14:11:58 +02:00
committed by Patrick Ziegler
parent 55509efa1d
commit 3652d5fe0d
6 changed files with 59 additions and 51 deletions

View File

@ -53,8 +53,8 @@ void print_build_info(bool extended) {
printf("\n");
printf("Build type: @CMAKE_BUILD_TYPE@\n");
printf("Compiler: @CMAKE_CXX_COMPILER@\n");
printf("Compiler flags: @CMAKE_CXX_FLAGS@ ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_UPPER}}\n");
printf("Linker flags: @CMAKE_EXE_LINKER_FLAGS@ ${CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE_UPPER}}\n");
printf("Compiler flags: @CMAKE_CXX_FLAGS@ ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_UPPER}} @cxx_flags_str@\n");
printf("Linker flags: @CMAKE_EXE_LINKER_FLAGS@ ${CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE_UPPER}} @cxx_linker_flags_str@\n");
}
}
// clang-format on