cmake: Fix clang build by adjusting passed flags (#11)

* Just add -std=gnu++2b to clang++ or clang will error out

* Assuming it was meant to silence the __cpp_concepts warning that appears by passing it via flags
This commit is contained in:
Rudolchr 2024-03-18 17:48:04 +01:00 committed by GitHub
parent 4b9efbed7a
commit e3694ecf2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -48,7 +48,9 @@ target_link_libraries(hyprcursor PkgConfig::deps)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# for std::expected.
# probably evil. Arch's clang is very outdated tho...
target_compile_options(hyprcursor PUBLIC -std=gnu++2b -D__cpp_concepts=202002L -Wno-macro-redefined)
target_compile_options(hyprcursor PUBLIC
$<$<COMPILE_LANGUAGE:CXX>:-std=gnu++2b -D__cpp_concepts=202002L>
-Wno-builtin-macro-redefined)
endif()
# hyprcursor-util