diff options
author | Brad King <brad.king@kitware.com> | 2014-07-24 19:03:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-09-29 20:05:53 (GMT) |
commit | 16569abfa83ce231b1270282f03aae0b4542c42d (patch) | |
tree | a1464df06deeb3908af11b24fc8bf64f5c549e44 /Source/cmTarget.cxx | |
parent | ef0fd4f0ced850edd049bb05b527c3bd234f441f (diff) | |
download | CMake-16569abfa83ce231b1270282f03aae0b4542c42d.zip CMake-16569abfa83ce231b1270282f03aae0b4542c42d.tar.gz CMake-16569abfa83ce231b1270282f03aae0b4542c42d.tar.bz2 |
cmTarget: Track internally whether platform is Android
Add an IsAndroid member to save whether CMAKE_SYSTEM_NAME is "Android".
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index acae0b3..80c0020 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -257,6 +257,7 @@ cmTarget::cmTarget() #endif this->HaveInstallRule = false; this->DLLPlatform = false; + this->IsAndroid = false; this->IsApple = false; this->IsImportedTarget = false; this->BuildInterfaceIncludesAppended = false; @@ -312,6 +313,11 @@ void cmTarget::SetMakefile(cmMakefile* mf) this->Makefile->IsOn("CYGWIN") || this->Makefile->IsOn("MINGW")); + // Check whether we are targeting an Android platform. + this->IsAndroid = + strcmp(this->Makefile->GetSafeDefinition("CMAKE_SYSTEM_NAME"), + "Android") == 0; + // Check whether we are targeting an Apple platform. this->IsApple = this->Makefile->IsOn("APPLE"); |