diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-02-07 14:38:49 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-02-07 14:49:15 (GMT) |
commit | 770245e9287de01c990605b54d28302c9cac3340 (patch) | |
tree | 6cae091e719e93975a2b2a1b62765206be239b07 /Tests | |
parent | 53cffda228e50948e52ae3b5bc46d4fa3f59a0ba (diff) | |
download | CMake-770245e9287de01c990605b54d28302c9cac3340.zip CMake-770245e9287de01c990605b54d28302c9cac3340.tar.gz CMake-770245e9287de01c990605b54d28302c9cac3340.tar.bz2 |
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.
Diffstat (limited to 'Tests')
5 files changed, 14 insertions, 1 deletions
diff --git a/Tests/RunCMake/interface_library/RunCMakeTest.cmake b/Tests/RunCMake/interface_library/RunCMakeTest.cmake index 9ca9a77..3c457c5 100644 --- a/Tests/RunCMake/interface_library/RunCMakeTest.cmake +++ b/Tests/RunCMake/interface_library/RunCMakeTest.cmake @@ -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) diff --git a/Tests/RunCMake/interface_library/global-interface-result.txt b/Tests/RunCMake/interface_library/global-interface-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/interface_library/global-interface-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/interface_library/global-interface-stderr.txt b/Tests/RunCMake/interface_library/global-interface-stderr.txt new file mode 100644 index 0000000..24edd0f --- /dev/null +++ b/Tests/RunCMake/interface_library/global-interface-stderr.txt @@ -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\) diff --git a/Tests/RunCMake/interface_library/global-interface.cmake b/Tests/RunCMake/interface_library/global-interface.cmake new file mode 100644 index 0000000..d2bfc64 --- /dev/null +++ b/Tests/RunCMake/interface_library/global-interface.cmake @@ -0,0 +1,2 @@ + +add_library(iface GLOBAL INTERFACE) diff --git a/Tests/RunCMake/interface_library/invalid_signature.cmake b/Tests/RunCMake/interface_library/invalid_signature.cmake index 67e3267..4e53534 100644 --- a/Tests/RunCMake/interface_library/invalid_signature.cmake +++ b/Tests/RunCMake/interface_library/invalid_signature.cmake @@ -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) |