diff options
author | Brad King <brad.king@kitware.com> | 2017-12-05 13:17:24 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-12-05 13:17:30 (GMT) |
commit | 83068cb1edb3258af9315b5e73e674717a829531 (patch) | |
tree | aa29f3786f7a60b35260696c3bc87b062f313654 /Source | |
parent | 729dda542010ed584d08630d2e5ab1ff3129e5e8 (diff) | |
parent | 2c06e9e73ed2214f0f96e392ca2a35f74ee6efa6 (diff) | |
download | CMake-83068cb1edb3258af9315b5e73e674717a829531.zip CMake-83068cb1edb3258af9315b5e73e674717a829531.tar.gz CMake-83068cb1edb3258af9315b5e73e674717a829531.tar.bz2 |
Merge topic 'include_external_ms_project_support_non_windows_target'
2c06e9e7 include_external_msproject: Support non-Windows target platforms
c89e8522 cmGlobalGenerator: Add IsIncludeExternalMSProjectSupported method
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1525
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalGenerator.h | 4 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.h | 2 | ||||
-rw-r--r-- | Source/cmIncludeExternalMSProjectCommand.cxx | 5 |
3 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 99f33e5..92e6a29 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -358,6 +358,10 @@ public: virtual bool IsIPOSupported() const { return false; } + /** Return whether the generator can import external visual studio project + using INCLUDE_EXTERNAL_MSPROJECT */ + virtual bool IsIncludeExternalMSProjectSupported() const { return false; } + /** Return whether the generator should use EFFECTIVE_PLATFORM_NAME. This is relevant for mixed macOS and iOS builds. */ virtual bool UseEffectivePlatformName(cmMakefile*) const { return false; } diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index 55a6813..f4fc3cf 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -101,6 +101,8 @@ public: /** Return true if building for Windows CE */ virtual bool TargetsWindowsCE() const { return false; } + bool IsIncludeExternalMSProjectSupported() const override { return true; } + class TargetSet : public std::set<cmGeneratorTarget const*> { }; diff --git a/Source/cmIncludeExternalMSProjectCommand.cxx b/Source/cmIncludeExternalMSProjectCommand.cxx index bd16b1d..85e8cd3 100644 --- a/Source/cmIncludeExternalMSProjectCommand.cxx +++ b/Source/cmIncludeExternalMSProjectCommand.cxx @@ -3,6 +3,7 @@ #include "cmIncludeExternalMSProjectCommand.h" #ifdef _WIN32 +#include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmStateTypes.h" #include "cmSystemTools.h" @@ -22,7 +23,9 @@ bool cmIncludeExternalMSProjectCommand::InitialPass( } // only compile this for win32 to avoid coverage errors #ifdef _WIN32 - if (this->Makefile->GetDefinition("WIN32")) { + if (this->Makefile->GetDefinition("WIN32") || + this->Makefile->GetGlobalGenerator() + ->IsIncludeExternalMSProjectSupported()) { enum Doing { DoingNone, |