add_library: Test invalid GLOBAL INTERFACE signature.

This has to be tested separately from the invalid_signature test because
target sources are evaluate at a later time, and earlier errors in the
invalid_signature test cause early exit.
This commit is contained in:
Stephen Kelly 2014-02-07 15:38:49 +01:00
parent 53cffda228
commit 770245e928
5 changed files with 14 additions and 1 deletions

View File

@ -5,5 +5,6 @@ run_cmake(target_commands)
run_cmake(no_shared_libs)
run_cmake(whitelist)
run_cmake(invalid_signature)
run_cmake(global-interface)
run_cmake(genex_link)
run_cmake(add_dependencies)

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1,9 @@
CMake Error at global-interface.cmake:2 \(add_library\):
Cannot find source file:
GLOBAL
Tried extensions \.c \.C \.c\+\+ \.cc \.cpp \.cxx \.m \.M \.mm \.h \.hh \.h\+\+ \.hm \.hpp
\.hxx \.in \.txx
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)

View File

@ -0,0 +1,2 @@
add_library(iface GLOBAL INTERFACE)

View File

@ -16,5 +16,5 @@ add_library(iface15 ALIAS INTERFACE)
add_library(iface16 INTERFACE INTERFACE)
add_library(iface17 INTERFACE EXCLUDE_FROM_ALL)
add_library(iface18 EXCLUDE_FROM_ALL INTERFACE)
add_library(iface19 GLOBAL INTERFACE)
# add_library(iface19 GLOBAL INTERFACE) Tested separately
add_library(iface20 INTERFACE GLOBAL)