summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/VSSolution/solution_parsing.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/VSSolution/solution_parsing.cmake')
-rw-r--r--Tests/RunCMake/VSSolution/solution_parsing.cmake15
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/RunCMake/VSSolution/solution_parsing.cmake b/Tests/RunCMake/VSSolution/solution_parsing.cmake
index dd158ef..4e5bb59 100644
--- a/Tests/RunCMake/VSSolution/solution_parsing.cmake
+++ b/Tests/RunCMake/VSSolution/solution_parsing.cmake
@@ -50,6 +50,21 @@ macro(parseGlobalSections arg_out_pre arg_out_post testName)
endmacro()
+macro(getProjectNames arg_out_projects)
+ set(${arg_out_projects} "")
+ set(sln "${RunCMake_TEST_BINARY_DIR}/${test}.sln")
+ if(NOT EXISTS "${sln}")
+ error("Expected solution file ${sln} does not exist")
+ endif()
+ file(STRINGS "${sln}" project_lines REGEX "^Project\\(")
+ foreach(project_line IN LISTS project_lines)
+ string(REGEX REPLACE ".* = \"" "" project_line "${project_line}")
+ string(REGEX REPLACE "\", .*" "" project_line "${project_line}")
+ list(APPEND ${arg_out_projects} "${project_line}")
+ endforeach()
+endmacro()
+
+
macro(testGlobalSection prefix sectionName)
if(NOT DEFINED ${prefix}_${sectionName})
error("Section ${sectionName} does not exist")