diff options
author | Brad King <brad.king@kitware.com> | 2013-11-01 17:39:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-11-01 18:46:58 (GMT) |
commit | 5a2fc3d69659717e530becddb3cbebb04583f4e9 (patch) | |
tree | 49d3bde53aa85a08522a4a02ef188d757d8d4a21 /Tests/RunCMake/ObjectLibrary | |
parent | c515dc574879448d66e2c5a27b9807d95a27fefd (diff) | |
download | CMake-5a2fc3d69659717e530becddb3cbebb04583f4e9.zip CMake-5a2fc3d69659717e530becddb3cbebb04583f4e9.tar.gz CMake-5a2fc3d69659717e530becddb3cbebb04583f4e9.tar.bz2 |
Check for OBJECT_LIBRARY source files at start of generation
Teach cmGlobalGenerator::CheckTargets to include OBJECT_LIBRARY targets
in the check for source file existence.
Extend the RunCMake.ObjectLibrary test to cover this case.
Diffstat (limited to 'Tests/RunCMake/ObjectLibrary')
4 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource-result.txt b/Tests/RunCMake/ObjectLibrary/MissingSource-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/ObjectLibrary/MissingSource-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt new file mode 100644 index 0000000..411cd7c --- /dev/null +++ b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at MissingSource.cmake:1 \(add_library\): + Cannot find source file: + + missing.c + + Tried extensions( \.[A-Za-z+]+| + )* +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource.cmake b/Tests/RunCMake/ObjectLibrary/MissingSource.cmake new file mode 100644 index 0000000..258eaed --- /dev/null +++ b/Tests/RunCMake/ObjectLibrary/MissingSource.cmake @@ -0,0 +1 @@ +add_library(A OBJECT missing.c) diff --git a/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake b/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake index 55db14d..2dd8d38 100644 --- a/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake +++ b/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake @@ -12,6 +12,7 @@ run_cmake(Install) run_cmake(LinkObjLHS) run_cmake(LinkObjRHS1) run_cmake(LinkObjRHS2) +run_cmake(MissingSource) run_cmake(ObjWithObj) run_cmake(PostBuild) run_cmake(PreBuild) |