• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1if(NOT MSVC)
2    SET(CMAKE_BUILD_TYPE "Debug")
3    if(CMAKE_SYSTEM_NAME MATCHES "Windows")
4        SET(CMAKE_C_FLAGS_DEBUG "$ENV{CFLAGS} -fPIC -O0 -Wall -Wno-deprecated-declarations -g2 -ggdb -fno-inline-functions -fno-omit-frame-pointer -fstack-protector-all")
5    else ()
6        SET(CMAKE_C_FLAGS_DEBUG "$ENV{CFLAGS} -Wno-nullability-completeness -fPIC -O0 -Wall -Wno-deprecated-declarations -g2 -ggdb -fno-inline-functions -fno-omit-frame-pointer -fstack-protector-all -D_LIBCPP_INLINE_VISIBILITY='' -D'_LIBCPP_EXTERN_TEMPLATE(...)='")
7    endif()
8    SET(CMAKE_C_FLAGS_RELEASE "$ENV{CFLAGS} -fPIC -O3 -Wall -Wno-deprecated-declarations -fstack-protector-all")
9    set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
10
11    #add flags
12    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/usr/local/include -Werror")
13endif()
14
15include_directories(./include)
16add_subdirectory(src)
17