Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAlan Jowett2022-03-17 17:21:12 -0600
committerGitHub2022-03-18 00:21:12 +0100
commit18c58667d780bfdc82d0e52d6ac6afc462e28f47 (patch)
tree397e2fe0a2c3f3655013258cbdfc48cc356cd797
parent634cdb4efefcbd9ee8816e9507013f10de20a78d (diff)
downloadcatch3-18c58667d780bfdc82d0e52d6ac6afc462e28f47.tar.gz
Generate Visual Studio project files with constant project guids
By default, CMake derives a Visual Studio project GUID from the file path but the GUID can be overridden via a property (see https://gitlab.kitware.com/cmake/cmake/-/commit/c85367f4). Using a non-constant GUID can cause problems if other projects/repos want to reference the catch2 vcxproj files, so we force a constant GUID here. Signed-off-by: Alan Jowett <alanjo@microsoft.com> Resolves: #2388
-rw-r--r--src/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4aa755a4..78d95956 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,5 +1,12 @@
include(CatchMiscFunctions)
+# CMake derives a Visual Studio project GUID from the file path but can be overridden via a property
+# (see https://gitlab.kitware.com/cmake/cmake/-/commit/c85367f4). Using a non-constant GUID
+# can cause problems if other projects/repos want to reference the vcxproj file,
+# so we force a constant GUID here.
+set(Catch2_GUID_CMAKE "8d538cbe-01bf-4a2e-a98a-6c368fdf13d7" CACHE INTERNAL "Project GUID")
+set(Catch2WithMain_GUID_CMAKE "8bd3552a-2cfb-4a59-ab15-2031b97ada1e" CACHE INTERNAL "Project GUID")
+
# Please keep these ordered alphabetically
set(BENCHMARK_HEADERS
${SOURCES_DIR}/benchmark/catch_benchmark.hpp