summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorTarget.h
diff options
context:
space:
mode:
authorDeniz Bahadir <dbahadir@benocs.com>2020-09-22 14:04:26 +0200
committerBrad King <brad.king@kitware.com>2020-09-23 10:05:55 -0400
commit2f76e7429b96ae05e5f63d6458555a06b19c62e5 (patch)
tree8496837a64a4165fa340017e45d6fc43bcaa780b /Source/cmGeneratorTarget.h
parentd575ecc9dedd214ebd941913b81124a674be5008 (diff)
downloadcmake-2f76e7429b96ae05e5f63d6458555a06b19c62e5.tar.gz
OBJECT libraries: Properly recognize if sources depend on configuration
Fixes: #21198
Diffstat (limited to 'Source/cmGeneratorTarget.h')
-rw-r--r--Source/cmGeneratorTarget.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 4741b2a2de..8e0def71d5 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -713,6 +713,10 @@ public:
bool GetImplibGNUtoMS(std::string const& config, std::string const& gnuName,
std::string& out, const char* newExt = nullptr) const;
+ /** Can only ever return true if GetSourceFilePaths() was called before.
+ Otherwise, this is indeterminate and false will be assumed/returned! */
+ bool HasContextDependentSources() const;
+
bool IsExecutableWithExports() const;
/** Return whether or not the target has a DLL import library. */
@@ -1069,8 +1073,14 @@ private:
mutable bool DebugLinkDirectoriesDone;
mutable bool DebugPrecompileHeadersDone;
mutable bool DebugSourcesDone;
- mutable bool SourcesAreContextDependent;
mutable bool UtilityItemsDone;
+ enum class Tribool
+ {
+ False = 0x0,
+ True = 0x1,
+ Indeterminate = 0x2
+ };
+ mutable Tribool SourcesAreContextDependent;
bool ComputePDBOutputDir(const std::string& kind, const std::string& config,
std::string& out) const;