Cleaned up flags for building examples and tests
parent
0e4b5269c5
commit
218500de11
|
@ -47,7 +47,6 @@ endif()
|
||||||
|
|
||||||
# Configurable Options
|
# Configurable Options
|
||||||
option(GTSAM_BUILD_TIMING "Enable/Disable building of timing scripts" OFF) # These do not currently work
|
option(GTSAM_BUILD_TIMING "Enable/Disable building of timing scripts" OFF) # These do not currently work
|
||||||
option(GTSAM_BUILD_EXAMPLES "Enable/Disable building of examples" ON)
|
|
||||||
if(GTSAM_UNSTABLE_AVAILABLE)
|
if(GTSAM_UNSTABLE_AVAILABLE)
|
||||||
option(GTSAM_BUILD_UNSTABLE "Enable/Disable libgtsam_unstable" ON)
|
option(GTSAM_BUILD_UNSTABLE "Enable/Disable libgtsam_unstable" ON)
|
||||||
endif()
|
endif()
|
||||||
|
@ -82,17 +81,6 @@ endif()
|
||||||
set(CPACK_SOURCE_GENERATOR "TGZ" CACHE STRING "CPack Default Source Generator")
|
set(CPACK_SOURCE_GENERATOR "TGZ" CACHE STRING "CPack Default Source Generator")
|
||||||
set(CPACK_GENERATOR "TGZ" CACHE STRING "CPack Default Binary Generator")
|
set(CPACK_GENERATOR "TGZ" CACHE STRING "CPack Default Binary Generator")
|
||||||
|
|
||||||
# Flags to determine whether examples are build during 'make install'
|
|
||||||
# Note that these remove the targets from the 'all'
|
|
||||||
option(GTSAM_DISABLE_EXAMPLES_ON_INSTALL "Disables building examples during install" OFF)
|
|
||||||
|
|
||||||
# Pull in infrastructure
|
|
||||||
if (GTSAM_BUILD_TESTS)
|
|
||||||
enable_testing()
|
|
||||||
include(Dart)
|
|
||||||
include(CTest)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Find boost
|
# Find boost
|
||||||
|
|
||||||
|
@ -362,9 +350,9 @@ set(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-dev (>= 1.43)") #Example: "libc6 (>=
|
||||||
message(STATUS "===============================================================")
|
message(STATUS "===============================================================")
|
||||||
message(STATUS "================ Configuration Options ======================")
|
message(STATUS "================ Configuration Options ======================")
|
||||||
message(STATUS "Build flags ")
|
message(STATUS "Build flags ")
|
||||||
print_config_flag(${GTSAM_BUILD_TIMING} "Build Timing scripts ")
|
|
||||||
print_config_flag(${GTSAM_BUILD_EXAMPLES} "Build Examples ")
|
|
||||||
print_config_flag(${GTSAM_BUILD_TESTS} "Build Tests ")
|
print_config_flag(${GTSAM_BUILD_TESTS} "Build Tests ")
|
||||||
|
print_config_flag(${GTSAM_BUILD_EXAMPLES_ALWAYS} "Build examples with 'make all' ")
|
||||||
|
print_config_flag(${GTSAM_BUILD_TIMING} "Build Timing scripts ")
|
||||||
if (DOXYGEN_FOUND)
|
if (DOXYGEN_FOUND)
|
||||||
print_config_flag(${GTSAM_BUILD_DOCS} "Build Docs ")
|
print_config_flag(${GTSAM_BUILD_DOCS} "Build Docs ")
|
||||||
endif()
|
endif()
|
||||||
|
@ -373,7 +361,6 @@ print_config_flag(${GTSAM_BUILD_TYPE_POSTFIXES} "Put build type in librar
|
||||||
if(GTSAM_UNSTABLE_AVAILABLE)
|
if(GTSAM_UNSTABLE_AVAILABLE)
|
||||||
print_config_flag(${GTSAM_BUILD_UNSTABLE} "Build libgtsam_unstable ")
|
print_config_flag(${GTSAM_BUILD_UNSTABLE} "Build libgtsam_unstable ")
|
||||||
endif()
|
endif()
|
||||||
print_config_flag(${GTSAM_DISABLE_EXAMPLES_ON_INSTALL} "No examples in all or install ")
|
|
||||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" cmake_build_type_toupper)
|
string(TOUPPER "${CMAKE_BUILD_TYPE}" cmake_build_type_toupper)
|
||||||
if(NOT MSVC AND NOT XCODE_VERSION)
|
if(NOT MSVC AND NOT XCODE_VERSION)
|
||||||
message(STATUS " Build type : ${CMAKE_BUILD_TYPE}")
|
message(STATUS " Build type : ${CMAKE_BUILD_TYPE}")
|
||||||
|
|
|
@ -3,13 +3,7 @@
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|
||||||
option(GTSAM_BUILD_TESTS "Enable/Disable building of tests" ON)
|
option(GTSAM_BUILD_TESTS "Enable/Disable building of tests" ON)
|
||||||
|
option(GTSAM_BUILD_EXAMPLES_ALWAYS "Build examples with 'make all' (build with 'make examples' if not)" ON)
|
||||||
# Enable make check (http://www.cmake.org/Wiki/CMakeEmulateMakeCheck)
|
|
||||||
if(GTSAM_BUILD_TESTS)
|
|
||||||
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> --output-on-failure)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_custom_target(timing)
|
|
||||||
|
|
||||||
# Add option for combining unit tests
|
# Add option for combining unit tests
|
||||||
if(MSVC OR XCODE_VERSION)
|
if(MSVC OR XCODE_VERSION)
|
||||||
|
@ -19,6 +13,14 @@ else()
|
||||||
endif()
|
endif()
|
||||||
mark_as_advanced(GTSAM_SINGLE_TEST_EXE)
|
mark_as_advanced(GTSAM_SINGLE_TEST_EXE)
|
||||||
|
|
||||||
|
# Enable make check (http://www.cmake.org/Wiki/CMakeEmulateMakeCheck)
|
||||||
|
if(GTSAM_BUILD_TESTS)
|
||||||
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> --output-on-failure)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_custom_target(timing)
|
||||||
|
add_custom_target(examples)
|
||||||
|
|
||||||
# Macro for adding a group of tests relative to the current directory.
|
# Macro for adding a group of tests relative to the current directory.
|
||||||
# globPatterns: e.g. "test*.cpp", or a list of globs, e.g. "testA*.cpp;testB*.cpp".
|
# globPatterns: e.g. "test*.cpp", or a list of globs, e.g. "testA*.cpp;testB*.cpp".
|
||||||
# excludedFiles: list of files or globs to exclude, e.g. "testC*.cpp;testBroken.cpp".
|
# excludedFiles: list of files or globs to exclude, e.g. "testC*.cpp;testBroken.cpp".
|
||||||
|
|
Loading…
Reference in New Issue