Unverified Commit fe4ca439 authored by Justin Carpentier's avatar Justin Carpentier Committed by GitHub
Browse files

Merge pull request #72 from jcarpent/devel

Do not build test by default
parents fb1bad00 99aa85c0
......@@ -19,7 +19,6 @@ INCLUDE(cmake/test.cmake)
SET(PROJECT_NAME eigenpy)
SET(PROJECT_DESCRIPTION "Wrapping Eigen3 -- numpy")
SET(PROJECT_URL "http://github.com/stack-of-tasks/eigenpy")
OPTION(INSTALL_DOCUMENTATION "Generate and install the documentation" FALSE)
# Disable -Werror on Unix for now.
SET(CXX_DISABLE_WERROR True)
......@@ -47,11 +46,17 @@ ELSE(WIN32)
SET(LINK create_symlink)
ENDIF(WIN32)
# ----------------------------------------------------
# --- OPTIONS ---------------------------------------
# ----------------------------------------------------
OPTION (BUILD_UNIT_TESTS "Build the unitary tests" ON)
OPTION(INSTALL_DOCUMENTATION "Generate and install the documentation" FALSE)
OPTION(BUILD_UNIT_TESTS "Build the unitary tests" OFF)
IF(BUILD_UNIT_TESTS)
SET(DISABLE_TESTS OFF)
ELSE(BUILD_UNIT_TESTS)
SET(DISABLE_TESTS ON)
ENDIF(BUILD_UNIT_TESTS)
FINDPYTHON()
......
Subproject commit b48288b990f3f022c5c55bb0689bad50b6751bed
Subproject commit adfd258cb9368f67b4e84d110110d57ee3ab2f42
......@@ -3,15 +3,20 @@
# Copyright (c) 2018-2019 INRIA
#
MACRO(ADD_LIB_UNIT_TEST test PKGS)
CREATE_CTEST_BUILD_TESTS_TARGET()
IF (BUILD_UNIT_TESTS)
ADD_LIBRARY(${test} SHARED ${test})
ELSE (BUILD_UNIT_TESTS)
ADD_LIBRARY(${test} SHARED EXCLUDE_FROM_ALL ${test})
ENDIF (BUILD_UNIT_TESTS)
FOREACH(PKG ${PKGS})
PKG_CONFIG_USE_DEPENDENCY(${test} ${PKG})
ENDFOREACH(PKG)
TARGET_LINK_LIBRARIES(${test} ${PROJECT_NAME})
TARGET_LINK_BOOST_PYTHON(${test})
SET_TARGET_PROPERTIES(${test} PROPERTIES PREFIX "")
......@@ -22,10 +27,12 @@ MACRO(ADD_LIB_UNIT_TEST test PKGS)
ENDIF(APPLE)
ADD_TEST(NAME ${test} COMMAND ${PYTHON_EXECUTABLE} -c "import ${test}")
ADD_DEPENDENCIES(check ${test})
ENDMACRO(ADD_LIB_UNIT_TEST)
ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND})
ADD_DEPENDENCIES(build_tests ${test})
IF(DISABLE_TESTS)
SET_TESTS_PROPERTIES(${test} PROPERTIES DEPENDS ctest_build_tests)
ENDIF(DISABLE_TESTS)
ENDMACRO(ADD_LIB_UNIT_TEST)
ADD_LIB_UNIT_TEST(matrix "eigen3")
ADD_LIB_UNIT_TEST(geometry "eigen3")
......
Supports Markdown
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