Commit 6945e3ad authored by Jan Möbius's avatar Jan Möbius
Browse files

Added flag to make builds of tests optional via cmake flag

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@541 fdac6126-5c0c-442c-9429-916003d36597
parent 7b0b866d
......@@ -5,10 +5,15 @@ include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
)
# Search for gtest headers and libraries
find_package(GoogleTest)
if ( NOT DEFINED OPENMESH_BUILD_UNIT_TESTS)
set( OPENMESH_BUILD_UNIT_TESTS false CACHE BOOL "Enable or disable unit test builds in OpenMesh." )
endif()
if(GTEST_FOUND)
if ( OPENMESH_BUILD_UNIT_TESTS )
# Search for gtest headers and libraries
find_package(GoogleTest)
if(GTEST_FOUND)
enable_testing()
......@@ -54,6 +59,7 @@ if(GTEST_FOUND)
add_test(NAME AllTestsIn_OpenMesh_tests WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/Unittests" COMMAND "${CMAKE_BINARY_DIR}/Unittests/unittests")
else(GTEST_FOUND)
else(GTEST_FOUND)
message("Google testing framework was not found!")
endif(GTEST_FOUND)
endif(GTEST_FOUND)
endif()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment