Enforce C99 explicitly

This commit is contained in:
lazymio 2022-10-12 11:51:15 +02:00
parent 20a4e5b718
commit ba21990427
No known key found for this signature in database
GPG Key ID: DFF27E34A47CB873
2 changed files with 4 additions and 0 deletions

View File

@ -564,6 +564,7 @@ add_library(capstone::capstone ALIAS capstone)
target_include_directories(capstone PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
)
set_property(TARGET capstone PROPERTY C_STANDARD 99)
if(BUILD_SHARED_LIBS)
target_compile_definitions(capstone PUBLIC CAPSTONE_SHARED)

View File

@ -45,6 +45,9 @@ else
CFLAGS ?= -O3
endif
# C99 has been enforced elsewhere like xcode
CFLAGS += -std=gnu99
ifneq (,$(findstring yes,$(CAPSTONE_X86_ATT_DISABLE)))
CFLAGS += -DCAPSTONE_X86_ATT_DISABLE
endif