Skip to content

Commit

Permalink
cmake: move some compile options to C only
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredh committed Jan 7, 2025
1 parent dd9b01b commit 4940a43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ endif()

check_c_compiler_flag("-Watomic-implicit-seq-cst" COMPILER_SUPPORTS_WATOMIC)
if(COMPILER_SUPPORTS_WATOMIC)
add_compile_options(-Watomic-implicit-seq-cst)
add_compile_options("$<$<COMPILE_LANGUAGE:C>:-Watomic-implicit-seq-cst>")
endif()

if(CMAKE_C_COMPILER_ID MATCHES "Clang")
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ else()
endif()

if(CMAKE_C_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wshorten-64-to-32)
add_compile_options("$<$<COMPILE_LANGUAGE:C>:-Wshorten-64-to-32>")
endif()

include_directories(
Expand Down

0 comments on commit 4940a43

Please sign in to comment.