summaryrefslogtreecommitdiffstats
path: root/Source/cmCoreTryCompile.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-07-14 19:00:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2020-07-14 19:18:59 (GMT)
commiteaad8072eefb9cbb7bf60d9753492e6fb604fd09 (patch)
tree3c50fd113dcc289e557cdc06062e6db41f8de9f8 /Source/cmCoreTryCompile.cxx
parent2da778664d3e99ada4e67a5a1b9d377f92a9f75f (diff)
downloadCMake-eaad8072eefb9cbb7bf60d9753492e6fb604fd09.zip
CMake-eaad8072eefb9cbb7bf60d9753492e6fb604fd09.tar.gz
CMake-eaad8072eefb9cbb7bf60d9753492e6fb604fd09.tar.bz2
cmNonempty: Convenience inlines to check for non-empty string
Diffstat (limited to 'Source/cmCoreTryCompile.cxx')
-rw-r--r--Source/cmCoreTryCompile.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 7fbe90e..8465c58 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -18,6 +18,7 @@
#include "cmMessageType.h"
#include "cmOutputConverter.h"
#include "cmPolicies.h"
+#include "cmProperty.h"
#include "cmState.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
@@ -235,9 +236,8 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
this->SrcFileSignature = true;
cmStateEnums::TargetType targetType = cmStateEnums::EXECUTABLE;
- const std::string* tt =
- this->Makefile->GetDef("CMAKE_TRY_COMPILE_TARGET_TYPE");
- if (!isTryRun && tt && !tt->empty()) {
+ cmProp tt = this->Makefile->GetDef("CMAKE_TRY_COMPILE_TARGET_TYPE");
+ if (!isTryRun && cmNonempty(tt)) {
if (*tt == cmState::GetTargetTypeName(cmStateEnums::EXECUTABLE)) {
targetType = cmStateEnums::EXECUTABLE;
} else if (*tt ==