Merge topic 'test-LINK_ONLY-expression'
53b10fd
Genex: Add a test for the LINK_ONLY expression.
This commit is contained in:
commit
110f244601
|
@ -0,0 +1 @@
|
||||||
|
^$
|
|
@ -0,0 +1,14 @@
|
||||||
|
|
||||||
|
project(CMP0022-NOWARN-static-NEW)
|
||||||
|
|
||||||
|
cmake_policy(SET CMP0022 NEW)
|
||||||
|
|
||||||
|
add_library(foo STATIC empty_vs6_1.cpp)
|
||||||
|
add_library(bar STATIC empty_vs6_2.cpp)
|
||||||
|
add_library(bat STATIC empty_vs6_3.cpp)
|
||||||
|
target_link_libraries(foo bar)
|
||||||
|
# The last element here needs to contain a space so that it is a single
|
||||||
|
# element which is not a valid target name. As bar is a STATIC library,
|
||||||
|
# this tests that the LINK_ONLY generator expression is not used for
|
||||||
|
# that element, creating an error.
|
||||||
|
target_link_libraries(bar LINK_PRIVATE bat "-lz -lm")
|
|
@ -5,8 +5,4 @@ add_library(foo STATIC empty_vs6_1.cpp)
|
||||||
add_library(bar STATIC empty_vs6_2.cpp)
|
add_library(bar STATIC empty_vs6_2.cpp)
|
||||||
add_library(bat STATIC empty_vs6_3.cpp)
|
add_library(bat STATIC empty_vs6_3.cpp)
|
||||||
target_link_libraries(foo bar)
|
target_link_libraries(foo bar)
|
||||||
# The last element here needs to contain a space so that it is a single
|
target_link_libraries(bar bat)
|
||||||
# element which is not a valid target name. As bar is a STATIC library,
|
|
||||||
# this tests that the LINK_ONLY generator expression is not used for
|
|
||||||
# that element, creating an error.
|
|
||||||
target_link_libraries(bar bat "-lz -lm")
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ run_cmake(CMP0022-WARN-empty-old)
|
||||||
run_cmake(CMP0022-NOWARN-exe)
|
run_cmake(CMP0022-NOWARN-exe)
|
||||||
run_cmake(CMP0022-NOWARN-shared)
|
run_cmake(CMP0022-NOWARN-shared)
|
||||||
run_cmake(CMP0022-NOWARN-static)
|
run_cmake(CMP0022-NOWARN-static)
|
||||||
|
run_cmake(CMP0022-NOWARN-static-NEW)
|
||||||
run_cmake(CMP0022-NOWARN-static-link_libraries)
|
run_cmake(CMP0022-NOWARN-static-link_libraries)
|
||||||
run_cmake(CMP0022-export)
|
run_cmake(CMP0022-export)
|
||||||
run_cmake(CMP0022-export-exe)
|
run_cmake(CMP0022-export-exe)
|
||||||
|
|
Loading…
Reference in New Issue