@@ -48,18 +48,18 @@ if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG OR APPLE)
48
48
target_compile_options (ArkReactor
49
49
PUBLIC
50
50
-Wall -Wextra -pedantic -Wstrict-aliasing
51
- -Wno-unknown-pragmas # We use pragmas to disable warnings we understand.
51
+ -Wshadow
52
+ -Wconversion
53
+ -Werror
54
+ # Allow deprecation warnings to not be treated as errors
55
+ -Wno-error=deprecated-declarations
56
+ # We use pragmas to disable warnings we understand.
52
57
# So we need to disable the warning about pragmas.
53
- -Wno-unknown-warning-option # Disable warnings about disabling warnings we have
54
- # disabled.
58
+ -Wno-unknown-pragmas
59
+ # Disable warnings about disabling warnings we have disabled.
60
+ -Wno-unknown-warning-option
55
61
)
56
62
57
- if (CMAKE_COMPILER_IS_GNUCXX)
58
- # The package utf8 has an issue with constant overflow.
59
- # Once this is fixed remove this flag:
60
- target_compile_options (ArkReactor PUBLIC -Wno-overflow)
61
- endif ()
62
-
63
63
if (APPLE )
64
64
# The standard SSH libraries are depreciate on APPLE.
65
65
# Thus they currently generate a warning that we have to ignore for now.
@@ -105,7 +105,7 @@ add_subdirectory("${ark_SOURCE_DIR}/lib/termcolor" EXCLUDE_FROM_ALL)
105
105
target_link_libraries (ArkReactor PUBLIC termcolor)
106
106
107
107
target_include_directories (ArkReactor
108
- PUBLIC
108
+ SYSTEM PUBLIC
109
109
"${ark_SOURCE_DIR} /lib/picosha2/"
110
110
"${ark_SOURCE_DIR} /lib/fmt/include" )
111
111
@@ -161,7 +161,10 @@ if (ARK_PROFILER_MIPS)
161
161
endif ()
162
162
163
163
if (ARK_BUILD_MODULES)
164
+ get_directory_property (old_dir_compile_options COMPILE_OPTIONS)
165
+ add_compile_options (-w)
164
166
add_subdirectory (${ark_SOURCE_DIR} /lib/modules)
167
+ set_directory_properties (PROPERTIES COMPILE_OPTIONS "${old_dir_compile_options} " )
165
168
endif ()
166
169
167
170
# TODO: consider using ctest
@@ -201,18 +204,10 @@ if (ARK_BUILD_EXE)
201
204
${ark_SOURCE_DIR} /lib/fmt/src/format.cc)
202
205
add_executable (arkscript ${EXE_SOURCES} )
203
206
204
- if (MSVC )
205
- # Disable warnings for lib/replxx
206
- # This is a separate module we don't control so can't fix the code without help.
207
- # Disable warnings when compiling this package remove when resolved.
208
- # /wd4267: conversion from 'size_t' to 'type', possible loss of data
209
- # /wd4244: conversion from 'type1' to 'type2', possible loss of data
210
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4244" )
211
- endif ()
212
-
213
207
add_subdirectory ("${ark_SOURCE_DIR} /lib/replxx" EXCLUDE_FROM_ALL )
214
208
add_subdirectory ("${ark_SOURCE_DIR} /lib/clipp" EXCLUDE_FROM_ALL )
215
209
210
+ target_include_directories (arkscript SYSTEM PUBLIC "${ark_SOURCE_DIR} /lib/clipp/include" )
216
211
target_link_libraries (arkscript PUBLIC ArkReactor replxx clipp termcolor)
217
212
target_compile_features (arkscript PRIVATE cxx_std_20)
218
213
0 commit comments