Make building of metis/partition optional via cmake flag
parent
49c11e8fa7
commit
e98b90bd2a
|
@ -25,8 +25,11 @@ if(NOT GTSAM_USE_SYSTEM_EIGEN)
|
||||||
FILES_MATCHING PATTERN "*.h")
|
FILES_MATCHING PATTERN "*.h")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
option(GTSAM_BUILD_METIS "Build metis library" ON)
|
||||||
option(GTSAM_BUILD_METIS_EXECUTABLES "Build metis library executables" OFF)
|
option(GTSAM_BUILD_METIS_EXECUTABLES "Build metis library executables" OFF)
|
||||||
|
if(GTSAM_BUILD_METIS)
|
||||||
add_subdirectory(metis-5.1.0)
|
add_subdirectory(metis-5.1.0)
|
||||||
|
endif(GTSAM_BUILD_METIS)
|
||||||
############ NOTE: When updating GeographicLib be sure to disable building their examples
|
############ NOTE: When updating GeographicLib be sure to disable building their examples
|
||||||
############ and unit tests by commenting out their lines:
|
############ and unit tests by commenting out their lines:
|
||||||
# add_subdirectory (examples)
|
# add_subdirectory (examples)
|
||||||
|
|
|
@ -8,6 +8,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_definitions(-Wno-unknown-pragmas)
|
add_definitions(-Wno-unknown-pragmas)
|
||||||
|
add_definitions(-Wunused-but-set-variable)
|
||||||
|
|
||||||
set(GKLIB_PATH ${PROJECT_SOURCE_DIR}/GKlib CACHE PATH "path to GKlib")
|
set(GKLIB_PATH ${PROJECT_SOURCE_DIR}/GKlib CACHE PATH "path to GKlib")
|
||||||
set(SHARED FALSE CACHE BOOL "build a shared library")
|
set(SHARED FALSE CACHE BOOL "build a shared library")
|
||||||
|
|
|
@ -6,10 +6,13 @@ set (gtsam_unstable_subdirs
|
||||||
discrete
|
discrete
|
||||||
dynamics
|
dynamics
|
||||||
nonlinear
|
nonlinear
|
||||||
partition
|
|
||||||
slam
|
slam
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(GTSAM_BUILD_METIS) # Only build partition if metis is built
|
||||||
|
set (gtsam_unstable_subdirs ${gtsam_unstable_subdirs} partition)
|
||||||
|
endif(GTSAM_BUILD_METIS)
|
||||||
|
|
||||||
set(GTSAM_UNSTABLE_BOOST_LIBRARIES ${GTSAM_BOOST_LIBRARIES})
|
set(GTSAM_UNSTABLE_BOOST_LIBRARIES ${GTSAM_BOOST_LIBRARIES})
|
||||||
|
|
||||||
add_custom_target(check.unstable COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure)
|
add_custom_target(check.unstable COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure)
|
||||||
|
@ -47,10 +50,13 @@ set(gtsam_unstable_srcs
|
||||||
${discrete_srcs}
|
${discrete_srcs}
|
||||||
${dynamics_srcs}
|
${dynamics_srcs}
|
||||||
${nonlinear_srcs}
|
${nonlinear_srcs}
|
||||||
${partition_srcs}
|
|
||||||
${slam_srcs}
|
${slam_srcs}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(GTSAM_BUILD_METIS) # Only build partition if metis is built
|
||||||
|
set (gtsam_unstable_srcs ${gtsam_unstable_srcs} ${partition_srcs})
|
||||||
|
endif(GTSAM_BUILD_METIS)
|
||||||
|
|
||||||
# Versions - same as core gtsam library
|
# Versions - same as core gtsam library
|
||||||
set(gtsam_unstable_version ${GTSAM_VERSION_MAJOR}.${GTSAM_VERSION_MINOR}.${GTSAM_VERSION_PATCH})
|
set(gtsam_unstable_version ${GTSAM_VERSION_MAJOR}.${GTSAM_VERSION_MINOR}.${GTSAM_VERSION_PATCH})
|
||||||
set(gtsam_unstable_soversion ${GTSAM_VERSION_MAJOR})
|
set(gtsam_unstable_soversion ${GTSAM_VERSION_MAJOR})
|
||||||
|
|
Loading…
Reference in New Issue