Skip to content

Commit

Permalink
Enforce C99 explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
wtdcode committed Oct 12, 2022
1 parent 20a4e5b commit ba21990
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ba21990

Please sign in to comment.