Skip to content

Commit 06089d4

Browse files
committed
Added separate CMakeLists to the external directory. There, the extra warnings are removed from
options. The warnings cannot eventually be fixed anyway
1 parent ea8b00a commit 06089d4

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

CMakeLists.txt

+1-14
Original file line numberDiff line numberDiff line change
@@ -150,20 +150,7 @@ add_custom_command(
150150
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
151151
)
152152

153-
add_subdirectory(external/tiny-stl)
154-
155-
set(CAPSTONE_BUILD_STATIC_RUNTIME OFF CACHE BOOL "Embed static runtime")
156-
set(CAPSTONE_BUILD_STATIC ON CACHE BOOL "Build static library")
157-
set(CAPSTONE_BUILD_SHARED OFF CACHE BOOL "Build shared library")
158-
set(CAPSTONE_BUILD_DIET OFF CACHE BOOL "Build diet library")
159-
set(CAPSTONE_BUILD_TESTS OFF CACHE BOOL "Build tests")
160-
set(CAPSTONE_BUILD_CSTOOL OFF CACHE BOOL "Build cstool")
161-
set(CAPSTONE_USE_DEFAULT_ALLOC OFF CACHE BOOL "Use default memory allocation functions")
162-
set(CAPSTONE_ARCHITECTURE_DEFAULT OFF CACHE BOOL "Whether architectures are enabled by default")
163-
set(CAPSTONE_INSTALL OFF CACHE BOOL "Generate install target")
164-
set(CAPSTONE_M68K_SUPPORT ON CACHE BOOL "CAPSTONE_M68K_SUPPORT")
165-
166-
add_subdirectory(external/capstone)
153+
add_subdirectory(external)
167154

168155
target_link_libraries(Emu68.elf tinystl capstone-static)
169156
target_include_directories(Emu68.elf PRIVATE ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/external/capstone/include)

external/CMakeLists.txt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# In external repositories do not enfore the pedantic/restrictive compile flags
2+
# Get the COMPILE_OPTIONS property for local scope, remove unnecessary items and
3+
# set the property again
4+
get_property(opt DIRECTORY PROPERTY COMPILE_OPTIONS)
5+
list(REMOVE_ITEM opt "-Wall" "-Wextra" "-Werror" "-Wpedantic" "-pedantic")
6+
set_property(DIRECTORY PROPERTY COMPILE_OPTIONS "${opt}")
7+
8+
# Some capstone specific settings
9+
set(CAPSTONE_BUILD_STATIC_RUNTIME OFF CACHE BOOL "Embed static runtime")
10+
set(CAPSTONE_BUILD_STATIC ON CACHE BOOL "Build static library")
11+
set(CAPSTONE_BUILD_SHARED OFF CACHE BOOL "Build shared library")
12+
set(CAPSTONE_BUILD_DIET OFF CACHE BOOL "Build diet library")
13+
set(CAPSTONE_BUILD_TESTS OFF CACHE BOOL "Build tests")
14+
set(CAPSTONE_BUILD_CSTOOL OFF CACHE BOOL "Build cstool")
15+
set(CAPSTONE_USE_DEFAULT_ALLOC OFF CACHE BOOL "Use default memory allocation functions")
16+
set(CAPSTONE_ARCHITECTURE_DEFAULT OFF CACHE BOOL "Whether architectures are enabled by default")
17+
set(CAPSTONE_INSTALL OFF CACHE BOOL "Generate install target")
18+
set(CAPSTONE_M68K_SUPPORT ON CACHE BOOL "CAPSTONE_M68K_SUPPORT")
19+
20+
add_subdirectory(capstone)
21+
add_subdirectory(tiny-stl)

0 commit comments

Comments
 (0)