diff options
author | Hyper Nova Sun <hypernovasun@icloud.com> | 2022-04-08 20:22:08 (GMT) |
---|---|---|
committer | Hyper Nova Sun <hypernovasun@icloud.com> | 2022-04-11 21:10:29 (GMT) |
commit | 41ba35a42b177db14358390e50857eb2554a3873 (patch) | |
tree | 0f758fe4a2a5cb67a0f7c82b0521027b129da41b /Source/cmInstallCommand.cxx | |
parent | 7fc248bde34c529c6f1312a56c7e82303238b9c1 (diff) | |
download | CMake-41ba35a42b177db14358390e50857eb2554a3873.zip CMake-41ba35a42b177db14358390e50857eb2554a3873.tar.gz CMake-41ba35a42b177db14358390e50857eb2554a3873.tar.bz2 |
cmTarget: Add `HasKnownObjectFileLocation()` shorthand
Allow `cmGlobalGenerator`s to decide `HasKnownObjectFileLocation()` per given
`cmTarget`
- `cmGlobalGenerator::HasKnownObjectFileLocation()` now takes an optional `cmGeneratorTarget`
- `cmTarget::HasKnownObjectFileLocation()` added as a shorthand
Diffstat (limited to 'Source/cmInstallCommand.cxx')
-rw-r--r-- | Source/cmInstallCommand.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 1ed698d..7de2cb1 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -919,8 +919,7 @@ bool HandleTargetsMode(std::vector<std::string> const& args, if (!objectArgs.GetDestination().empty()) { // Verify that we know where the objects are to install them. std::string reason; - if (!helper.Makefile->GetGlobalGenerator() - ->HasKnownObjectFileLocation(&reason)) { + if (!target.HasKnownObjectFileLocation(&reason)) { status.SetError( cmStrCat("TARGETS given OBJECT library \"", target.GetName(), "\" whose objects may not be installed", reason, ".")); |