Skip to content

Commit

Permalink
Add a cache variable to allow not running tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
florent-lamiraux committed Dec 29, 2016
1 parent 6b8b8a5 commit 0b8f544
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,16 @@ if (EIGEN3_FOUND)
endif (FCL_HAVE_EIGEN)
endif (EIGEN3_FOUND)

# Add a cache variable to allow not compiling and running tests
set (RUN_TESTS TRUE CACHE BOOL "compile and run unit tests")

# Required dependencies
set(BOOST_COMPONENTS thread date_time filesystem system unit_test_framework)
if (RUN_TESTS)
set(BOOST_COMPONENTS thread date_time filesystem system unit_test_framework)
else ()
set(BOOST_COMPONENTS thread date_time system)
endif ()

search_for_boost()
# Optional dependencies
add_optional_dependency("octomap >= 1.6")
Expand Down Expand Up @@ -170,7 +178,9 @@ SET(${PROJECT_NAME}_HEADERS
)

add_subdirectory(src)
add_subdirectory(test)
if (RUN_TESTS)
add_subdirectory(test)
endif ()

pkg_config_append_libs("hpp-fcl")
PKG_CONFIG_APPEND_BOOST_LIBS(thread date_time filesystem system)
Expand Down

0 comments on commit 0b8f544

Please sign in to comment.