compile definitions for conditionally compiling

release/4.3a0
kartik arcot 2023-01-04 13:29:44 -08:00
parent c7e18e64e5
commit 610a73cfe1
1 changed files with 10 additions and 2 deletions

View File

@ -6,7 +6,11 @@ if(NOT DEFINED CMAKE_MACOSX_RPATH)
set(CMAKE_MACOSX_RPATH 0)
endif()
set(CMAKE_CXX_STANDARD 17)
option(GTSAM_NO_BOOST_CPP17 "Require and use boost" ON)
if (GTSAM_NO_BOOST_CPP17)
set(CMAKE_CXX_STANDARD 17)
endif()
# Set the version number for the library
set (GTSAM_VERSION_MAJOR 4)
@ -53,7 +57,11 @@ endif()
include(cmake/HandleGeneralOptions.cmake) # CMake build options
# Libraries:
include(cmake/HandleBoost.cmake) # Boost
if (GTSAM_NO_BOOST_CPP17)
include(cmake/HandleBoost.cmake) # Boost
add_definitions(-DNO_BOOST_CPP17)
endif()
include(cmake/HandleCCache.cmake) # ccache
include(cmake/HandleCPack.cmake) # CPack
include(cmake/HandleEigen.cmake) # Eigen3