1
0
mirror of https://github.com/fumiama/simple-protobuf.git synced 2026-06-05 00:10:24 +08:00

Update CMakeLists.txt

This commit is contained in:
源文雨
2021-06-08 20:01:05 +08:00
committed by GitHub
parent 958d03697a
commit 47ccaabf62

View File

@@ -8,11 +8,9 @@ if (${isBigEndian})
add_definitions(-DWORDS_BIGENDIAN)
endif()
#判断编译器类型,如果是gcc编译器,则在编译选项中加入c99支持
if(CMAKE_COMPILER_IS_GNUCXX)
add_compile_options(-std=c99)
message(STATUS "optional:-std=c99")
endif(CMAKE_COMPILER_IS_GNUCXX)
#在编译选项中加入c99支持
add_compile_options(-std=c99)
message(STATUS "optional:-std=c99")
add_library(spb SHARED protobuf.c)
add_library(spb_static STATIC protobuf.c)