summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-31 13:35:19 (GMT)
committerBrad King <brad.king@kitware.com>2018-10-31 13:35:19 (GMT)
commit609bdd126d56f81cbf59bacd6931cf8a53c36229 (patch)
tree9c26f95f6e8a6cb351d976de0955004d1b28f406 /Tests
parent88477e0429f62bc4d8d252da460b9202f2f924be (diff)
parent1acd1c2b50f461ee2cf90fb7166240f180147f19 (diff)
downloadCMake-609bdd126d56f81cbf59bacd6931cf8a53c36229.zip
CMake-609bdd126d56f81cbf59bacd6931cf8a53c36229.tar.gz
CMake-609bdd126d56f81cbf59bacd6931cf8a53c36229.tar.bz2
Merge branch 'backport-fix-custom-target-with-csharp' into release-3.12
Merge-request: !2549
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CSharpCustomCommand/RunCMakeTest.cmake8
-rw-r--r--Tests/RunCMake/CSharpCustomCommand/TargetWithCommand-build-stdout.txt1
-rw-r--r--Tests/RunCMake/CSharpCustomCommand/TargetWithCommand.cmake4
3 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/CSharpCustomCommand/RunCMakeTest.cmake b/Tests/RunCMake/CSharpCustomCommand/RunCMakeTest.cmake
index fa5618a..ab3e51b 100644
--- a/Tests/RunCMake/CSharpCustomCommand/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CSharpCustomCommand/RunCMakeTest.cmake
@@ -1,5 +1,13 @@
include(RunCMake)
+function(run_TargetWithCommand)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/TargetWithCommand-build)
+ run_cmake(TargetWithCommand)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(TargetWithCommand-build ${CMAKE_COMMAND} --build . --config Debug)
+endfunction()
+run_TargetWithCommand()
+
# Use a single build tree for a few tests without cleaning.
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CommandWithOutput-build)
set(RunCMake_TEST_NO_CLEAN 1)
diff --git a/Tests/RunCMake/CSharpCustomCommand/TargetWithCommand-build-stdout.txt b/Tests/RunCMake/CSharpCustomCommand/TargetWithCommand-build-stdout.txt
new file mode 100644
index 0000000..c212a8f
--- /dev/null
+++ b/Tests/RunCMake/CSharpCustomCommand/TargetWithCommand-build-stdout.txt
@@ -0,0 +1 @@
+Custom target with CSharp source
diff --git a/Tests/RunCMake/CSharpCustomCommand/TargetWithCommand.cmake b/Tests/RunCMake/CSharpCustomCommand/TargetWithCommand.cmake
new file mode 100644
index 0000000..fdaea5c
--- /dev/null
+++ b/Tests/RunCMake/CSharpCustomCommand/TargetWithCommand.cmake
@@ -0,0 +1,4 @@
+enable_language(CSharp)
+
+add_custom_target(drive ALL SOURCES dummy.cs
+ COMMAND ${CMAKE_COMMAND} -E echo "Custom target with CSharp source")