mirror of
https://github.com/reactos/CMake.git
synced 2024-11-28 14:01:21 +00:00
Merge topic 'interface-library-signatures'
6d85a6a6
add_library: Issue better diagnostic for INTERFACE GLOBAL signature.770245e9
add_library: Test invalid GLOBAL INTERFACE signature.
This commit is contained in:
commit
6e149e1591
@ -173,6 +173,13 @@ bool cmAddLibraryCommand
|
||||
++s;
|
||||
importGlobal = true;
|
||||
}
|
||||
else if(type == cmTarget::INTERFACE_LIBRARY && *s == "GLOBAL")
|
||||
{
|
||||
cmOStringStream e;
|
||||
e << "GLOBAL option may only be used with IMPORTED libraries.";
|
||||
this->SetError(e.str().c_str());
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
|
@ -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)
|
||||
|
@ -0,0 +1 @@
|
||||
1
|
@ -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\)
|
2
Tests/RunCMake/interface_library/global-interface.cmake
Normal file
2
Tests/RunCMake/interface_library/global-interface.cmake
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
add_library(iface GLOBAL INTERFACE)
|
@ -84,6 +84,6 @@ Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
+
|
||||
CMake Error at invalid_signature.cmake:20 \(add_library\):
|
||||
add_library INTERFACE library requires no source arguments.
|
||||
add_library GLOBAL option may only be used with IMPORTED libraries.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user