File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,13 @@ if(PROJECT_IS_TOP_LEVEL)
7474 )
7575endif ()
7676
77+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "14" )
78+ # XXX: GCC 12 and 13 can compile the library, but if the `tree-slp-vectorize` optimization
79+ # is enabled, then GCC will malform certain coroutine codegen, producing linker errors. This
80+ # is enabled by -O2, so we explicitly disable this single optimization to support GCC 12/13
81+ add_compile_options (-fno-tree -slp-vectorize -Wno-unknown-pragmas)
82+ endif ()
83+
7784add_compile_options (
7885 # When compiling C++ with GCC, set a deeper diagnostics depth
7986 $<$<AND :$<CXX_COMPILER_ID:GNU>,$<COMPILE_LANGUAGE:CXX>>:-fconcepts-diagnostics-depth=4>
@@ -83,7 +90,9 @@ add_compile_options(
8390
8491# If we generate any DLLs, use a .dll.lib suffix for the importlibs, to distinguish
8592# them from actual static libraries
86- set (CMAKE_IMPORT_LIBRARY_SUFFIX .dll.lib)
93+ if (WIN32 )
94+ set (CMAKE_IMPORT_LIBRARY_SUFFIX .dll.lib)
95+ endif ()
8796
8897# Debug binaries will have a `-dbg` suffix to allow multi-conf installation
8998set (CMAKE_DEBUG_POSTFIX -dbg)
You can’t perform that action at this time.
0 commit comments