summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2023-10-12 14:31:05 +0300
committerGeorgi Gerganov <ggerganov@gmail.com>2023-10-12 14:31:05 +0300
commitd28e572c0270eb72649dbcc3a347e36c05c2934a (patch)
tree3439bedb941e6bc542554fe51345438039749dfb
parentf3040beaab5228b1a9dfe5675a200379478f7204 (diff)
cmake : fix add_compile_options on macOS
-rw-r--r--CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9184eda8..6af42a6c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -422,8 +422,7 @@ endif()
if (LLAMA_ALL_WARNINGS)
if (NOT MSVC)
set(warning_flags -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function)
- set(c_flags -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int
- -Werror=implicit-function-declaration)
+ set(c_flags -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Werror=implicit-function-declaration)
set(cxx_flags -Wmissing-declarations -Wmissing-noreturn)
set(host_cxx_flags "")
@@ -455,7 +454,8 @@ if (LLAMA_ALL_WARNINGS)
set(c_flags ${c_flags} ${warning_flags})
set(cxx_flags ${cxx_flags} ${warning_flags})
add_compile_options("$<$<COMPILE_LANGUAGE:C>:${c_flags}>"
- "$<$<COMPILE_LANGUAGE:CXX>:${cxx_flags} ${host_cxx_flags}>")
+ "$<$<COMPILE_LANGUAGE:CXX>:${cxx_flags}>"
+ "$<$<COMPILE_LANGUAGE:CXX>:${host_cxx_flags}>")
endif()