Skip to content

Commit d28e572

Browse files
committed
cmake : fix add_compile_options on macOS
1 parent f3040be commit d28e572

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,7 @@ endif()
422422
if (LLAMA_ALL_WARNINGS)
423423
if (NOT MSVC)
424424
set(warning_flags -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function)
425-
set(c_flags -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int
426-
-Werror=implicit-function-declaration)
425+
set(c_flags -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Werror=implicit-function-declaration)
427426
set(cxx_flags -Wmissing-declarations -Wmissing-noreturn)
428427
set(host_cxx_flags "")
429428

@@ -455,7 +454,8 @@ if (LLAMA_ALL_WARNINGS)
455454
set(c_flags ${c_flags} ${warning_flags})
456455
set(cxx_flags ${cxx_flags} ${warning_flags})
457456
add_compile_options("$<$<COMPILE_LANGUAGE:C>:${c_flags}>"
458-
"$<$<COMPILE_LANGUAGE:CXX>:${cxx_flags} ${host_cxx_flags}>")
457+
"$<$<COMPILE_LANGUAGE:CXX>:${cxx_flags}>"
458+
"$<$<COMPILE_LANGUAGE:CXX>:${host_cxx_flags}>")
459459

460460
endif()
461461

0 commit comments

Comments
 (0)