mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-05-31 09:02:00 +00:00
- Simplify CMake GCC and Clang checking.
Introduce the variable 'ZD_CMAKE_COMPILER_IS_GNUC(XX)_COMPATIBLE' and replace any occurrence of '"${CMAKE_C(XX)_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C(XX)_COMPILER_ID}" STREQUAL "Clang"' with it. This makes it possible to add more GCC compatible compilers in just one place.
This commit is contained in:
parent
8aff59e704
commit
1a3ac9d0b3
9 changed files with 42 additions and 29 deletions
|
@ -2,9 +2,9 @@ cmake_minimum_required( VERSION 2.4 )
|
|||
|
||||
make_release_only()
|
||||
|
||||
if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||
if( ZD_CMAKE_COMPILER_IS_GNUC_COMPATIBLE )
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -fomit-frame-pointer" )
|
||||
endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||
endif( ZD_CMAKE_COMPILER_IS_GNUC_COMPATIBLE )
|
||||
|
||||
add_library( jpeg
|
||||
jcomapi.c
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue