Commit 69ac54cc authored by gabrielebndn's avatar gabrielebndn Committed by Justin Carpentier
Browse files

Deprecate BUILD_UNIT_TESTS (#142)

* Default BUILD_TESTING to OFF

* Deprecate BUILD_UNIT_TESTS and remove its usage

* Revert "Default BUILD_TESTING to OFF"

This reverts commit 102bf6fb30ce77bfe195b296482406b4b6a81b41.

* [BUILD_UNIT_TESTS] Better deprecation message
parent 6e5ecf7e
......@@ -45,13 +45,13 @@ ENDIF(WIN32)
# --- OPTIONS ---------------------------------------
# ----------------------------------------------------
OPTION(INSTALL_DOCUMENTATION "Generate and install the documentation" FALSE)
OPTION(BUILD_UNIT_TESTS "Build the unitary tests" OFF)
IF(BUILD_UNIT_TESTS)
SET(BUILD_TESTING ON)
ELSE(BUILD_UNIT_TESTS)
SET(BUILD_TESTING OFF)
ENDIF(BUILD_UNIT_TESTS)
IF(DEFINED BUILD_UNIT_TESTS)
MESSAGE(AUTHOR_WARNING "BUILD_UNIT_TESTS is deprecated. Use BUILD_TESTING instead.\
If you are manually building Pinocchio from source in an existing build folder,\
we suggest that you delete your build folder and make a new one.")
SET(BUILD_TESTING ${BUILD_UNIT_TESTS})
ENDIF(DEFINED BUILD_UNIT_TESTS)
FINDPYTHON()
FIND_NUMPY()
......
......@@ -6,11 +6,11 @@
MACRO(ADD_LIB_UNIT_TEST test PKGS)
CREATE_CTEST_BUILD_TESTS_TARGET()
IF(BUILD_UNIT_TESTS)
IF(BUILD_TESTING)
ADD_LIBRARY(${test} SHARED ${test})
ELSE(BUILD_UNIT_TESTS)
ELSE(BUILD_TESTING)
ADD_LIBRARY(${test} SHARED EXCLUDE_FROM_ALL ${test})
ENDIF(BUILD_UNIT_TESTS)
ENDIF(BUILD_TESTING)
FOREACH(PKG ${PKGS})
PKG_CONFIG_USE_DEPENDENCY(${test} ${PKG})
......@@ -24,9 +24,9 @@ MACRO(ADD_LIB_UNIT_TEST test PKGS)
ADD_TEST(NAME ${test} COMMAND ${PYTHON_EXECUTABLE} -c "import ${test}")
ADD_DEPENDENCIES(build_tests ${test})
IF(NOT BUILD_UNIT_TESTS)
IF(NOT BUILD_TESTING)
SET_TESTS_PROPERTIES(${test} PROPERTIES DEPENDS ctest_build_tests)
ENDIF(NOT BUILD_UNIT_TESTS)
ENDIF(NOT BUILD_TESTING)
ENDMACRO(ADD_LIB_UNIT_TEST)
ADD_LIB_UNIT_TEST(matrix "eigen3")
......
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