summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/VS10Project/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/VS10Project/VsCustomProps-check.cmake25
-rw-r--r--Tests/RunCMake/VS10Project/VsCustomProps.cmake7
-rw-r--r--Tests/RunCMake/VS10Project/VsDebuggerWorkingDir-check.cmake22
-rw-r--r--Tests/RunCMake/VS10Project/VsDebuggerWorkingDir.cmake5
-rw-r--r--Tests/RunCMake/VS10Project/my.props5
-rw-r--r--Tests/RunCMake/while/EndAlone-stderr.txt2
7 files changed, 67 insertions, 1 deletions
diff --git a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
index 22d8164..bc1ec97 100644
--- a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
+++ b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
@@ -1,3 +1,5 @@
include(RunCMake)
run_cmake(VsConfigurationType)
run_cmake(VsTargetsFileReferences)
+run_cmake(VsCustomProps)
+run_cmake(VsDebuggerWorkingDir)
diff --git a/Tests/RunCMake/VS10Project/VsCustomProps-check.cmake b/Tests/RunCMake/VS10Project/VsCustomProps-check.cmake
new file mode 100644
index 0000000..22a3df0
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsCustomProps-check.cmake
@@ -0,0 +1,25 @@
+set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.vcxproj")
+if(NOT EXISTS "${vcProjectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
+ return()
+endif()
+
+set(importFound FALSE)
+
+set(props_file "${RunCMake_SOURCE_DIR}/my.props")
+file(TO_NATIVE_PATH "${props_file}" check_file)
+file(STRINGS "${vcProjectFile}" lines)
+foreach(line IN LISTS lines)
+ if(line MATCHES "^ *<Import Project=\"([^\"]+)\".*Label=\"([^\"]+)\".*$")
+ if("${CMAKE_MATCH_1}" STREQUAL "${check_file}" AND
+ "${CMAKE_MATCH_2}" STREQUAL "LocalAppDataPlatform")
+ message(STATUS "foo.vcxproj is importing ${check_file}")
+ set(importFound TRUE)
+ endif()
+ endif()
+endforeach()
+
+if(NOT importFound)
+ set(RunCMake_TEST_FAILED "Import of custom .props file not found.")
+ return()
+endif()
diff --git a/Tests/RunCMake/VS10Project/VsCustomProps.cmake b/Tests/RunCMake/VS10Project/VsCustomProps.cmake
new file mode 100644
index 0000000..af52a3e
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsCustomProps.cmake
@@ -0,0 +1,7 @@
+enable_language(CXX)
+add_library(foo foo.cpp)
+
+set(props_file "${CMAKE_CURRENT_SOURCE_DIR}/my.props")
+
+set_target_properties(foo PROPERTIES
+ VS_USER_PROPS_CXX "${props_file}")
diff --git a/Tests/RunCMake/VS10Project/VsDebuggerWorkingDir-check.cmake b/Tests/RunCMake/VS10Project/VsDebuggerWorkingDir-check.cmake
new file mode 100644
index 0000000..637c68c
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsDebuggerWorkingDir-check.cmake
@@ -0,0 +1,22 @@
+set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.vcxproj")
+if(NOT EXISTS "${vcProjectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
+ return()
+endif()
+
+set(debuggerWorkDirSet FALSE)
+
+file(STRINGS "${vcProjectFile}" lines)
+foreach(line IN LISTS lines)
+ if(line MATCHES "^ *<LocalDebuggerWorkingDirectory[^>]*>([^<>]+)</LocalDebuggerWorkingDirectory>$")
+ if("${CMAKE_MATCH_1}" STREQUAL "my-debugger-directory")
+ message(STATUS "foo.vcxproj has debugger working dir set")
+ set(debuggerWorkDirSet TRUE)
+ endif()
+ endif()
+endforeach()
+
+if(NOT debuggerWorkDirSet)
+ set(RunCMake_TEST_FAILED "LocalDebuggerWorkingDirectory not found or not set correctly.")
+ return()
+endif()
diff --git a/Tests/RunCMake/VS10Project/VsDebuggerWorkingDir.cmake b/Tests/RunCMake/VS10Project/VsDebuggerWorkingDir.cmake
new file mode 100644
index 0000000..a277c65
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsDebuggerWorkingDir.cmake
@@ -0,0 +1,5 @@
+enable_language(CXX)
+add_library(foo foo.cpp)
+
+set_target_properties(foo PROPERTIES
+ VS_DEBUGGER_WORKING_DIRECTORY "my-debugger-directory")
diff --git a/Tests/RunCMake/VS10Project/my.props b/Tests/RunCMake/VS10Project/my.props
new file mode 100644
index 0000000..7c98cde
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/my.props
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ </PropertyGroup>
+</Project>
diff --git a/Tests/RunCMake/while/EndAlone-stderr.txt b/Tests/RunCMake/while/EndAlone-stderr.txt
index cd98687..5fe6655 100644
--- a/Tests/RunCMake/while/EndAlone-stderr.txt
+++ b/Tests/RunCMake/while/EndAlone-stderr.txt
@@ -1,5 +1,5 @@
^CMake Error at EndAlone.cmake:1 \(endwhile\):
endwhile An ENDWHILE command was found outside of a proper WHILE ENDWHILE
- structure.
+ structure. Or its arguments did not match the opening WHILE command.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)$