fixed error messages showing in release mode
This commit is contained in:
parent
837fe1cd39
commit
57c6d122a8
@ -38,8 +38,12 @@ set(LIB_ROOT ${DEPENDENCIES_ROOT}/lib/${SYSTEM_LIB_PATH})
|
|||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIB_ROOT}) #for SHARED
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIB_ROOT}) #for SHARED
|
||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIB_ROOT}) #for STATIC
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIB_ROOT}) #for STATIC
|
||||||
|
|
||||||
|
if(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||||
|
set(CPP_DEFINES -DRENDER_DEBUG)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_library(${LIBRARY_NAME} STATIC ${LIB_SRC_LIST})
|
add_library(${LIBRARY_NAME} STATIC ${LIB_SRC_LIST})
|
||||||
add_definitions(-std=c++11)
|
add_definitions(-std=c++11 ${CPP_DEFINES})
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${INCLUDE_ROOT}
|
${INCLUDE_ROOT}
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#ifdef RENDER_DEBUG
|
||||||
#define STR(x) #x
|
#define STR(x) #x
|
||||||
#define glAssert(code) \
|
#define glAssert(code) \
|
||||||
code; \
|
code; \
|
||||||
@ -19,6 +20,9 @@
|
|||||||
std::cerr<<"Erreur OpenGL ("<<__FILE__<<":"<<__LINE__<<", "<<STR(code)<<") : "<<(const char*)gluErrorString (err)<<"("<<err<<")"<<std::endl; \
|
std::cerr<<"Erreur OpenGL ("<<__FILE__<<":"<<__LINE__<<", "<<STR(code)<<") : "<<(const char*)gluErrorString (err)<<"("<<err<<")"<<std::endl; \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
#define glAssert(code) code;
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // GLASSERT
|
#endif // GLASSERT
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user