| … | … | @@ -47,14 +47,20 @@ IF (CMAKE_COMPILER_IS_GNUCXX) |
| 47 | 47 | SET(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} <LINK_LIBRARIES>") |
| 48 | 48 | ENDIF (APPLE) |
| 49 | 49 | |
| 50 | | # 1) -Wno-variadic-macros is to avoid warnings regarding using |
| 51 | | # variadic in macro OC_ASSERT (the warning warns that this is only |
| 52 | | # available from C99, lol!) |
| 50 | # *) -Wno-variadic-macros is to avoid warnings regarding using |
| 51 | # variadic in macro OC_ASSERT (the warning warns that this is |
| 52 | # only available from C99, lol!) |
| 53 | 53 | # |
| 54 | | # 2) -fopenmp for multithreading support |
| 54 | # *) -Wno-volatile because guile-3.0 has `(volatile SCM *)` sprinkled |
| 55 | # throughout the code base, and g++20 spews warning about this. |
| 55 | 56 | # |
| 56 | | # 3) -std=gnu++20 for C++20 and GNU extensions support |
| 57 | | SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wno-variadic-macros -fopenmp -std=gnu++20") |
| 57 | # *) -fopenmp for omp multithreading. It's not used much but does |
| 58 | # get a sprinkling in the codebase. |
| 59 | # |
| 60 | # *) -std=gnu++20 for C++20 Mostly for std::atomic::wait, but also |
| 61 | # a few other randos. |
| 62 | # |
| 63 | SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wno-volatile -Wno-variadic-macros -fopenmp -std=gnu++20") |
| 58 | 64 | |
| 59 | 65 | SET(CMAKE_CXX_FLAGS_ASAN ${CMAKE_C_FLAGS_ASAN}) |
| 60 | 66 | SET(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) |