2020-03-27 14:49:12 +08:00
|
|
|
SET(CMAKE_BUILD_TYPE "Debug")
|
2020-04-16 21:44:20 +08:00
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
|
2020-04-15 17:36:48 +08:00
|
|
|
SET(CMAKE_C_FLAGS_DEBUG "$ENV{CFLAGS} -fPIC -O0 -Wall -Wno-deprecated-declarations -g2 -ggdb -fno-inline-functions -fno-omit-frame-pointer")
|
|
|
|
else()
|
|
|
|
SET(CMAKE_C_FLAGS_DEBUG "$ENV{CFLAGS} -fPIC -O0 -Wall -Wno-deprecated-declarations -g2 -ggdb -fno-inline-functions -fno-omit-frame-pointer -D_LIBCPP_INLINE_VISIBILITY='' -D'_LIBCPP_EXTERN_TEMPLATE(...)='")
|
|
|
|
endif()
|
2020-03-27 14:49:12 +08:00
|
|
|
SET(CMAKE_C_FLAGS_RELEASE "$ENV{CFLAGS} -fPIC -O3 -Wall -Wno-deprecated-declarations")
|
|
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
|
|
|
|
#add flags
|
2020-04-18 09:41:25 +08:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/usr/local/include -Werror")
|
2020-03-27 14:49:12 +08:00
|
|
|
|
|
|
|
include_directories(./include)
|
|
|
|
add_subdirectory(src)
|