From bee02242df7be1e33e8ef3df67f67818ff131896 Mon Sep 17 00:00:00 2001 From: c9s Date: Fri, 16 May 2014 22:41:19 +0800 Subject: [PATCH] Fix CFLAGS for std=99 --- CMakeLists.txt | 2 +- src/CMakeLists.txt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cc0935b..9f316c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ find_package(Jemalloc REQUIRED) set(LIBS ${LIBS} ${PCRE_LIBRARIES} ${Jemalloc_LIBRARIES} r3) -set (CMAKE_CFLAGS "-Wall -pipe -g3 -funroll-loops") +set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -pipe -g3 -funroll-loops") # set (CMAKE_CXX_FLAGS "-std=c++0x -arch x86_64 -stdlib=libc++ -g3 -Wall -O0") enable_testing() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 02bbdda..6b61a8d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,7 +4,8 @@ include_directories("${PROJECT_SOURCE_DIR}/include") # install(TARGETS swiftnav-static DESTINATION lib${LIB_SUFFIX}) set(R3_SRCS node.c str.c list.c token.c edge.c) -set(CMAKE_CFLAGS "-Wall -pipe -g3 -funroll-loops") +set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -pipe -g3 -funroll-loops") + # set(LIBS ${LIBS} ${PCRE_LIBRARIES} ${Judy_LIBRARIES} ${Jemalloc_LIBRARIES} r3) set(LIBS ${LIBS} ${PCRE_LIBRARIES} ${Jemalloc_LIBRARIES} r3)