summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/VS10Project/VsDebuggerCommand-check.cmake36
-rw-r--r--Tests/RunCMake/VS10Project/VsDebuggerCommand.cmake3
-rw-r--r--Tests/RunCMake/VS10Project/VsDebuggerCommandArguments-check.cmake36
-rw-r--r--Tests/RunCMake/VS10Project/VsDebuggerCommandArguments.cmake3
-rw-r--r--Tests/RunCMake/VS10Project/VsDebuggerEnvironment-check.cmake36
-rw-r--r--Tests/RunCMake/VS10Project/VsDebuggerEnvironment.cmake3
-rw-r--r--Tests/RunCMake/VS10Project/VsDebuggerWorkingDir-check.cmake36
-rw-r--r--Tests/RunCMake/VS10Project/VsDebuggerWorkingDir.cmake3
8 files changed, 84 insertions, 72 deletions
diff --git a/Tests/RunCMake/VS10Project/VsDebuggerCommand-check.cmake b/Tests/RunCMake/VS10Project/VsDebuggerCommand-check.cmake
index 440f9f2..00288d4 100644
--- a/Tests/RunCMake/VS10Project/VsDebuggerCommand-check.cmake
+++ b/Tests/RunCMake/VS10Project/VsDebuggerCommand-check.cmake
@@ -1,22 +1,24 @@
-set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.vcxproj")
-if(NOT EXISTS "${vcProjectFile}")
- set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
- return()
-endif()
+foreach(target foo bar)
+ set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/${target}.vcxproj")
+ if(NOT EXISTS "${vcProjectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
+ return()
+ endif()
-set(debuggerCommandSet FALSE)
+ 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 foo")
- message(STATUS "foo.vcxproj has debugger command set")
- set(debuggerCommandSet TRUE)
+ file(STRINGS "${vcProjectFile}" lines)
+ foreach(line IN LISTS lines)
+ if(line MATCHES "^ *<LocalDebuggerCommand[^>]*>([^<>]+)</LocalDebuggerCommand>$")
+ if("${CMAKE_MATCH_1}" STREQUAL "my-debugger-command foo")
+ message(STATUS "${target}.vcxproj has debugger command set")
+ set(debuggerCommandSet TRUE)
+ endif()
endif()
+ endforeach()
+
+ if(NOT debuggerCommandSet)
+ set(RunCMake_TEST_FAILED "LocalDebuggerCommand not found or not set correctly.")
+ return()
endif()
endforeach()
-
-if(NOT debuggerCommandSet)
- set(RunCMake_TEST_FAILED "LocalDebuggerCommand not found or not set correctly.")
- return()
-endif()
diff --git a/Tests/RunCMake/VS10Project/VsDebuggerCommand.cmake b/Tests/RunCMake/VS10Project/VsDebuggerCommand.cmake
index 5dcb6d1..54f9154 100644
--- a/Tests/RunCMake/VS10Project/VsDebuggerCommand.cmake
+++ b/Tests/RunCMake/VS10Project/VsDebuggerCommand.cmake
@@ -1,5 +1,6 @@
enable_language(CXX)
add_library(foo foo.cpp)
+add_custom_target(bar)
-set_target_properties(foo PROPERTIES
+set_target_properties(foo bar PROPERTIES
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
index b2e0a43..87555d1 100644
--- a/Tests/RunCMake/VS10Project/VsDebuggerCommandArguments-check.cmake
+++ b/Tests/RunCMake/VS10Project/VsDebuggerCommandArguments-check.cmake
@@ -1,22 +1,24 @@
-set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.vcxproj")
-if(NOT EXISTS "${vcProjectFile}")
- set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
- return()
-endif()
+foreach(target foo bar)
+ set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/${target}.vcxproj")
+ if(NOT EXISTS "${vcProjectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
+ return()
+ endif()
-set(debuggerCommandArgumentsSet FALSE)
+ 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)
+ 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 "${target}.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()
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
index aa87cdc..1f7d0be 100644
--- a/Tests/RunCMake/VS10Project/VsDebuggerCommandArguments.cmake
+++ b/Tests/RunCMake/VS10Project/VsDebuggerCommandArguments.cmake
@@ -1,5 +1,6 @@
enable_language(CXX)
add_library(foo foo.cpp)
+add_custom_target(bar)
-set_target_properties(foo PROPERTIES
+set_target_properties(foo bar 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
index 2427ad4..fee121a 100644
--- a/Tests/RunCMake/VS10Project/VsDebuggerEnvironment-check.cmake
+++ b/Tests/RunCMake/VS10Project/VsDebuggerEnvironment-check.cmake
@@ -1,22 +1,24 @@
-set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.vcxproj")
-if(NOT EXISTS "${vcProjectFile}")
- set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
- return()
-endif()
+foreach(target foo bar)
+ set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/${target}.vcxproj")
+ if(NOT EXISTS "${vcProjectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
+ return()
+ endif()
-set(debuggerEnvironmentSet FALSE)
+ 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)
+ 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 "${target}.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()
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
index d5bec4c..c594f35 100644
--- a/Tests/RunCMake/VS10Project/VsDebuggerEnvironment.cmake
+++ b/Tests/RunCMake/VS10Project/VsDebuggerEnvironment.cmake
@@ -1,5 +1,6 @@
enable_language(CXX)
add_library(foo foo.cpp)
+add_custom_target(bar)
-set_target_properties(foo PROPERTIES
+set_target_properties(foo bar 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 6a142f8..9d3f2a8 100644
--- a/Tests/RunCMake/VS10Project/VsDebuggerWorkingDir-check.cmake
+++ b/Tests/RunCMake/VS10Project/VsDebuggerWorkingDir-check.cmake
@@ -1,22 +1,24 @@
-set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.vcxproj")
-if(NOT EXISTS "${vcProjectFile}")
- set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
- return()
-endif()
+foreach(target foo bar)
+ set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/${target}.vcxproj")
+ if(NOT EXISTS "${vcProjectFile}")
+ set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.")
+ return()
+ endif()
-set(debuggerWorkDirSet FALSE)
+ 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 foo")
- message(STATUS "foo.vcxproj has debugger working dir set")
- set(debuggerWorkDirSet TRUE)
+ file(STRINGS "${vcProjectFile}" lines)
+ foreach(line IN LISTS lines)
+ if(line MATCHES "^ *<LocalDebuggerWorkingDirectory[^>]*>([^<>]+)</LocalDebuggerWorkingDirectory>$")
+ if("${CMAKE_MATCH_1}" STREQUAL "my-debugger-directory foo")
+ message(STATUS "${target}.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()
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
index 36daed0..69ed85c 100644
--- a/Tests/RunCMake/VS10Project/VsDebuggerWorkingDir.cmake
+++ b/Tests/RunCMake/VS10Project/VsDebuggerWorkingDir.cmake
@@ -1,5 +1,6 @@
enable_language(CXX)
add_library(foo foo.cpp)
+add_custom_target(bar)
-set_target_properties(foo PROPERTIES
+set_target_properties(foo bar PROPERTIES
VS_DEBUGGER_WORKING_DIRECTORY "my-debugger-directory $<TARGET_PROPERTY:foo,NAME>")