mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
cmake: check again for unknown documentation commands
This commit is contained in:

committed by
Sam Lantinga

parent
cc0fa00049
commit
b8adf90aa3
@@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user