|
@@ -578,10 +578,26 @@ if(USE_GCC OR USE_CLANG)
|
|
|
endif()
|
|
|
endif()
|
|
|
target_compile_options(sdl-global-options INTERFACE "-Wdocumentation")
|
|
|
+ endif()
|
|
|
|
|
|
- check_c_compiler_flag(-fcomment-block-commands=threadsafety HAVE_GCC_COMMENT_BLOCK_COMMANDS)
|
|
|
- if(HAVE_GCC_COMMENT_BLOCK_COMMANDS)
|
|
|
- target_compile_options(sdl-global-options INTERFACE "-fcomment-block-commands=threadsafety")
|
|
|
+ check_c_compiler_flag(-Wdocumentation-unknown-command HAVE_GCC_WDOCUMENTATION_UNKNOWN_COMMAND)
|
|
|
+ if(HAVE_GCC_WDOCUMENTATION_UNKNOWN_COMMAND)
|
|
|
+ if(SDL_WERROR)
|
|
|
+ check_c_compiler_flag(-Werror=documentation-unknown-command HAVE_GCC_WERROR_DOCUMENTATION_UNKNOWN_COMMAND)
|
|
|
+ if(HAVE_GCC_WERROR_DOCUMENTATION_UNKNOWN_COMMAND)
|
|
|
+ target_compile_options(sdl-global-options INTERFACE "-Werror=documentation-unknown-command")
|
|
|
+ endif()
|
|
|
+ endif()
|
|
|
+ target_compile_options(sdl-global-options INTERFACE "-Wdocumentation-unknown-command")
|
|
|
+ endif()
|
|
|
+
|
|
|
+ check_c_compiler_flag(-fcomment-block-commands=threadsafety HAVE_GCC_COMMENT_BLOCK_COMMANDS)
|
|
|
+ if(HAVE_GCC_COMMENT_BLOCK_COMMANDS)
|
|
|
+ target_compile_options(sdl-global-options INTERFACE "-fcomment-block-commands=threadsafety")
|
|
|
+ else()
|
|
|
+ check_c_compiler_flag(/clang:-fcomment-block-commands=threadsafety HAVE_CLANG_COMMENT_BLOCK_COMMANDS)
|
|
|
+ if(HAVE_CLANG_COMMENT_BLOCK_COMMANDS)
|
|
|
+ target_compile_options(sdl-global-options INTERFACE "/clang:-fcomment-block-commands=threadsafety")
|
|
|
endif()
|
|
|
endif()
|
|
|
|