From 46fe7d78076323de9f6c67125341e56cabb154ad Mon Sep 17 00:00:00 2001 From: Will Sobel Date: Mon, 23 Sep 2024 18:30:51 -0400 Subject: [PATCH] upgrade gtest to 1.15 and fixed macos build issue --- CMakeLists.txt | 5 +++-- conan/profiles/macos | 1 + conan/profiles/xcode | 1 + conanfile.py | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4509ec03..96401981 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,14 +21,15 @@ set(AGENT_PREFIX "" CACHE STRING "Prefix for the name of the agent and the agent set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATADIR}/mtconnect") message(INFO " Shared build: ${SHARED_AGENT_LIB}") +set(CMAKE_OSX_DEPLOYMENT_TARGET 13.2) project(cppagent LANGUAGES C CXX) # We will define these properties by default for each CMake target to be created. -set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -set(CXX_COMPILE_FEATURES cxx_std_17) +set(CXX_COMPILE_FEATURES cxx_std_20) set(WITH_RUBY ON CACHE STRING "With Ruby Support") diff --git a/conan/profiles/macos b/conan/profiles/macos index 4828e620..5ed2d929 100644 --- a/conan/profiles/macos +++ b/conan/profiles/macos @@ -3,6 +3,7 @@ include(default) [settings] compiler=apple-clang compiler.cppstd=20 +os.version=14.0 [system_tools] cmake/>3.26.0 \ No newline at end of file diff --git a/conan/profiles/xcode b/conan/profiles/xcode index 5df55709..701188c3 100644 --- a/conan/profiles/xcode +++ b/conan/profiles/xcode @@ -2,6 +2,7 @@ include(default) [settings] compiler.cppstd=20 +os.version=14.0 [system_tools] cmake/>3.23.0 diff --git a/conanfile.py b/conanfile.py index 745600d7..f8f302b1 100644 --- a/conanfile.py +++ b/conanfile.py @@ -130,7 +130,7 @@ def requirements(self): if self.options.with_ruby: self.requires("mruby/3.2.0", headers=True, libs=True, transitive_headers=True, transitive_libs=True) - self.requires("gtest/1.10.0", headers=True, libs=True, transitive_headers=True, transitive_libs=True, test=True) + self.requires("gtest/1.15.0", headers=True, libs=True, transitive_headers=True, transitive_libs=True, test=True) def configure(self): if self.options.shared: