Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Fix bug with making arch-independent CMake config file

Closes #1660
Commit
33286fdc37f52a5fbc1bdf38545137005b377703
Author
Martin Hořeňovský ·
Parents
2f631bb8087a

Files · Download .tar.gz

Changes

 CMakeLists.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f79a436c..7355a91b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -136,8 +136,11 @@ if (NOT_SUBPROJECT)
     #
     # CMake does not provide a direct customization point for this in
     # `write_basic_package_version_file`, but it can be accomplished
-    # indirectly by temporarily undefining `CMAKE_SIZEOF_VOID_P`.
+    # indirectly by temporarily redefining `CMAKE_SIZEOF_VOID_P` to an
+    # empty string. Note that just undefining the variable could be
+    # insufficient in cases where the variable was already in CMake cache
     set(CATCH2_CMAKE_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P})
+    set(CMAKE_SIZEOF_VOID_P "")
     unset(CMAKE_SIZEOF_VOID_P)
     write_basic_package_version_file(
       "${CMAKE_CURRENT_BINARY_DIR}/Catch2ConfigVersion.cmake"