Commit 5fc4fdd8 authored by Konstantinos Chatzilygeroudis's avatar Konstantinos Chatzilygeroudis
Browse files

Switch to CTest option and remove useless check

parent 2ade4c88
Pipeline #17284 passed with stage
in 1 minute and 9 seconds
......@@ -27,7 +27,6 @@ SET(PROJECT_URL "https://github.com/${PROJECT_ORG}/${PROJECT_NAME}")
# Project options
OPTION(TRACE_SOLVER "trace solver on stderr" OFF)
OPTION(BUILD_TESTS "build tests" ON)
# Project configuration
SET(PROJECT_USE_CMAKE_EXPORT TRUE)
......@@ -37,9 +36,7 @@ SET(PROJECT_CUSTOM_HEADER_EXTENSION "hpp")
# JRL-cmakemodule setup
INCLUDE(cmake/base.cmake)
IF(BUILD_TESTS)
INCLUDE(cmake/boost.cmake)
ENDIF(BUILD_TESTS)
INCLUDE(cmake/boost.cmake)
# Project definition
COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
......@@ -47,9 +44,9 @@ PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
# Project dependencies
ADD_PROJECT_DEPENDENCY(Eigen3 REQUIRED)
IF(BUILD_TESTS)
IF(BUILD_TESTING)
FIND_PACKAGE(Boost REQUIRED COMPONENTS unit_test_framework)
ENDIF(BUILD_TESTS)
ENDIF(BUILD_TESTING)
# Main Library
SET(${PROJECT_NAME}_HEADERS
......@@ -73,6 +70,6 @@ TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} SYSTEM PUBLIC ${EIGEN3_INCLUDE_DIR})
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
INSTALL(TARGETS ${PROJECT_NAME} EXPORT ${TARGETS_EXPORT_NAME} DESTINATION lib)
IF(BUILD_TESTS)
IF(BUILD_TESTING)
ADD_SUBDIRECTORY(tests)
ENDIF(BUILD_TESTS)
ENDIF(BUILD_TESTING)
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