From 5c878409e31f7943d661ad5544179a9ce8aeb2cd Mon Sep 17 00:00:00 2001 From: Antony Peacock Date: Fri, 12 Apr 2024 10:26:57 +0100 Subject: [PATCH] Fix __cplusplus macro for Visual Studio (#237) * Fix __cplusplus macro for Visual Studio * Upgrade GTest * Force rebuild of GTest to build with C++17 onwards support * Reinstate cmake layout * Test if fetched gtest correctly builds for C++17 * Manually build Gtest to work around fetching the wrong build from the Conan Index Centre * Attemp to use pre-built GTest if available * Test fix is backward compatible with prior versions * Revert to latest version * Force building GTest on Windows is still required --- cmake/compiler.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/compiler.cmake b/cmake/compiler.cmake index 93323d71..8556d81b 100644 --- a/cmake/compiler.cmake +++ b/cmake/compiler.cmake @@ -30,6 +30,7 @@ target_link_libraries(MorpheusConfig target_compile_options(MorpheusConfig INTERFACE + $<$:/Zc:__cplusplus> # https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/ $<$:${MSVC_WARNINGS}> $<$:${GCC_WARNINGS}> $<$,$>:${CLANG_WARNINGS}>