diff options
author | Gregor Jasny <gjasny@googlemail.com> | 2017-04-19 17:10:09 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-04-20 14:22:33 (GMT) |
commit | cf320f7cd74eeb87437f737e6e977f2231e109a1 (patch) | |
tree | b5311bf666cbf9324bbacc446b787658566b5e24 /Source/cmNinjaNormalTargetGenerator.cxx | |
parent | 44f0d2d9913595e214048b6d5a2b9ab2e9d1cf46 (diff) | |
download | CMake-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.cxx | 24 |
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 |