diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 4ed1403f1..274cbd7a6 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -3,6 +3,10 @@ option(GLM_QUIET "No CMake Message" OFF) option(GLM_TEST_ENABLE "Build unit tests" ON) option(GLM_PERF_TEST_ENABLE "Build perf tests" OFF) +if(GLM_PERF_TEST_ENABLE) + add_definitions(-DGLM_TEST_PERF) +endif() + # Compiler and default options if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") diff --git a/test/gtc/gtc_bitfield.cpp b/test/gtc/gtc_bitfield.cpp index d571356dd..d73e95748 100644 --- a/test/gtc/gtc_bitfield.cpp +++ b/test/gtc/gtc_bitfield.cpp @@ -1021,9 +1021,10 @@ int main() { int Error = 0; - std::clock_t const LastTime = std::clock(); - Error += ::bitfieldInterleave::test(); + +#ifdef GLM_TEST_PERF + Error += ::bitfieldInterleave3::test(); Error += ::bitfieldInterleave4::test(); @@ -1033,15 +1034,18 @@ int main() Error += ::bitfieldInterleave::perf(); +#endif//GLM_TEST_PERF + Error += ::mask::test(); + +#ifdef GLM_TEST_PERF + Error += ::mask::perf(); +#endif//GLM_TEST_PERF + Error += test_bitfieldRotateRight(); Error += test_bitfieldRotateLeft(); - std::clock_t const Time = std::clock() - LastTime; - - std::printf("gtc_bitfield %d clocks\n", static_cast(Time)); - return Error; }