diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-12-02 16:18:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-12-04 13:30:26 (GMT) |
commit | 1cd1430b1fb0df91ff97d4ba3f360cdee0f56ce2 (patch) | |
tree | 84cbf932de5057c9cacc9c743b1e5fdd3bd7781d /Source | |
parent | f282a0bf83acd3e997b55967524fbd487bb6c881 (diff) | |
download | CMake-1cd1430b1fb0df91ff97d4ba3f360cdee0f56ce2.zip CMake-1cd1430b1fb0df91ff97d4ba3f360cdee0f56ce2.tar.gz CMake-1cd1430b1fb0df91ff97d4ba3f360cdee0f56ce2.tar.bz2 |
export(): Check targets exist at configure-time (#14608)
Commit 66b290e7 (export(): Process the export() command at generate
time., 2012-10-06 ) refactored export() so that it could evaluate
strings at generate-time. This was intended for evaluating target
properties, but that commit also removed a check for target
existence at configure-time. Restore that check and add a test for
this case.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmExportCommand.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index 86ddc3f..3f6bc2e 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -135,6 +135,14 @@ bool cmExportCommand return false; } } + else + { + cmOStringStream e; + e << "given target \"" << *currentTarget + << "\" which is not built by this project."; + this->SetError(e.str().c_str()); + return false; + } } cmGlobalGenerator *gg = this->Makefile->GetLocalGenerator() |