Verified Commit 051303b1 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

cmake: reflect change in the CMake module

parent 799045cc
......@@ -14,7 +14,6 @@ INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/python.cmake)
INCLUDE(cmake/ide.cmake)
INCLUDE(cmake/test.cmake)
SET(PROJECT_NAME eigenpy)
SET(PROJECT_DESCRIPTION "Wrapping Eigen3 -- numpy")
......@@ -25,6 +24,7 @@ SET(CXX_DISABLE_WERROR True)
SET(CMAKE_VERBOSE_MAKEFILE True)
SETUP_PROJECT()
MESSAGE(STATUS "BUILD_TESTING=${BUILD_TESTING}")
STRING(REPLACE "-pedantic" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
IF(APPLE)
......@@ -53,9 +53,9 @@ 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)
SET(BUILD_TESTING ON)
ELSE(BUILD_UNIT_TESTS)
SET(DISABLE_TESTS ON)
SET(BUILD_TESTING OFF)
ENDIF(BUILD_UNIT_TESTS)
FINDPYTHON()
......
......@@ -3,15 +3,14 @@
# Copyright (c) 2018-2019 INRIA
#
MACRO(ADD_LIB_UNIT_TEST test PKGS)
CREATE_CTEST_BUILD_TESTS_TARGET()
IF (BUILD_UNIT_TESTS)
IF(BUILD_UNIT_TESTS)
ADD_LIBRARY(${test} SHARED ${test})
ELSE (BUILD_UNIT_TESTS)
ELSE(BUILD_UNIT_TESTS)
ADD_LIBRARY(${test} SHARED EXCLUDE_FROM_ALL ${test})
ENDIF (BUILD_UNIT_TESTS)
ENDIF(BUILD_UNIT_TESTS)
FOREACH(PKG ${PKGS})
PKG_CONFIG_USE_DEPENDENCY(${test} ${PKG})
......@@ -29,9 +28,9 @@ MACRO(ADD_LIB_UNIT_TEST test PKGS)
ADD_TEST(NAME ${test} COMMAND ${PYTHON_EXECUTABLE} -c "import ${test}")
ADD_DEPENDENCIES(build_tests ${test})
IF(DISABLE_TESTS)
IF(NOT BUILD_UNIT_TESTS)
SET_TESTS_PROPERTIES(${test} PROPERTIES DEPENDS ctest_build_tests)
ENDIF(DISABLE_TESTS)
ENDIF(NOT BUILD_UNIT_TESTS)
ENDMACRO(ADD_LIB_UNIT_TEST)
ADD_LIB_UNIT_TEST(matrix "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