M cmake/modules/Utils.cmake => cmake/modules/Utils.cmake +8 -2
@@ 21,9 21,15 @@ macro(print_var VARIABLE)
endmacro()
function(strip_executable TARGET)
+ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ set(STRIP_PARAMS "-S")
+ else()
+ set(STRIP_PARAMS --strip-debug --strip-unneeded)
+ endif ()
+
if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
add_custom_command(TARGET ${TARGET} POST_BUILD
- COMMAND ${CMAKE_STRIP} --strip-debug --strip-unneeded $<TARGET_FILE:${TARGET}>
+ COMMAND ${CMAKE_STRIP} ${STRIP_PARAMS} $<TARGET_FILE:${TARGET}>
COMMENT "Striping ${TARGET}"
)
endif()
@@ 33,7 39,7 @@ function(strip_executable TARGET)
COMMAND ${CMAKE_OBJCOPY} --only-keep-debug
$<TARGET_FILE:${TARGET}>
$<TARGET_FILE:${TARGET}>.debug
- COMMAND ${CMAKE_STRIP} --strip-debug --strip-unneeded $<TARGET_FILE:${TARGET}>
+ COMMAND ${CMAKE_STRIP} ${STRIP_PARAMS} $<TARGET_FILE:${TARGET}>
COMMAND ${CMAKE_OBJCOPY} --add-gnu-debuglink=$<TARGET_FILE:${TARGET}>.debug
$<TARGET_FILE:${TARGET}>
COMMENT "Striping ${TARGET}"
M module-bluetooth/CMakeLists.txt => module-bluetooth/CMakeLists.txt +1 -0
@@ 55,6 55,7 @@ target_compile_options(${PROJECT_NAME}
-Wno-missing-field-initializers
-Wno-unused-function
-Wno-implicit-fallthrough
+ -Wno-stringop-truncation
# C only flags
"$<$<COMPILE_LANGUAGE:C>:-Wno-old-style-declaration>"
)
M third-party/libical/CMakeLists.txt => third-party/libical/CMakeLists.txt +7 -0
@@ 3,4 3,11 @@ SET(STATIC_ONLY TRUE)
SET(ICAL_BUILD_DOCS FALSE)
SET(ICAL_GLIB FALSE)
SET(LIBICAL_BUILD_TESTING FALSE)
+
+include(libical/cmake/modules/LibIcalMacrosInternal.cmake)
+
+# Turn off false positive errors caused by calls to strncpy and snprintf.
+libical_add_cflag(-Wno-format-truncation NO_FORMAT_TRUNCATION)
+libical_add_cflag(-Wno-stringop-truncation NO_STRINGOP_TRUNCATION)
+
add_subdirectory(libical)
M third-party/lwext4/CMakeLists.txt => third-party/lwext4/CMakeLists.txt +1 -0
@@ 16,6 16,7 @@ target_include_directories(lwext4
target_compile_options(lwext4
PRIVATE
-Wno-format
+ -Wno-stringop-truncation
)
target_sources(lwext4