From 4087ae39740a979dbed3109e960ea192e8a44676 Mon Sep 17 00:00:00 2001 From: Morten Borup Petersen Date: Thu, 5 Sep 2024 13:12:33 +0200 Subject: [PATCH 1/3] Prevent gtest compiler/link errors on windows Substrait-cpp is (i assume) intended to embed into other projects, so other subprojects should adhere to parent projects' settings. For GTest on windows, this requires that ... is enabled ([doc](https://github.com/google/googletest/blob/main/googletest/README.md)). --- third_party/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 0a5f605b..f0822a67 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -13,6 +13,12 @@ include(datetime.cmake) add_subdirectory(fmt) + +if(WIN32) + # For Windows: Prevent overriding the parent project's compiler/linker settings + set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +endif() + find_package(GTest QUIET) if(NOT ${GTEST_FOUND}) message(STATUS "Retrieving external GoogleTest library.") From 633686438d0cfeb9e7da9849d8b5c1271ed95679 Mon Sep 17 00:00:00 2001 From: Morten Borup Petersen Date: Thu, 5 Sep 2024 13:46:27 +0200 Subject: [PATCH 2/3] format --- third_party/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index f0822a67..4d919b74 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -16,7 +16,9 @@ add_subdirectory(fmt) if(WIN32) # For Windows: Prevent overriding the parent project's compiler/linker settings - set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + set(gtest_force_shared_crt + ON + CACHE BOOL "" FORCE) endif() find_package(GTest QUIET) From 8a69bbc8ceb355a180ed67336afd99656b91f85d Mon Sep 17 00:00:00 2001 From: Morten Borup Petersen Date: Thu, 5 Sep 2024 13:52:43 +0200 Subject: [PATCH 3/3] format --- third_party/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 4d919b74..f3247590 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -13,7 +13,6 @@ include(datetime.cmake) add_subdirectory(fmt) - if(WIN32) # For Windows: Prevent overriding the parent project's compiler/linker settings set(gtest_force_shared_crt