summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/VS10Project
diff options
context:
space:
mode:
authorJon Chronopoulos <patches@crondog.com>2018-06-17 07:55:27 (GMT)
committerJon Chronopoulos <patches@crondog.com>2018-06-17 07:55:27 (GMT)
commit797de7a6f61a0155429cf2a7f4866fbc4a72c90c (patch)
tree60fba4ebba6a65525f7714470122a55cbf56f7ec /Tests/RunCMake/VS10Project
parent55c3435ce9faae76574341df2590016be592badc (diff)
downloadCMake-797de7a6f61a0155429cf2a7f4866fbc4a72c90c.zip
CMake-797de7a6f61a0155429cf2a7f4866fbc4a72c90c.tar.gz
CMake-797de7a6f61a0155429cf2a7f4866fbc4a72c90c.tar.bz2
VS10Project: Expand VS_DEBUGGER_* capabilities
This adds VS_DEBUGGER_COMMAND_ARGUMENTS and VS_DEBUGGER_ENVIRONMENT as well as allowing VS_DEBUGGER_* to use generator expressions.
Diffstat (limited to 'Tests/RunCMake/VS10Project')
-rw-r--r--Tests/RunCMake/VS10Project/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/VS10Project/VsDebuggerCommand-check.cmake2
-rw-r--r--Tests/RunCMake/VS10Project/VsDebuggerCommand.cmake2
-rw-r--r--Tests/RunCMake/VS10Project/VsDebuggerCommandArguments-check.cmake22
-rw-r--r--Tests/RunCMake/VS10Project/VsDebuggerCommandArguments.cmake5
-rw-r--r--Tests/RunCMake/VS10Project/VsDebuggerEnvironment-check.cmake22
-rw-r--r--Tests/RunCMake/VS10Project/VsDebuggerEnvironment.cmake5
-rw-r--r--Tests/RunCMake/VS10Project/VsDebuggerWorkingDir-check.cmake2
-rw-r--r--Tests/RunCMake/VS10Project/VsDebuggerWorkingDir.cmake2
9 files changed, 60 insertions, 4 deletions
diff --git a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
index 0d178ce..d50de3d 100644
--- a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
+++ b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
@@ -7,6 +7,8 @@ run_cmake(VsTargetsFileReferences)
run_cmake(VsCustomProps)
run_cmake(VsDebuggerWorkingDir)
run_cmake(VsDebuggerCommand)
+run_cmake(VsDebuggerCommandArguments)
+run_cmake(VsDebuggerEnvironment)
run_cmake(VsCSharpCustomTags)
run_cmake(VsCSharpReferenceProps)
run_cmake(VsCSharpWithoutSources)
diff --git a/Tests/RunCMake/VS10Project/VsDebuggerCommand-check.cmake b/Tests/RunCMake/VS10Project/VsDebuggerCommand-check.cmake
index 0ded780..440f9f2 100644
--- a/Tests/RunCMake/VS10Project/VsDebuggerCommand-check.cmake
+++ b/Tests/RunCMake/VS10Project/VsDebuggerCommand-check.cmake
@@ -9,7 +9,7 @@ set(debuggerCommandSet FALSE)
file(STRINGS "${vcProjectFile}" lines)
foreach(line IN LISTS lines)
if(line MATCHES "^ *<LocalDebuggerCommand[^>]*>([^<>]+)</LocalDebuggerCommand>$")
- if("${CMAKE_MATCH_1}" STREQUAL "my-debugger-command")
+ if("${CMAKE_MATCH_1}" STREQUAL "my-debugger-command foo")
message(STATUS "foo.vcxproj has debugger command set")
set(debuggerCommandSet TRUE)
endif()
diff --git a/Tests/RunCMake/VS10Project/VsDebuggerCommand.cmake b/Tests/RunCMake/VS10Project/VsDebuggerCommand.cmake
index e29adc4..5dcb6d1 100644
--- a/Tests/RunCMake/VS10Project/VsDebuggerCommand.cmake
+++ b/Tests/RunCMake/VS10Project/VsDebuggerCommand.cmake
@@ -2,4 +2,4 @@ enable_language(CXX)
add_library(foo foo.cpp)
set_target_properties(foo PROPERTIES
- VS_DEBUGGER_COMMAND "my-debugger-command")
+ VS_DEBUGGER_COMMAND "my-debugger-command $<TARGET_PROPERTY:foo,NAME>")
diff --git a/Tests/RunCMake/VS10Project/VsDebuggerCommandArguments-check.cmake b/Tests/RunCMake/VS10Project/VsDebuggerCommandArguments-check.cmake
new file mode 100644
index 0000000..b2e0a43
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsDebuggerCommandArguments-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(debuggerCommandArgumentsSet FALSE)
+
+file(STRINGS "${vcProjectFile}" lines)
+foreach(line IN LISTS lines)
+ if(line MATCHES "^ *<LocalDebuggerCommandArguments[^>]*>([^<>]+)</LocalDebuggerCommandArguments>$")
+ if("${CMAKE_MATCH_1}" STREQUAL "my-debugger-command-arguments foo")
+ message(STATUS "foo.vcxproj has debugger command arguments set")
+ set(debuggerCommandArgumentsSet TRUE)
+ endif()
+ endif()
+endforeach()
+
+if(NOT debuggerCommandArgumentsSet)
+ set(RunCMake_TEST_FAILED "LocalDebuggerCommandArguments not found or not set correctly.")
+ return()
+endif()
diff --git a/Tests/RunCMake/VS10Project/VsDebuggerCommandArguments.cmake b/Tests/RunCMake/VS10Project/VsDebuggerCommandArguments.cmake
new file mode 100644
index 0000000..aa87cdc
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsDebuggerCommandArguments.cmake
@@ -0,0 +1,5 @@
+enable_language(CXX)
+add_library(foo foo.cpp)
+
+set_target_properties(foo PROPERTIES
+ VS_DEBUGGER_COMMAND_ARGUMENTS "my-debugger-command-arguments $<TARGET_PROPERTY:foo,NAME>")
diff --git a/Tests/RunCMake/VS10Project/VsDebuggerEnvironment-check.cmake b/Tests/RunCMake/VS10Project/VsDebuggerEnvironment-check.cmake
new file mode 100644
index 0000000..2427ad4
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsDebuggerEnvironment-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(debuggerEnvironmentSet FALSE)
+
+file(STRINGS "${vcProjectFile}" lines)
+foreach(line IN LISTS lines)
+ if(line MATCHES "^ *<LocalDebuggerEnvironment[^>]*>([^<>]+)</LocalDebuggerEnvironment>$")
+ if("${CMAKE_MATCH_1}" STREQUAL "my-debugger-environment foo")
+ message(STATUS "foo.vcxproj has debugger environment set")
+ set(debuggerEnvironmentSet TRUE)
+ endif()
+ endif()
+endforeach()
+
+if(NOT debuggerEnvironmentSet)
+ set(RunCMake_TEST_FAILED "LocalDebuggerEnvironment not found or not set correctly.")
+ return()
+endif()
diff --git a/Tests/RunCMake/VS10Project/VsDebuggerEnvironment.cmake b/Tests/RunCMake/VS10Project/VsDebuggerEnvironment.cmake
new file mode 100644
index 0000000..d5bec4c
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsDebuggerEnvironment.cmake
@@ -0,0 +1,5 @@
+enable_language(CXX)
+add_library(foo foo.cpp)
+
+set_target_properties(foo PROPERTIES
+ VS_DEBUGGER_ENVIRONMENT "my-debugger-environment $<TARGET_PROPERTY:foo,NAME>")
diff --git a/Tests/RunCMake/VS10Project/VsDebuggerWorkingDir-check.cmake b/Tests/RunCMake/VS10Project/VsDebuggerWorkingDir-check.cmake
index 637c68c..6a142f8 100644
--- a/Tests/RunCMake/VS10Project/VsDebuggerWorkingDir-check.cmake
+++ b/Tests/RunCMake/VS10Project/VsDebuggerWorkingDir-check.cmake
@@ -9,7 +9,7 @@ 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")
+ if("${CMAKE_MATCH_1}" STREQUAL "my-debugger-directory foo")
message(STATUS "foo.vcxproj has debugger working dir set")
set(debuggerWorkDirSet TRUE)
endif()
diff --git a/Tests/RunCMake/VS10Project/VsDebuggerWorkingDir.cmake b/Tests/RunCMake/VS10Project/VsDebuggerWorkingDir.cmake
index a277c65..36daed0 100644
--- a/Tests/RunCMake/VS10Project/VsDebuggerWorkingDir.cmake
+++ b/Tests/RunCMake/VS10Project/VsDebuggerWorkingDir.cmake
@@ -2,4 +2,4 @@ enable_language(CXX)
add_library(foo foo.cpp)
set_target_properties(foo PROPERTIES
- VS_DEBUGGER_WORKING_DIRECTORY "my-debugger-directory")
+ VS_DEBUGGER_WORKING_DIRECTORY "my-debugger-directory $<TARGET_PROPERTY:foo,NAME>")