diff options
author | Kitware Robot <kwrobot@kitware.com> | 2018-06-01 13:53:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-06-01 13:53:42 (GMT) |
commit | d7204e649ed4ebb19bb341b4e49eb51514364922 (patch) | |
tree | d9ac3ded5ae6899be7188795011743fe3e6da0a6 /Source/cmCoreTryCompile.cxx | |
parent | 12fed3edb107c949671043196fa94c542b45452a (diff) | |
download | CMake-d7204e649ed4ebb19bb341b4e49eb51514364922.zip CMake-d7204e649ed4ebb19bb341b4e49eb51514364922.tar.gz CMake-d7204e649ed4ebb19bb341b4e49eb51514364922.tar.bz2 |
Revise C++ coding style using clang-format-6.0
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`. Use `clang-format` version 6.0.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
Diffstat (limited to 'Source/cmCoreTryCompile.cxx')
-rw-r--r-- | Source/cmCoreTryCompile.cxx | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index a9b7adf..0b50121 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -82,17 +82,20 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv, if (strcmp(tt, cmState::GetTargetTypeName(cmStateEnums::EXECUTABLE)) == 0) { targetType = cmStateEnums::EXECUTABLE; - } else if (strcmp(tt, cmState::GetTargetTypeName( - cmStateEnums::STATIC_LIBRARY)) == 0) { + } else if (strcmp(tt, + cmState::GetTargetTypeName( + cmStateEnums::STATIC_LIBRARY)) == 0) { targetType = cmStateEnums::STATIC_LIBRARY; } else { this->Makefile->IssueMessage( - cmake::FATAL_ERROR, std::string("Invalid value '") + tt + + cmake::FATAL_ERROR, + std::string("Invalid value '") + tt + "' for " "CMAKE_TRY_COMPILE_TARGET_TYPE. Only " "'" + - cmState::GetTargetTypeName(cmStateEnums::EXECUTABLE) + "' and " - "'" + + cmState::GetTargetTypeName(cmStateEnums::EXECUTABLE) + + "' and " + "'" + cmState::GetTargetTypeName(cmStateEnums::STATIC_LIBRARY) + "' " "are allowed."); @@ -224,8 +227,9 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv, cmake::FATAL_ERROR, "Only libraries may be used as try_compile or try_run IMPORTED " "LINK_LIBRARIES. Got " + - std::string(tgt->GetName()) + " of " - "type " + + std::string(tgt->GetName()) + + " of " + "type " + cmState::GetTargetTypeName(tgt->GetType()) + "."); return -1; } @@ -487,8 +491,9 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv, const char* flags = this->Makefile->GetDefinition(langFlags); fprintf(fout, "set(CMAKE_%s_FLAGS %s)\n", li.c_str(), cmOutputConverter::EscapeForCMake(flags ? flags : "").c_str()); - fprintf(fout, "set(CMAKE_%s_FLAGS \"${CMAKE_%s_FLAGS}" - " ${COMPILE_DEFINITIONS}\")\n", + fprintf(fout, + "set(CMAKE_%s_FLAGS \"${CMAKE_%s_FLAGS}" + " ${COMPILE_DEFINITIONS}\")\n", li.c_str(), li.c_str()); } switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0066)) { @@ -563,8 +568,9 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv, } break; } - fprintf(fout, "set(CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}" - " ${EXE_LINKER_FLAGS}\")\n"); + fprintf(fout, + "set(CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}" + " ${EXE_LINKER_FLAGS}\")\n"); fprintf(fout, "include_directories(${INCLUDE_DIRECTORIES})\n"); fprintf(fout, "set(CMAKE_SUPPRESS_REGENERATION 1)\n"); fprintf(fout, "link_directories(${LINK_DIRECTORIES})\n"); |