Enabling the use of #ifdef DEBUG as a platform neutral idiom

This commit is contained in:
Bradley Austin Davis 2015-03-31 13:32:13 -07:00
parent 971108494a
commit 02b69f4a70
2 changed files with 4 additions and 1 deletions

View file

@ -26,6 +26,7 @@ set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMakeTargets")
project(hifi)
add_definitions(-DGLM_FORCE_RADIANS)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
if (WIN32)
add_definitions(-DNOMINMAX -D_CRT_SECURE_NO_WARNINGS)

View file

@ -66,7 +66,9 @@ QDataStream& operator>>(QDataStream& in, glm::quat& quaternion) {
}
// less common utils can be enabled with DEBUG
#ifdef DEBUG
// FIXME, remove the second defined clause once these compile, or remove the
// functions.
#if defined(DEBUG) && defined(FIXED_STREAMS)
std::ostream& operator<<(std::ostream& s, const CollisionInfo& c) {
s << "{penetration=" << c._penetration