Skip to content

Commit

Permalink
chore: Explicitly set ASIO_GRPC_HAS_STD_PMR to false for MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Tradias committed Apr 21, 2024
1 parent 7f4e964 commit 2c7a6f7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
os: macos-13,
triplet: 'x64-osx-release',
build-type: 'Debug',
cmake-extra-args: '-DCMAKE_BUILD_TYPE=Debug -DVCPKG_TARGET_TRIPLET=x64-osx-release',
cmake-extra-args: '-DCMAKE_BUILD_TYPE=Debug -DVCPKG_TARGET_TRIPLET=x64-osx-release -DASIO_GRPC_HAS_STD_PMR=off',
parallel: 4,
}

Expand Down
12 changes: 7 additions & 5 deletions cmake/AsioGrpcCheckBoostVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

try_compile(
ASIO_GRPC_BOOST_ASIO_HAS_CO_AWAIT "${CMAKE_CURRENT_BINARY_DIR}"
"${CMAKE_CURRENT_LIST_DIR}/check_boost_asio_has_co_await.cpp"
CMAKE_FLAGS "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}" "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
LINK_LIBRARIES Boost::headers CXX_STANDARD 20 CXX_STANDARD_REQUIRED on)
if(NOT DEFINED ASIO_GRPC_BOOST_ASIO_HAS_CO_AWAIT)
try_compile(
ASIO_GRPC_BOOST_ASIO_HAS_CO_AWAIT "${CMAKE_CURRENT_BINARY_DIR}"
"${CMAKE_CURRENT_LIST_DIR}/check_boost_asio_has_co_await.cpp"
CMAKE_FLAGS "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}"
LINK_LIBRARIES Boost::headers CXX_STANDARD 20 CXX_STANDARD_REQUIRED on)
endif()

message(STATUS "ASIO_GRPC_BOOST_ASIO_HAS_CO_AWAIT: ${ASIO_GRPC_BOOST_ASIO_HAS_CO_AWAIT}")
11 changes: 6 additions & 5 deletions cmake/AsioGrpcCheckStdPmr.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

try_compile(
ASIO_GRPC_HAS_STD_PMR "${CMAKE_CURRENT_BINARY_DIR}"
"${CMAKE_CURRENT_LIST_DIR}/check_std_pmr.cpp"
CMAKE_FLAGS "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}" "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}" CXX_STANDARD 17
CXX_STANDARD_REQUIRED on)
if(NOT DEFINED ASIO_GRPC_HAS_STD_PMR)
try_compile(
ASIO_GRPC_HAS_STD_PMR "${CMAKE_CURRENT_BINARY_DIR}"
"${CMAKE_CURRENT_LIST_DIR}/check_std_pmr.cpp"
CMAKE_FLAGS "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}" CXX_STANDARD 17 CXX_STANDARD_REQUIRED on)
endif()

message(STATUS "ASIO_GRPC_HAS_STD_PMR: ${ASIO_GRPC_HAS_STD_PMR}")

0 comments on commit 2c7a6f7

Please sign in to comment.