From 56698bb3178b606dec6749cf1f893acceca4ca62 Mon Sep 17 00:00:00 2001 From: Kevin Zheng Date: Fri, 22 Jan 2021 15:04:01 -0800 Subject: [PATCH] Use add_definitions instead of overriding CFLAGS --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 54669a1..85235b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ MATH(EXPR SIZEOF_VOID_P_BITS "${CMAKE_SIZEOF_VOID_P}*8") # Ignore no-implicit-function-declaration warnings for now, since there are so many - and it then becomes # easier to see other warnings popping up. -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSIZEOF_VOID_P=${SIZEOF_VOID_P_BITS} -Wno-implicit-function-declaration") +add_definitions("-DSIZEOF_VOID_P=${SIZEOF_VOID_P_BITS} -Wno-implicit-function-declaration") CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/config-build.h)