Merge topic 'object-library-missing-source'

5a2fc3d Check for OBJECT_LIBRARY source files at start of generation
This commit is contained in:
Brad King 2013-11-02 10:54:15 -04:00 committed by CMake Topic Stage
commit 53ac9b8d86
5 changed files with 13 additions and 0 deletions

View File

@ -1242,6 +1242,7 @@ bool cmGlobalGenerator::CheckTargets()
target.GetType() == cmTarget::STATIC_LIBRARY ||
target.GetType() == cmTarget::SHARED_LIBRARY ||
target.GetType() == cmTarget::MODULE_LIBRARY ||
target.GetType() == cmTarget::OBJECT_LIBRARY ||
target.GetType() == cmTarget::UTILITY)
{
if(!target.FindSourceFiles())

View File

@ -0,0 +1 @@
1

View File

@ -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\)

View File

@ -0,0 +1 @@
add_library(A OBJECT missing.c)

View File

@ -11,6 +11,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)