Skip to content

Commit

Permalink
Build unit tests with 'make' if unit testing is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
vigsterkr committed Aug 1, 2013
1 parent c2a6966 commit 2660db7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/unit/CMakeLists.txt
Expand Up @@ -9,12 +9,12 @@ set_target_properties(gtest PROPERTIES COMPILE_DEFINITIONS "${DEFINES}")

FILE(GLOB_RECURSE UNITTEST_SRC *_unittest.cc)

ADD_EXECUTABLE(shogun-unit-test EXCLUDE_FROM_ALL ${UNITTEST_SRC})
ADD_EXECUTABLE(shogun-unit-test ${UNITTEST_SRC})
target_link_libraries(shogun-unit-test shogun gmock gtest)
set_target_properties(shogun-unit-test PROPERTIES COMPILE_DEFINITIONS "${DEFINES}")

ADD_CUSTOM_TARGET(unit-tests
COMMAND ./shogun-unit-test
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/shogun-unit-test
DEPENDS shogun-unit-test)

add_test(unit-tests shogun-unit-test)
add_test(unit-test shogun-unit-test)

0 comments on commit 2660db7

Please sign in to comment.