summaryrefslogtreecommitdiffstats
path: root/Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake.in
diff options
context:
space:
mode:
authorPetr Kmoch <petr.kmoch@gmail.com>2013-03-28 14:10:13 (GMT)
committerBrad King <brad.king@kitware.com>2013-04-12 15:35:36 (GMT)
commitac9a5f4d943685f0b49b1a9d03f4e23238df0867 (patch)
tree7027ff81ffd0e05a7c8c119499dbfc70417ad103 /Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake.in
parenta6c0299c407bc4482140637c0460f71238b4f9d0 (diff)
downloadCMake-ac9a5f4d943685f0b49b1a9d03f4e23238df0867.zip
CMake-ac9a5f4d943685f0b49b1a9d03f4e23238df0867.tar.gz
CMake-ac9a5f4d943685f0b49b1a9d03f4e23238df0867.tar.bz2
ctest_build: Pass projectDir to GenerateBuildCommand
This allows the ctest_build command's TARGET option to name a target in a subdirectory and still build properly with msbuild. Add test case covering use of ctest_build() with such a TARGET.
Diffstat (limited to 'Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake.in')
-rw-r--r--Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake.in12
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake.in b/Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake.in
new file mode 100644
index 0000000..ea48c78
--- /dev/null
+++ b/Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake.in
@@ -0,0 +1,12 @@
+cmake_minimum_required(VERSION 2.8.10)
+
+set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/VSProjectInSubdir")
+set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestBuildCommandProjectInSubdir/Nested")
+set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
+set(CTEST_PROJECT_NAME "VSProjectInSubdir")
+set(CTEST_BUILD_CONFIGURATION "@CTestTest_CONFIG@")
+
+ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
+ctest_start(Experimental)
+ctest_configure(OPTIONS "@CMAKE_TEST_GENERATOR_TOOLSET_SELECTION@-DCMAKE_MAKE_PROGRAM:FILEPATH=@CMAKE_TEST_MAKEPROGRAM@")
+ctest_build(TARGET test)