We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 92b219a + f7afae3 commit e3ca623Copy full SHA for e3ca623
CMakeLists.txt
@@ -181,16 +181,21 @@ endif()
181
if (TARGET vix_warnings)
182
target_link_libraries(vix_utils ${_VIX_UTILS_SCOPE} vix_warnings)
183
else()
184
+ set(_VIX_UTILS_WARN_SCOPE PRIVATE)
185
+ if (VIX_HEADER_ONLY)
186
+ set(_VIX_UTILS_WARN_SCOPE INTERFACE)
187
+ endif()
188
+
189
if (NOT MSVC)
- target_compile_options(vix_utils PRIVATE
190
+ target_compile_options(vix_utils ${_VIX_UTILS_WARN_SCOPE}
191
-Wall -Wextra -Wpedantic
192
-Wno-array-bounds
193
-Wno-stringop-overflow
194
)
195
endif()
196
197
if (VIX_STRICT AND NOT MSVC)
- target_compile_options(vix_utils PRIVATE -Werror)
198
+ target_compile_options(vix_utils ${_VIX_UTILS_WARN_SCOPE} -Werror)
199
200
201
0 commit comments