From 74f6f0f70f8eb0a073e20008b962a415c6c9c9f9 Mon Sep 17 00:00:00 2001 From: Gyorgy Szing Date: Sat, 5 Mar 2022 02:18:06 +0000 Subject: [PATCH 2/2] Fix stop overriding C_FLAGS from environment. Directly setting CMAKE_C_FLAGS is bad practice as it is overriding values taken from C_FLAGS environment variable or from CMAKE_C_FLAGS_INIT. The latter is used in toolchain files or in initial cache files. Signed-off-by: Gyorgy Szing --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 343b325..3b43a2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ project(t_cose LANGUAGES C VERSION 1.0.1) -set(CMAKE_C_FLAGS "-pedantic -Wall -O3 -ffunction-sections") +add_compile_options(-pedantic -Wall -O3 -ffunction-sections) include_directories(inc) include_directories(src) -- 2.17.1