diff options
Diffstat (limited to 'Tests/RunCMake/Make')
-rw-r--r-- | Tests/RunCMake/Make/CMP0113-Common.cmake | 17 | ||||
-rw-r--r-- | Tests/RunCMake/Make/CMP0113-NEW-build-gnu-stderr.txt | 5 | ||||
-rw-r--r-- | Tests/RunCMake/Make/CMP0113-NEW-build-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Make/CMP0113-NEW-build-stderr.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Make/CMP0113-NEW-build-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Make/CMP0113-NEW.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Make/CMP0113-OLD-build-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Make/CMP0113-OLD.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Make/CMP0113-WARN-build-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Make/CMP0113-WARN.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/Make/RunCMakeTest.cmake | 22 |
11 files changed, 55 insertions, 0 deletions
diff --git a/Tests/RunCMake/Make/CMP0113-Common.cmake b/Tests/RunCMake/Make/CMP0113-Common.cmake new file mode 100644 index 0000000000..8ce26c4c7e --- /dev/null +++ b/Tests/RunCMake/Make/CMP0113-Common.cmake @@ -0,0 +1,17 @@ +add_custom_command( + OUTPUT output-not-created + COMMAND ${CMAKE_COMMAND} -E echo output-not-created + DEPENDS ${CMAKE_CURRENT_LIST_FILE} + VERBATIM + ) + +add_custom_command( + OUTPUT output-created + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_FILE} output-created + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/output-not-created + VERBATIM + ) + +add_custom_target(drive1 ALL DEPENDS output-not-created) +add_custom_target(drive2 ALL DEPENDS output-created) +add_dependencies(drive2 drive1) diff --git a/Tests/RunCMake/Make/CMP0113-NEW-build-gnu-stderr.txt b/Tests/RunCMake/Make/CMP0113-NEW-build-gnu-stderr.txt new file mode 100644 index 0000000000..0af354a05e --- /dev/null +++ b/Tests/RunCMake/Make/CMP0113-NEW-build-gnu-stderr.txt @@ -0,0 +1,5 @@ +No rule to make target [^ +]*output-not-created[^ +]*, needed by [^ +]*output-created[^ +]* diff --git a/Tests/RunCMake/Make/CMP0113-NEW-build-result.txt b/Tests/RunCMake/Make/CMP0113-NEW-build-result.txt new file mode 100644 index 0000000000..d197c913c2 --- /dev/null +++ b/Tests/RunCMake/Make/CMP0113-NEW-build-result.txt @@ -0,0 +1 @@ +[^0] diff --git a/Tests/RunCMake/Make/CMP0113-NEW-build-stderr.txt b/Tests/RunCMake/Make/CMP0113-NEW-build-stderr.txt new file mode 100644 index 0000000000..8d98f9debd --- /dev/null +++ b/Tests/RunCMake/Make/CMP0113-NEW-build-stderr.txt @@ -0,0 +1 @@ +.* diff --git a/Tests/RunCMake/Make/CMP0113-NEW-build-stdout.txt b/Tests/RunCMake/Make/CMP0113-NEW-build-stdout.txt new file mode 100644 index 0000000000..a6b851e9f5 --- /dev/null +++ b/Tests/RunCMake/Make/CMP0113-NEW-build-stdout.txt @@ -0,0 +1 @@ +Generating output-not-created.*Built target drive1 diff --git a/Tests/RunCMake/Make/CMP0113-NEW.cmake b/Tests/RunCMake/Make/CMP0113-NEW.cmake new file mode 100644 index 0000000000..a2d1db53f3 --- /dev/null +++ b/Tests/RunCMake/Make/CMP0113-NEW.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0113 NEW) +include(CMP0113-Common.cmake) diff --git a/Tests/RunCMake/Make/CMP0113-OLD-build-stdout.txt b/Tests/RunCMake/Make/CMP0113-OLD-build-stdout.txt new file mode 100644 index 0000000000..f6e1f0f47c --- /dev/null +++ b/Tests/RunCMake/Make/CMP0113-OLD-build-stdout.txt @@ -0,0 +1 @@ +Generating output-not-created.*Built target drive1.*Generating output-not-created.*Built target drive2 diff --git a/Tests/RunCMake/Make/CMP0113-OLD.cmake b/Tests/RunCMake/Make/CMP0113-OLD.cmake new file mode 100644 index 0000000000..b6ab1203ff --- /dev/null +++ b/Tests/RunCMake/Make/CMP0113-OLD.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0113 OLD) +include(CMP0113-Common.cmake) diff --git a/Tests/RunCMake/Make/CMP0113-WARN-build-stdout.txt b/Tests/RunCMake/Make/CMP0113-WARN-build-stdout.txt new file mode 100644 index 0000000000..f6e1f0f47c --- /dev/null +++ b/Tests/RunCMake/Make/CMP0113-WARN-build-stdout.txt @@ -0,0 +1 @@ +Generating output-not-created.*Built target drive1.*Generating output-not-created.*Built target drive2 diff --git a/Tests/RunCMake/Make/CMP0113-WARN.cmake b/Tests/RunCMake/Make/CMP0113-WARN.cmake new file mode 100644 index 0000000000..48e035a44c --- /dev/null +++ b/Tests/RunCMake/Make/CMP0113-WARN.cmake @@ -0,0 +1,2 @@ +# Policy CMP0113 not set. +include(CMP0113-Common.cmake) diff --git a/Tests/RunCMake/Make/RunCMakeTest.cmake b/Tests/RunCMake/Make/RunCMakeTest.cmake index 32aafca641..5562acabdc 100644 --- a/Tests/RunCMake/Make/RunCMakeTest.cmake +++ b/Tests/RunCMake/Make/RunCMakeTest.cmake @@ -41,3 +41,25 @@ run_VerboseBuild() run_cmake(CustomCommandDepfile-ERROR) run_cmake(IncludeRegexSubdir) + +function(run_CMP0113 val) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CMP0113-${val}-build) + run_cmake(CMP0113-${val}) + set(RunCMake_TEST_NO_CLEAN 1) + set(_backup_lang "$ENV{LANG}") + set(_backup_lc_Messages "$ENV{LC_MESSAGES}") + if(MAKE_IS_GNU) + set(RunCMake-stderr-file CMP0113-${val}-build-gnu-stderr.txt) + set(ENV{LANG} "C") + set(ENV{LC_MESSAGES} "C") + endif() + run_cmake_command(CMP0113-${val}-build ${CMAKE_COMMAND} --build .) + set(ENV{LANG} "${_backup_lang}") + set(ENV{LC_MESSAGES} "${_backup_lc_messages}") +endfunction() + +if(NOT RunCMake_GENERATOR STREQUAL "Watcom WMake") + run_CMP0113(WARN) + run_CMP0113(OLD) + run_CMP0113(NEW) +endif() |