summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-10-16 13:40:30 (GMT)
committerBrad King <brad.king@kitware.com>2020-12-10 12:06:20 (GMT)
commit1902d28ebc50ee93acb1be2320b79f2e844f7f41 (patch)
tree4edd3206a52bdbdaac2b8e7a38a2575e99b92da0 /Source/cmLocalGenerator.h
parente4034eabe930fb677fb9b5c65cf29336d1ff123c (diff)
downloadCMake-1902d28ebc50ee93acb1be2320b79f2e844f7f41.zip
CMake-1902d28ebc50ee93acb1be2320b79f2e844f7f41.tar.gz
CMake-1902d28ebc50ee93acb1be2320b79f2e844f7f41.tar.bz2
cmLocalGenerator: Refactor UpdateOutputToSourceMap to avoid boolean trap
Diffstat (limited to 'Source/cmLocalGenerator.h')
-rw-r--r--Source/cmLocalGenerator.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 09e820a..9ed3b15 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -368,12 +368,18 @@ public:
void AddTargetByproducts(cmTarget* target,
const std::vector<std::string>& byproducts);
+ enum class OutputRole
+ {
+ Primary,
+ Byproduct,
+ };
+
/**
* Add source file outputs.
*/
void AddSourceOutputs(cmSourceFile* source,
- const std::vector<std::string>& outputs,
- const std::vector<std::string>& byproducts);
+ std::vector<std::string> const& outputs,
+ OutputRole role);
/**
* Return the target if the provided source name is a byproduct of a utility
@@ -609,7 +615,7 @@ private:
void UpdateOutputToSourceMap(std::string const& byproduct, cmTarget* target);
void UpdateOutputToSourceMap(std::string const& output, cmSourceFile* source,
- bool byproduct);
+ OutputRole role);
void AddSharedFlags(std::string& flags, const std::string& lang,
bool shared);