diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-08-04 21:48:58 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-08-26 17:46:10 (GMT) |
commit | d051086ccec5cd4b381cf47afb0e7fe962ed4c0b (patch) | |
tree | f75c2f09a92e0d3a15cb3849bf5d8c84a3ab8cc2 /Source/cmTarget.cxx | |
parent | db4cb92bda8b43c3d66d27533622bb802e823589 (diff) | |
download | CMake-d051086ccec5cd4b381cf47afb0e7fe962ed4c0b.zip CMake-d051086ccec5cd4b381cf47afb0e7fe962ed4c0b.tar.gz CMake-d051086ccec5cd4b381cf47afb0e7fe962ed4c0b.tar.bz2 |
cmGeneratorTarget: Move compile features processing from cmTarget.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 85 |
1 files changed, 10 insertions, 75 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 9e13ea0..4ddbcb3 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -143,7 +143,6 @@ public: std::vector<cmListFileBacktrace> CompileOptionsBacktraces; std::vector<std::string> CompileFeaturesEntries; std::vector<cmListFileBacktrace> CompileFeaturesBacktraces; - std::vector<TargetPropertyEntry*> CompileFeaturesItems; std::vector<std::string> CompileDefinitionsEntries; std::vector<cmListFileBacktrace> CompileDefinitionsBacktraces; std::vector<TargetPropertyEntry*> CompileDefinitionsItems; @@ -175,7 +174,6 @@ cmTarget::cmTarget() this->IsApple = false; this->IsImportedTarget = false; this->BuildInterfaceIncludesAppended = false; - this->DebugCompileFeaturesDone = false; this->DebugCompileDefinitionsDone = false; this->DebugSourcesDone = false; this->LinkImplementationLanguageIsContextDependent = true; @@ -422,11 +420,6 @@ void CreatePropertyGeneratorExpressions( void cmTarget::Compute() { CreatePropertyGeneratorExpressions( - this->Internal->CompileFeaturesEntries, - this->Internal->CompileFeaturesBacktraces, - this->Internal->CompileFeaturesItems); - - CreatePropertyGeneratorExpressions( this->Internal->CompileDefinitionsEntries, this->Internal->CompileDefinitionsBacktraces, this->Internal->CompileDefinitionsItems); @@ -1325,6 +1318,16 @@ cmBacktraceRange cmTarget::GetCompileOptionsBacktraces() const return cmMakeRange(this->Internal->CompileOptionsBacktraces); } +cmStringRange cmTarget::GetCompileFeaturesEntries() const +{ + return cmMakeRange(this->Internal->CompileFeaturesEntries); +} + +cmBacktraceRange cmTarget::GetCompileFeaturesBacktraces() const +{ + return cmMakeRange(this->Internal->CompileFeaturesBacktraces); +} + #if defined(_WIN32) && !defined(__CYGWIN__) //---------------------------------------------------------------------------- void @@ -2072,73 +2075,6 @@ void cmTarget::GetCompileDefinitions(std::vector<std::string> &list, } //---------------------------------------------------------------------------- -static void processCompileFeatures(cmTarget const* tgt, - const std::vector<cmTargetInternals::TargetPropertyEntry*> &entries, - std::vector<std::string> &options, - UNORDERED_SET<std::string> &uniqueOptions, - cmGeneratorExpressionDAGChecker *dagChecker, - const std::string& config, bool debugOptions) -{ - processCompileOptionsInternal(tgt, entries, options, uniqueOptions, - dagChecker, config, debugOptions, "features", - std::string()); -} - -//---------------------------------------------------------------------------- -void cmTarget::GetCompileFeatures(std::vector<std::string> &result, - const std::string& config) const -{ - UNORDERED_SET<std::string> uniqueFeatures; - - cmGeneratorExpressionDAGChecker dagChecker(this->GetName(), - "COMPILE_FEATURES", - 0, 0); - - std::vector<std::string> debugProperties; - const char *debugProp = - this->Makefile->GetDefinition("CMAKE_DEBUG_TARGET_PROPERTIES"); - if (debugProp) - { - cmSystemTools::ExpandListArgument(debugProp, debugProperties); - } - - bool debugFeatures = !this->DebugCompileFeaturesDone - && std::find(debugProperties.begin(), - debugProperties.end(), - "COMPILE_FEATURES") - != debugProperties.end(); - - if (this->Makefile->IsConfigured()) - { - this->DebugCompileFeaturesDone = true; - } - - processCompileFeatures(this, - this->Internal->CompileFeaturesItems, - result, - uniqueFeatures, - &dagChecker, - config, - debugFeatures); - - std::vector<cmTargetInternals::TargetPropertyEntry*> - linkInterfaceCompileFeaturesEntries; - this->Internal->AddInterfaceEntries( - this, config, "INTERFACE_COMPILE_FEATURES", - linkInterfaceCompileFeaturesEntries); - - processCompileFeatures(this, - linkInterfaceCompileFeaturesEntries, - result, - uniqueFeatures, - &dagChecker, - config, - debugFeatures); - - cmDeleteAll(linkInterfaceCompileFeaturesEntries); -} - -//---------------------------------------------------------------------------- void cmTarget::MaybeInvalidatePropertyCache(const std::string& prop) { // Wipe out maps caching information affected by this property. @@ -4098,7 +4034,6 @@ cmTargetInternalPointer //---------------------------------------------------------------------------- cmTargetInternalPointer::~cmTargetInternalPointer() { - cmDeleteAll(this->Pointer->CompileFeaturesItems); cmDeleteAll(this->Pointer->CompileDefinitionsItems); cmDeleteAll(this->Pointer->SourceEntries); delete this->Pointer; |