diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index dfb2a3d..d24851b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,13 +1,15 @@ -enable_testing() +if (DEFINED FGL_ENABLE_TESTS) + enable_testing() -file(GLOB_RECURSE FGL_TEST_SOURCES "*.cpp") + file(GLOB_RECURSE FGL_TEST_SOURCES "*.cpp") -add_executable(FGLTests ${FGL_TEST_SOURCES}) -target_link_libraries(FGLTests FGLEngine Catch2::Catch2WithMain) -target_compile_definitions(FGLTests PUBLIC GLM_FORCE_RADIANS GLM_FORCE_DEPTH_ZERO_TO_ONE GLM_FORCE_LEFT_HANDED) + add_executable(FGLTests ${FGL_TEST_SOURCES}) + target_link_libraries(FGLTests FGLEngine Catch2::Catch2WithMain) + target_compile_definitions(FGLTests PUBLIC GLM_FORCE_RADIANS GLM_FORCE_DEPTH_ZERO_TO_ONE GLM_FORCE_LEFT_HANDED) -include(CTest) -include(Catch) -catch_discover_tests(FGLTests) \ No newline at end of file + include(CTest) + include(Catch) + catch_discover_tests(FGLTests) +endif () \ No newline at end of file