force -Werror=return-type on mods
Some checks failed
Build Binaries / Build Windows (push) Has been cancelled
Build Binaries / Build macOS (push) Has been cancelled
Build Binaries / Build Android (64-bit) (push) Has been cancelled
Build Binaries / Build Android (32-bit) (push) Has been cancelled
Build Binaries / Publish (push) Has been cancelled

This commit is contained in:
dankmeme01 2024-09-16 17:22:51 +02:00
parent 60a528a76a
commit 6add0cbfec

View file

@ -212,6 +212,11 @@ if (WIN32)
endif() endif()
endif() endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# force an error on a missing return type, as this is unfortunately a common mistake people make
target_compile_options(${PROJECT_NAME} INTERFACE -Werror=return-type)
endif()
# if (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # if (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# set_property(TARGET ${PROJECT_NAME} PROPERTY LINKER_TYPE LLD) # set_property(TARGET ${PROJECT_NAME} PROPERTY LINKER_TYPE LLD)
# target_link_options(${PROJECT_NAME} INTERFACE -fuse-ld=lld) # target_link_options(${PROJECT_NAME} INTERFACE -fuse-ld=lld)