diff options
Diffstat (limited to 'src/core/CMakeLists.txt')
| -rw-r--r-- | src/core/CMakeLists.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 7566372b51..08a2d0e2db 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -1195,13 +1195,13 @@ if (MSVC) ) else() target_compile_options(core PRIVATE - -Werror=conversion - -Wno-sign-conversion - -Wno-cast-function-type + $<$<COMPILE_LANGUAGE:C,CXX>:-Werror=conversion> + $<$<COMPILE_LANGUAGE:C,CXX>:-Wno-sign-conversion> + $<$<COMPILE_LANGUAGE:C,CXX>:-Wno-cast-function-type> $<$<CXX_COMPILER_ID:Clang>:-fsized-deallocation>) # pre-clang19 will spam with "OH DID YOU MEAN THIS?" otherwise... if (CXX_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19) - target_compile_options(core PRIVATE -Wno-cast-function-type-mismatch) + target_compile_options(core PRIVATE $<$<COMPILE_LANGUAGE:C,CXX>:-Wno-cast-function-type-mismatch>) endif() endif() |
