summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/VSSolution/solution_parsing.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-07-10 20:37:31 (GMT)
committerBrad King <brad.king@kitware.com>2017-07-11 14:41:28 (GMT)
commit5cf9c3d0cc654ba1a84f8bd65edbd09945c909a4 (patch)
tree036212ad96d3bbe65a6590e640a0dacd70e3f1a7 /Tests/RunCMake/VSSolution/solution_parsing.cmake
parent372de3f8039f69b3a2edcf7120083ec4097f8bd3 (diff)
downloadCMake-5cf9c3d0cc654ba1a84f8bd65edbd09945c909a4.zip
CMake-5cf9c3d0cc654ba1a84f8bd65edbd09945c909a4.tar.gz
CMake-5cf9c3d0cc654ba1a84f8bd65edbd09945c909a4.tar.bz2
VS: Add SolutionGuid to generated .sln files
Visual Studio 2017 Update 3 adds a SolutionGuid to its `.sln` files. Fixes: #17041
Diffstat (limited to 'Tests/RunCMake/VSSolution/solution_parsing.cmake')
-rw-r--r--Tests/RunCMake/VSSolution/solution_parsing.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/RunCMake/VSSolution/solution_parsing.cmake b/Tests/RunCMake/VSSolution/solution_parsing.cmake
index 4e5bb59..4b27550 100644
--- a/Tests/RunCMake/VSSolution/solution_parsing.cmake
+++ b/Tests/RunCMake/VSSolution/solution_parsing.cmake
@@ -44,6 +44,9 @@ macro(parseGlobalSections arg_out_pre arg_out_post testName)
endif()
string(STRIP "${CMAKE_MATCH_1}" key)
string(STRIP "${CMAKE_MATCH_2}" value)
+ if(key STREQUAL "SolutionGuid" AND value MATCHES "^{[0-9A-F-]+}$")
+ set(value "{00000000-0000-0000-0000-000000000000}")
+ endif()
list(APPEND ${out_${sectionType}}_${sectionName} "${key}=${value}")
endif()
endforeach()