mirror of
https://github.com/recp/cglm.git
synced 2025-10-03 16:51:35 +00:00
@@ -32,18 +32,23 @@ if(CGLM_USE_C99)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
add_definitions(-DNDEBUG -D_WINDOWS -D_USRDLL)
|
add_definitions(-D_WINDOWS -D_USRDLL)
|
||||||
add_compile_options(/W3 /Ox /Gy /Oi /TC)
|
|
||||||
|
if(NOT CMAKE_BUILD_TYPE MATCHES Debug)
|
||||||
# Ref: https://skia.googlesource.com/third_party/sdl/+/refs/heads/master/CMakeLists.txt#225
|
add_definitions(-DNDEBUG)
|
||||||
# Make sure /RTC1 is disabled, otherwise it will use functions from the CRT
|
add_compile_options(/W3 /Ox /Gy /Oi /TC)
|
||||||
foreach(flag_var
|
foreach(flag_var
|
||||||
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
||||||
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
|
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
|
||||||
string(REGEX REPLACE "/RTC(su|[1su])" "" ${flag_var} "${${flag_var}}")
|
string(REGEX REPLACE "/RTC(su|[1su])" "" ${flag_var} "${${flag_var}}")
|
||||||
endforeach(flag_var)
|
endforeach(flag_var)
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
add_compile_options(-Wall -O3)
|
add_compile_options(-Wall)
|
||||||
|
|
||||||
|
if(NOT CMAKE_BUILD_TYPE MATCHES Debug)
|
||||||
|
add_compile_options(-O3)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
get_directory_property(hasParent PARENT_DIRECTORY)
|
get_directory_property(hasParent PARENT_DIRECTORY)
|
||||||
|
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
#ifndef cglm_io_h
|
#ifndef cglm_io_h
|
||||||
#define cglm_io_h
|
#define cglm_io_h
|
||||||
#if defined(DEBUG) || defined(_DEBUG) \
|
#if !defined(NDEBUG) \
|
||||||
|| defined(CGLM_DEFINE_PRINTS) || defined(CGLM_LIB_SRC) \
|
|| defined(CGLM_DEFINE_PRINTS) || defined(CGLM_LIB_SRC) \
|
||||||
|| defined(CGLM_NO_PRINTS_NOOP)
|
|| defined(CGLM_NO_PRINTS_NOOP)
|
||||||
|
|
||||||
|
@@ -69,7 +69,7 @@
|
|||||||
# include "simd/wasm/mat4.h"
|
# include "simd/wasm/mat4.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifndef NDEBUG
|
||||||
# include <assert.h>
|
# include <assert.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -376,7 +376,7 @@ void
|
|||||||
glm_mat4_mulN(mat4 * __restrict matrices[], uint32_t len, mat4 dest) {
|
glm_mat4_mulN(mat4 * __restrict matrices[], uint32_t len, mat4 dest) {
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifndef NDEBUG
|
||||||
assert(len > 1 && "there must be least 2 matrices to go!");
|
assert(len > 1 && "there must be least 2 matrices to go!");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user