summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2017-04-19 17:10:09 (GMT)
committerBrad King <brad.king@kitware.com>2017-04-20 14:22:33 (GMT)
commitcf320f7cd74eeb87437f737e6e977f2231e109a1 (patch)
treeb5311bf666cbf9324bbacc446b787658566b5e24 /Source/cmNinjaNormalTargetGenerator.cxx
parent44f0d2d9913595e214048b6d5a2b9ab2e9d1cf46 (diff)
downloadCMake-cf320f7cd74eeb87437f737e6e977f2231e109a1.zip
CMake-cf320f7cd74eeb87437f737e6e977f2231e109a1.tar.gz
CMake-cf320f7cd74eeb87437f737e6e977f2231e109a1.tar.bz2
Replace boolean `implib` parameters with enum
Named enumeration values are much clearer at call sites and add more type safety.
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx24
1 files changed, 10 insertions, 14 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index aaeb659..97b7f2a 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -491,10 +491,9 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd()
cmGeneratorTarget& gt = *this->GetGeneratorTarget();
const std::string cfgName = this->GetConfigName();
std::string targetOutput = ConvertToNinjaPath(gt.GetFullPath(cfgName));
- std::string targetOutputReal =
- this->ConvertToNinjaPath(gt.GetFullPath(cfgName,
- /*implib=*/false,
- /*realname=*/true));
+ std::string targetOutputReal = this->ConvertToNinjaPath(
+ gt.GetFullPath(cfgName, cmStateEnums::RuntimeBinaryArtifact,
+ /*realname=*/true));
cmakeCommand += targetOutputReal;
cmakeCommand += " || true";
linkCmds.push_back(cmakeCommand);
@@ -616,9 +615,8 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement()
std::string const targetOutputReal = ConvertToNinjaPath(
genTarget.ObjectDirectory + "cmake_device_link" + objExt);
- std::string const targetOutputImplib =
- ConvertToNinjaPath(genTarget.GetFullPath(cfgName,
- /*implib=*/true));
+ std::string const targetOutputImplib = ConvertToNinjaPath(
+ genTarget.GetFullPath(cfgName, cmStateEnums::ImportLibraryArtifact));
this->DeviceLinkObject = targetOutputReal;
@@ -788,13 +786,11 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
cmGeneratorTarget& gt = *this->GetGeneratorTarget();
const std::string cfgName = this->GetConfigName();
std::string targetOutput = ConvertToNinjaPath(gt.GetFullPath(cfgName));
- std::string targetOutputReal =
- ConvertToNinjaPath(gt.GetFullPath(cfgName,
- /*implib=*/false,
- /*realname=*/true));
- std::string targetOutputImplib =
- ConvertToNinjaPath(gt.GetFullPath(cfgName,
- /*implib=*/true));
+ std::string targetOutputReal = ConvertToNinjaPath(
+ gt.GetFullPath(cfgName, cmStateEnums::RuntimeBinaryArtifact,
+ /*realname=*/true));
+ std::string targetOutputImplib = ConvertToNinjaPath(
+ gt.GetFullPath(cfgName, cmStateEnums::ImportLibraryArtifact));
if (gt.IsAppBundleOnApple()) {
// Create the app bundle