1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 11:19:10 +00:00

Set HS_DEBUGGING properly on non-MSVC compilers

This commit is contained in:
2015-02-13 20:47:49 -08:00
parent 598f5f47ec
commit 9b37590ca8
2 changed files with 9 additions and 2 deletions

View File

@ -45,9 +45,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
// Ensure these get set consistently regardless of what module includes it // Ensure these get set consistently regardless of what module includes it
#include "hsCompilerSpecific.h" #include "hsCompilerSpecific.h"
#if (defined(_DEBUG) || defined(UNIX_DEBUG)) #if defined(_DEBUG)
# define HS_DEBUGGING # define HS_DEBUGGING
#endif // defined(_DEBUG) || defined(UNIX_DENUG) #endif
//====================================== //======================================
// Some standard includes // Some standard includes

View File

@ -11,6 +11,13 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
endif() endif()
endif() endif()
# MSVC automatically defines -D_DEBUG when /MTd or /MDd is set, so we
# need to make sure it gets added for other compilers too
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
endif()
# Compile-time type size checks # Compile-time type size checks
include(CheckTypeSize) include(CheckTypeSize)