mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 10:08:59 +00:00
12 lines
596 B
Diff
12 lines
596 B
Diff
|
--- a/CMakeLists.txt
|
||
|
+++ b/CMakeLists.txt
|
||
|
@@ -265,7 +265,7 @@ message(STATUS "Wrote ${PROJECT_BINARY_D
|
||
|
configure_file(${PROJECT_SOURCE_DIR}/cmake/json_config.h.in ${PROJECT_BINARY_DIR}/json_config.h)
|
||
|
message(STATUS "Wrote ${PROJECT_BINARY_DIR}/json_config.h")
|
||
|
|
||
|
-if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
|
||
|
+if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
|
||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections")
|
||
|
if ("${DISABLE_WERROR}" STREQUAL "OFF")
|
||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
|