1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 00:15:58 +01:00

Refactor generator expressions for CMake

This commit is contained in:
Fabian Zahn
2021-02-27 11:14:43 +01:00
parent fa32e530ba
commit 4cfb39290a

View File

@@ -99,11 +99,12 @@ set_target_properties(${PROJECT_NAME}
target_compile_options(${PROJECT_NAME} target_compile_options(${PROJECT_NAME}
PRIVATE PRIVATE
$<$<C_COMPILER_ID:Clang>:-Wcast-align # Clang
$<$<C_COMPILER_ID:Clang>:
-Wcast-align
-Wcast-qual -Wcast-qual
-Wconversion -Wconversion
-Wexit-time-destructors -Wexit-time-destructors
-Wextra-semi-stmt
-Wglobal-constructors -Wglobal-constructors
-Wmissing-noreturn -Wmissing-noreturn
-Wmissing-prototypes -Wmissing-prototypes
@@ -112,8 +113,13 @@ target_compile_options(${PROJECT_NAME}
-Wshadow -Wshadow
-Wweak-vtables -Wweak-vtables
-Werror -Werror
-Wall> -Wall
$<$<C_COMPILER_ID:GNU>:-Waddress $<$<VERSION_GREATER_EQUAL:$<C_COMPILER_VERSION>,8.0.0>:-Wextra-semi-stmt>
>
# GCC
$<$<C_COMPILER_ID:GNU>:
-Waddress
-Waggregate-return -Waggregate-return
-Wformat-nonliteral -Wformat-nonliteral
-Wformat-security -Wformat-security
@@ -129,8 +135,13 @@ target_compile_options(${PROJECT_NAME}
-Wwrite-strings -Wwrite-strings
-Wpointer-arith -Wpointer-arith
-Werror -Werror
-Wall> -Wall
$<$<C_COMPILER_ID:MSVC>:/Wall> >
# MSVC
$<$<C_COMPILER_ID:MSVC>:
/Wall
>
) )
write_basic_package_version_file(${PROJECT_NAME}ConfigVersion.cmake write_basic_package_version_file(${PROJECT_NAME}ConfigVersion.cmake