diff options
author | Brad King <brad.king@kitware.com> | 2014-03-04 18:06:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-04 18:12:47 (GMT) |
commit | 971653b767f2e5e81085c525c94d5e596474aa88 (patch) | |
tree | 93fc5f62c98c5d6380de02a44f3e6ef690dfe838 | |
parent | 0c0ef9e7b7016f8ce6310c30660151b15e062a93 (diff) | |
download | CMake-971653b767f2e5e81085c525c94d5e596474aa88.zip CMake-971653b767f2e5e81085c525c94d5e596474aa88.tar.gz CMake-971653b767f2e5e81085c525c94d5e596474aa88.tar.bz2 |
cmLocalGenerator: Add format option to ConvertToLinkReference
Replace the hard-coded SHELL output format with an optional argument.
-rw-r--r-- | Source/cmLocalGenerator.cxx | 7 | ||||
-rw-r--r-- | Source/cmLocalGenerator.h | 3 | ||||
-rw-r--r-- | Source/cmLocalNinjaGenerator.cxx | 5 | ||||
-rw-r--r-- | Source/cmLocalNinjaGenerator.h | 3 |
4 files changed, 11 insertions, 7 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 2090cc6..1372c2a 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1759,7 +1759,8 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs, } } -std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib) +std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib, + OutputFormat format) { #if defined(_WIN32) && !defined(__CYGWIN__) // Work-ardound command line parsing limitations in MSVC 6.0 and @@ -1781,14 +1782,14 @@ std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib) sp += lib.substr(pos); // Convert to an output path. - return this->Convert(sp.c_str(), NONE, SHELL); + return this->Convert(sp.c_str(), NONE, format); } } } #endif // Normal behavior. - return this->Convert(lib.c_str(), START_OUTPUT, SHELL); + return this->Convert(lib.c_str(), START_OUTPUT, format); } /** diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 986f405..2a76124 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -415,7 +415,8 @@ protected: std::string FindRelativePathTopBinary(); void SetupPathConversions(); - virtual std::string ConvertToLinkReference(std::string const& lib); + virtual std::string ConvertToLinkReference(std::string const& lib, + OutputFormat format = SHELL); /** Check whether the native build system supports the given definition. Issues a warning. */ diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index c989cfb..862823f 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -143,9 +143,10 @@ cmGlobalNinjaGenerator* cmLocalNinjaGenerator::GetGlobalNinjaGenerator() // Virtual protected methods. std::string -cmLocalNinjaGenerator::ConvertToLinkReference(std::string const& lib) +cmLocalNinjaGenerator::ConvertToLinkReference(std::string const& lib, + OutputFormat format) { - return this->Convert(lib.c_str(), HOME_OUTPUT, SHELL); + return this->Convert(lib.c_str(), HOME_OUTPUT, format); } std::string diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index b3d3b6b..8b26806 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -97,7 +97,8 @@ public: void AppendCustomCommandDeps(const cmCustomCommand *cc, cmNinjaDeps &ninjaDeps); - virtual std::string ConvertToLinkReference(std::string const& lib); + virtual std::string ConvertToLinkReference(std::string const& lib, + OutputFormat format = SHELL); protected: |