Skip to content

Commit

Permalink
getdeps: enable -fcoroutines for GCC in edencommon and watchman
Browse files Browse the repository at this point in the history
Summary:
Enable -fcoroutines on GCC for edencommon and watchman OSS cmake builds to match folly and [fbthrift](https://github.com/facebook/fbthrift/blob/197890bbedd4942809b91139f9a2890c8f167045/CMakeLists.txt#L64-L75).  This is similar to changes made in D64911998

Also regenerated edencommon github CI, it was outdated and [broken](https://github.com/facebookexperimental/edencommon/actions/runs/11822790846/job/32940614642)

Reviewed By: xavierd

Differential Revision: D65944686

fbshipit-source-id: 23c323b484638934d107af6c3487528945c45b06
  • Loading branch information
ahornby authored and facebook-github-bot committed Nov 14, 2024
1 parent 717329c commit d7e290a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,17 @@ set(CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/build/fbcode_builder/CMake"
${CMAKE_MODULE_PATH})

set(CMAKE_CXX_STANDARD 17)
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
message(STATUS "setting C++ standard to C++${CMAKE_CXX_STANDARD}")
endif()

# Explicitly enable coroutine support, since GCC does not enable it
# by default when targeting C++17.
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fcoroutines>)
endif()

if (WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWIN32_LEAN_AND_MEAN -DNOMINMAX -DSTRICT")
Expand Down

0 comments on commit d7e290a

Please sign in to comment.