Skip to content

Commit

Permalink
Merge pull request #10973 from phire/freebsd_fmt_consteval
Browse files Browse the repository at this point in the history
Workaround FreeBSD/clang/fmt bug
  • Loading branch information
phire authored Aug 10, 2022
2 parents 2747ab7 + 12a5f73 commit a89fe51
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,12 @@ if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD|NetBSD")
set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};/usr/local")
set(CMAKE_REQUIRED_INCLUDES "/usr/local/include")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib")

if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0)
# Workaround: the llvm libc++ and versions of clang eariler than 14 have a bug with consteval
# so we define FMT_CONSTEVAL to blank to just disable consteval in fmt
add_definitions(-DFMT_CONSTEVAL=)
endif()
endif()

# Dolphin requires threads.
Expand Down

0 comments on commit a89fe51

Please sign in to comment.