mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 06:42:12 +00:00
- Use release compiler flags for debug builds of third party libraries.
This commit is contained in:
parent
b9a1528747
commit
3e90b65014
7 changed files with 22 additions and 0 deletions
|
@ -37,6 +37,16 @@ function( add_pk3 PK3_NAME PK3_DIR )
|
|||
DEPENDS ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} )
|
||||
endfunction( add_pk3 )
|
||||
|
||||
# Macro for building libraries without debugging information
|
||||
macro( make_release_only )
|
||||
set( CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_RELEASE} )
|
||||
set( CMAKE_C_FLAGS_MINSIZEREL ${CMAKE_C_FLAGS_RELEASE} )
|
||||
set( CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELEASE} )
|
||||
set( CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_RELEASE} )
|
||||
set( CMAKE_CXX_FLAGS_MINSIZEREL ${CMAKE_CXX_FLAGS_RELEASE} )
|
||||
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELEASE} )
|
||||
endmacro( make_release_only )
|
||||
|
||||
IF( NOT CMAKE_BUILD_TYPE )
|
||||
SET( CMAKE_BUILD_TYPE Debug CACHE STRING
|
||||
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel."
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
cmake_minimum_required( VERSION 2.4 )
|
||||
|
||||
make_release_only()
|
||||
|
||||
if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" )
|
||||
endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
cmake_minimum_required( VERSION 2.4 )
|
||||
|
||||
make_release_only()
|
||||
|
||||
include( CheckFunctionExists )
|
||||
|
||||
# DUMB is much slower in a Debug build than a Release build, so we force a Release
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
cmake_minimum_required( VERSION 2.4 )
|
||||
include( CheckCXXCompilerFlag )
|
||||
|
||||
make_release_only()
|
||||
|
||||
# I don't plan on debugging this, so make it a release build.
|
||||
if( NOT CMAKE_BUILD_TYPE MATCHES "Release" )
|
||||
set( CMAKE_BUILD_TYPE "RelWithDebInfo" )
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
cmake_minimum_required( VERSION 2.4 )
|
||||
|
||||
make_release_only()
|
||||
|
||||
if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" )
|
||||
endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
cmake_minimum_required( VERSION 2.4 )
|
||||
|
||||
make_release_only()
|
||||
|
||||
if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" )
|
||||
endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
cmake_minimum_required(VERSION 2.4.4)
|
||||
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
|
||||
|
||||
make_release_only()
|
||||
|
||||
project(zlib C)
|
||||
|
||||
set(VERSION "1.2.7")
|
||||
|
|
Loading…
Reference in a new issue