[Cmake-commits] CMake branch, next, updated. v2.8.12.1-5962-ge099699
Stephen Kelly
steveire at gmail.com
Mon Dec 2 11:30:13 EST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via e0996995ea2295bebdfa0f68433b3b3dce5ecdb8 (commit)
via 60bd515d97e2a280781344211cae8518b581b7f4 (commit)
via f282a0bf83acd3e997b55967524fbd487bb6c881 (commit)
from 95163cf3657f3d37afb3fd8234936f7edab8c74b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e0996995ea2295bebdfa0f68433b3b3dce5ecdb8
commit e0996995ea2295bebdfa0f68433b3b3dce5ecdb8
Merge: 95163cf 60bd515
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Dec 2 11:30:08 2013 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Dec 2 11:30:08 2013 -0500
Merge topic 'fix-export-segfault' into next
60bd515 export(): Check targets exist at configure-time (#14608).
f282a0b CMake Nightly Date Stamp
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=60bd515d97e2a280781344211cae8518b581b7f4
commit 60bd515d97e2a280781344211cae8518b581b7f4
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Dec 2 17:18:29 2013 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Dec 2 17:29:06 2013 +0100
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.
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()
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 209b0b3..407f965 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -98,6 +98,7 @@ add_RunCMake_test(Syntax)
add_RunCMake_test(add_dependencies)
add_RunCMake_test(build_command)
+add_RunCMake_test(export)
add_RunCMake_test(cmake_minimum_required)
add_RunCMake_test(find_package)
add_RunCMake_test(get_filename_component)
diff --git a/Tests/RunCMake/export/CMakeLists.txt b/Tests/RunCMake/export/CMakeLists.txt
new file mode 100644
index 0000000..be9d403
--- /dev/null
+++ b/Tests/RunCMake/export/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 2.8.4)
+project(${RunCMake_TEST})
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/export/RunCMakeTest.cmake b/Tests/RunCMake/export/RunCMakeTest.cmake
new file mode 100644
index 0000000..b8d3f27
--- /dev/null
+++ b/Tests/RunCMake/export/RunCMakeTest.cmake
@@ -0,0 +1,3 @@
+include(RunCMake)
+
+run_cmake(TargetNotFound)
diff --git a/Tests/RunCMake/export/TargetNotFound-result.txt b/Tests/RunCMake/export/TargetNotFound-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/export/TargetNotFound-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/export/TargetNotFound-stderr.txt b/Tests/RunCMake/export/TargetNotFound-stderr.txt
new file mode 100644
index 0000000..ed24cee
--- /dev/null
+++ b/Tests/RunCMake/export/TargetNotFound-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at TargetNotFound.cmake:5 \(export\):
+ export given target "nonexistenttarget" which is not built by this project.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/export/TargetNotFound.cmake b/Tests/RunCMake/export/TargetNotFound.cmake
new file mode 100644
index 0000000..48be0c5
--- /dev/null
+++ b/Tests/RunCMake/export/TargetNotFound.cmake
@@ -0,0 +1,5 @@
+cmake_minimum_required(VERSION 2.8)
+
+project(TargetNotFound)
+
+export(TARGETS nonexistenttarget FILE somefile.cmake)
-----------------------------------------------------------------------
Summary of changes:
Source/CMakeVersion.cmake | 2 +-
Source/cmExportCommand.cxx | 8 ++++++++
Tests/RunCMake/CMakeLists.txt | 1 +
.../{ObjectLibrary => export}/CMakeLists.txt | 2 +-
Tests/RunCMake/export/RunCMakeTest.cmake | 3 +++
.../TargetNotFound-result.txt} | 0
Tests/RunCMake/export/TargetNotFound-stderr.txt | 4 ++++
Tests/RunCMake/export/TargetNotFound.cmake | 5 +++++
8 files changed, 23 insertions(+), 2 deletions(-)
copy Tests/RunCMake/{ObjectLibrary => export}/CMakeLists.txt (71%)
create mode 100644 Tests/RunCMake/export/RunCMakeTest.cmake
copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => export/TargetNotFound-result.txt} (100%)
create mode 100644 Tests/RunCMake/export/TargetNotFound-stderr.txt
create mode 100644 Tests/RunCMake/export/TargetNotFound.cmake
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list