Commit df009745 authored by Jan Möbius's avatar Jan Möbius

Add unittests always, if google test was found

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@534 fdac6126-5c0c-442c-9429-916003d36597
parent 798cc087
......@@ -9,13 +9,15 @@ include_directories (
find_package(GoogleTest)
if(GTEST_FOUND)
enable_testing()
# Set correct include paths so that the compiler can find the headers
include_directories(${GTEST_INCLUDE_DIRS})
# set additional link directories
link_directories(${GTEST_LIBRARY_DIR} )
# Create new target named unittests_hexmeshing
add_executable(unittests EXCLUDE_FROM_ALL unittests.cc)
add_executable(unittests unittests.cc)
if ( NOT WIN32)
# Link against all necessary libraries
......@@ -50,6 +52,8 @@ if(GTEST_FOUND)
acg_copy_after_build(unittests ${CMAKE_CURRENT_SOURCE_DIR}/TestFiles ${CMAKE_BINARY_DIR}/Unittests/)
add_test(NAME AllTestsIn_OpenMesh_tests WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/Unittests" COMMAND "${CMAKE_BINARY_DIR}/Unittests/unittests")
else(GTEST_FOUND)
message("Google testing framework was not found!")
endif(GTEST_FOUND)
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