mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Simplify boolean expressions
Use clang-tidy's readability-simplify-boolean-expr checker. After applying the fix-its, revise all changes *very* carefully. Be aware of false positives and invalid changes.
This commit is contained in:
committed by
Brad King
parent
d6754d37d5
commit
7f6b8d3399
@@ -655,11 +655,11 @@ std::string cmExtraCodeBlocksGenerator::GetCBCompilerId(const cmMakefile* mf)
|
||||
// projects with C/C++ and Fortran are handled as C/C++ projects
|
||||
bool pureFortran = false;
|
||||
std::string compilerIdVar;
|
||||
if (this->GlobalGenerator->GetLanguageEnabled("CXX") == true) {
|
||||
if (this->GlobalGenerator->GetLanguageEnabled("CXX")) {
|
||||
compilerIdVar = "CMAKE_CXX_COMPILER_ID";
|
||||
} else if (this->GlobalGenerator->GetLanguageEnabled("C") == true) {
|
||||
} else if (this->GlobalGenerator->GetLanguageEnabled("C")) {
|
||||
compilerIdVar = "CMAKE_C_COMPILER_ID";
|
||||
} else if (this->GlobalGenerator->GetLanguageEnabled("Fortran") == true) {
|
||||
} else if (this->GlobalGenerator->GetLanguageEnabled("Fortran")) {
|
||||
compilerIdVar = "CMAKE_Fortran_COMPILER_ID";
|
||||
pureFortran = true;
|
||||
}
|
||||
@@ -667,7 +667,7 @@ std::string cmExtraCodeBlocksGenerator::GetCBCompilerId(const cmMakefile* mf)
|
||||
std::string compilerId = mf->GetSafeDefinition(compilerIdVar);
|
||||
std::string compiler = "gcc"; // default to gcc
|
||||
if (compilerId == "MSVC") {
|
||||
if (mf->IsDefinitionSet("MSVC10") == true) {
|
||||
if (mf->IsDefinitionSet("MSVC10")) {
|
||||
compiler = "msvc10";
|
||||
} else {
|
||||
compiler = "msvc8";
|
||||
|
||||
Reference in New Issue
Block a user