diff --git a/CMakeLists.txt b/CMakeLists.txt index 818af5b2..a03df974 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,11 +13,6 @@ if(NOT GLM_TEST_ENABLE) message(STATUS "GLM is a header only library, no need to build it. Set the option GLM_TEST_ENABLE with ON to build and run the test bench") endif() -option(GLM_PERF_ENABLE "GLM perf" OFF) -if(GLM_PERF_ENABLE) - add_definitions(-DGLM_TEST_ENABLE_PERF) -endif() - if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") AND UNIX)) option(GLM_TEST_ENABLE_CXX_98 "Enable C++ 98" OFF) option(GLM_TEST_ENABLE_CXX_0X "Enable C++ 0x" OFF) diff --git a/test/core/core_func_common.cpp b/test/core/core_func_common.cpp index 5bef95d7..b5429373 100644 --- a/test/core/core_func_common.cpp +++ b/test/core/core_func_common.cpp @@ -1156,7 +1156,7 @@ int main() Error += isnan_::test(); Error += isinf_::test(); -# ifdef GLM_TEST_ENABLE_PERF +# ifdef NDEBUG Error += sign::perf(); # endif diff --git a/test/core/core_func_integer.cpp b/test/core/core_func_integer.cpp index 47c26bf1..39938d6d 100644 --- a/test/core/core_func_integer.cpp +++ b/test/core/core_func_integer.cpp @@ -1578,7 +1578,7 @@ int main() Error += ::bitfieldInsert::test(); Error += ::bitfieldExtract::test(); -# ifdef GLM_TEST_ENABLE_PERF +# ifdef NDEBUG Error += ::bitCount::perf(); Error += ::bitfieldReverse::perf(); Error += ::findMSB::perf(); diff --git a/test/core/core_func_integer_bit_count.cpp b/test/core/core_func_integer_bit_count.cpp index ea196e12..9fed38dc 100644 --- a/test/core/core_func_integer_bit_count.cpp +++ b/test/core/core_func_integer_bit_count.cpp @@ -207,7 +207,7 @@ void error(int x, int y) int main() { -# ifdef GLM_TEST_ENABLE_PERF +# ifdef NDEBUG int i, n; static int test[] = {0,0, 1,1, 2,1, 3,2, 4,1, 5,2, 6,2, 7,3, @@ -318,5 +318,5 @@ int main() if (errors == 0) printf("Passed all %d cases.\n", sizeof(test)/8); -# endif//GLM_TEST_ENABLE_PERF +# endif//NDEBUG } diff --git a/test/core/core_func_integer_find_lsb.cpp b/test/core/core_func_integer_find_lsb.cpp index 12e419dd..1f21c0ff 100644 --- a/test/core/core_func_integer_find_lsb.cpp +++ b/test/core/core_func_integer_find_lsb.cpp @@ -292,7 +292,7 @@ void error(int x, int y) { int main() { -# ifdef GLM_TEST_ENABLE_PERF +# ifdef NDEBUG int i, m, n; static unsigned test[] = {0,32, 1,0, 2,1, 3,0, 4,2, 5,0, 6,1, 7,0, @@ -427,5 +427,5 @@ int main() if (errors == 0) printf("Passed all %d cases.\n", sizeof(test)/8); -# endif//GLM_TEST_ENABLE_PERF +# endif//NDEBUG } diff --git a/test/core/core_func_integer_find_msb.cpp b/test/core/core_func_integer_find_msb.cpp index 176a6ea6..a1a7c323 100644 --- a/test/core/core_func_integer_find_msb.cpp +++ b/test/core/core_func_integer_find_msb.cpp @@ -331,7 +331,7 @@ void error(int x, int y) { int main() { -# ifdef GLM_TEST_ENABLE_PERF +# ifdef NDEBUG int i, n; static unsigned test[] = {0,32, 1,31, 2,30, 3,30, 4,29, 5,29, 6,29, @@ -464,5 +464,5 @@ int main() if (errors == 0) printf("Passed all %d cases.\n", sizeof(test)/8); -# endif//GLM_TEST_ENABLE_PERF +# endif//NDEBUG } diff --git a/test/core/core_func_matrix.cpp b/test/core/core_func_matrix.cpp index 61f11d75..727f39b3 100644 --- a/test/core/core_func_matrix.cpp +++ b/test/core/core_func_matrix.cpp @@ -263,13 +263,13 @@ int main() Error += test_determinant(); Error += test_inverse(); -# ifdef GLM_TEST_ENABLE_PERF +# ifdef NDEBUG for(std::size_t i = 0; i < 1; ++i) { Error += test_inverse_perf(i, "mat4"); Error += test_inverse_perf(i, "dmat4"); } -# endif +# endif//NDEBUG return Error; } diff --git a/test/core/core_type_vec4.cpp b/test/core/core_type_vec4.cpp index 7d4b80d8..602ecc96 100644 --- a/test/core/core_type_vec4.cpp +++ b/test/core/core_type_vec4.cpp @@ -448,10 +448,10 @@ int main() std::size_t const Size(1000000); -# ifdef GLM_TEST_ENABLE_PERF +# ifdef NDEBUG Error += test_vec4_perf_AoS(Size); Error += test_vec4_perf_SoA(Size); -# endif +# endif//NDEBUG Error += test_vec4_ctor(); Error += test_vec4_size(); diff --git a/test/gtc/gtc_bitfield.cpp b/test/gtc/gtc_bitfield.cpp index ab5dab87..7c447c33 100644 --- a/test/gtc/gtc_bitfield.cpp +++ b/test/gtc/gtc_bitfield.cpp @@ -664,10 +664,10 @@ int main() Error += ::bitfieldInterleave::test(); //Error += ::bitRevert::test(); -# ifdef GLM_TEST_ENABLE_PERF +# ifdef NDEBUG Error += ::mask::perf(); Error += ::bitfieldInterleave::perf(); -# endif +# endif//NDEBUG return Error; } diff --git a/test/gtc/gtc_integer.cpp b/test/gtc/gtc_integer.cpp index f671c17f..b306b843 100644 --- a/test/gtc/gtc_integer.cpp +++ b/test/gtc/gtc_integer.cpp @@ -263,9 +263,9 @@ int main() Error += ::log2_::test(); Error += ::mod_::test(); -# ifdef GLM_TEST_ENABLE_PERF +# ifdef NDEBUG Error += ::log2_::perf(); -# endif +# endif//NDEBUG return Error; } diff --git a/test/gtc/gtc_round.cpp b/test/gtc/gtc_round.cpp index 13137b3f..d2f242b3 100644 --- a/test/gtc/gtc_round.cpp +++ b/test/gtc/gtc_round.cpp @@ -300,9 +300,9 @@ int main() Error += isPowerOfTwo::test(); Error += ceilPowerOfTwo::test(); -# ifdef GLM_TEST_ENABLE_PERF +# ifdef NDEBUG Error += ceilPowerOfTwo::perf(); -# endif +# endif//NDEBUG return Error; } diff --git a/test/gtx/gtx_fast_trigonometry.cpp b/test/gtx/gtx_fast_trigonometry.cpp index d0c671e6..de1e6b39 100644 --- a/test/gtx/gtx_fast_trigonometry.cpp +++ b/test/gtx/gtx_fast_trigonometry.cpp @@ -178,14 +178,14 @@ int main() { int Error(0); -# ifdef GLM_TEST_ENABLE_PERF +# ifdef NDEBUG Error += ::fastCos::perf(); Error += ::fastSin::perf(); Error += ::fastTan::perf(); Error += ::fastAcos::perf(); Error += ::fastAsin::perf(); Error += ::fastAtan::perf(); -# endif +# endif//NDEBUG return Error; }