Tests: Add test for TARGET_MESSAGES global property
This commit is contained in:
parent
1d3984780d
commit
f0cad1939f
|
@ -103,6 +103,9 @@ add_RunCMake_test(CMP0055)
|
||||||
add_RunCMake_test(CMP0057)
|
add_RunCMake_test(CMP0057)
|
||||||
add_RunCMake_test(CMP0059)
|
add_RunCMake_test(CMP0059)
|
||||||
add_RunCMake_test(CMP0060)
|
add_RunCMake_test(CMP0060)
|
||||||
|
if(CMAKE_GENERATOR MATCHES "Make")
|
||||||
|
add_RunCMake_test(Make)
|
||||||
|
endif()
|
||||||
if(CMAKE_GENERATOR STREQUAL "Ninja")
|
if(CMAKE_GENERATOR STREQUAL "Ninja")
|
||||||
add_RunCMake_test(Ninja)
|
add_RunCMake_test(Ninja)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
cmake_minimum_required(VERSION 3.3)
|
||||||
|
project(${RunCMake_TEST} NONE)
|
||||||
|
include(${RunCMake_TEST}.cmake)
|
|
@ -0,0 +1,17 @@
|
||||||
|
include(RunCMake)
|
||||||
|
|
||||||
|
function(run_TargetMessages case)
|
||||||
|
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/TargetMessages-${case}-build)
|
||||||
|
set(RunCMake_TEST_NO_CLEAN 1)
|
||||||
|
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
|
||||||
|
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
|
||||||
|
set(RunCMake_TEST_OPTIONS "${ARGN}")
|
||||||
|
run_cmake(TargetMessages-${case})
|
||||||
|
run_cmake_command(TargetMessages-${case}-build ${CMAKE_COMMAND} --build .)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
run_TargetMessages(ON)
|
||||||
|
run_TargetMessages(OFF)
|
||||||
|
|
||||||
|
run_TargetMessages(VAR-ON -DCMAKE_TARGET_MESSAGES=ON)
|
||||||
|
run_TargetMessages(VAR-OFF -DCMAKE_TARGET_MESSAGES=OFF)
|
|
@ -0,0 +1,5 @@
|
||||||
|
^(([^B]|B[^u]|Bu[^i]|Bui[^l]|Buil[^t]|Built[^ ])[^
|
||||||
|
]*
|
||||||
|
)*Scanning dependencies of target CustomTarget(
|
||||||
|
([^B]|B[^u]|Bu[^i]|Bui[^l]|Buil[^t]|Built[^ ])[^
|
||||||
|
]*)*$
|
|
@ -0,0 +1,2 @@
|
||||||
|
set_property(GLOBAL PROPERTY TARGET_MESSAGES OFF)
|
||||||
|
add_custom_target(CustomTarget ALL)
|
|
@ -0,0 +1,8 @@
|
||||||
|
^(([^B]|B[^u]|Bu[^i]|Bui[^l]|Buil[^t]|Built[^ ])[^
|
||||||
|
]*
|
||||||
|
)*Scanning dependencies of target CustomTarget(
|
||||||
|
([^B]|B[^u]|Bu[^i]|Bui[^l]|Buil[^t]|Built[^ ])[^
|
||||||
|
]*)*
|
||||||
|
Built target CustomTarget(
|
||||||
|
([^B]|B[^u]|Bu[^i]|Bui[^l]|Buil[^t]|Built[^ ])[^
|
||||||
|
]*)*$
|
|
@ -0,0 +1,2 @@
|
||||||
|
set_property(GLOBAL PROPERTY TARGET_MESSAGES ON)
|
||||||
|
add_custom_target(CustomTarget ALL)
|
|
@ -0,0 +1,5 @@
|
||||||
|
^(([^B]|B[^u]|Bu[^i]|Bui[^l]|Buil[^t]|Built[^ ])[^
|
||||||
|
]*
|
||||||
|
)*Scanning dependencies of target CustomTarget(
|
||||||
|
([^B]|B[^u]|Bu[^i]|Bui[^l]|Buil[^t]|Built[^ ])[^
|
||||||
|
]*)*$
|
|
@ -0,0 +1 @@
|
||||||
|
add_custom_target(CustomTarget ALL)
|
|
@ -0,0 +1,8 @@
|
||||||
|
^(([^B]|B[^u]|Bu[^i]|Bui[^l]|Buil[^t]|Built[^ ])[^
|
||||||
|
]*
|
||||||
|
)*Scanning dependencies of target CustomTarget(
|
||||||
|
([^B]|B[^u]|Bu[^i]|Bui[^l]|Buil[^t]|Built[^ ])[^
|
||||||
|
]*)*
|
||||||
|
Built target CustomTarget(
|
||||||
|
([^B]|B[^u]|Bu[^i]|Bui[^l]|Buil[^t]|Built[^ ])[^
|
||||||
|
]*)*$
|
|
@ -0,0 +1 @@
|
||||||
|
add_custom_target(CustomTarget ALL)
|
Loading…
Reference in New Issue