Skip to content

Commit 508b5fd

Browse files
authored
Merge pull request #1818 from borglab/frank/cmake
Update cmake
2 parents 3aca281 + 7b96d1e commit 508b5fd

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
cmake_minimum_required(VERSION 3.0)
1+
cmake_minimum_required(VERSION 3.5)
2+
cmake_policy(SET CMP0082 NEW) # install from sub-directories immediately
3+
cmake_policy(SET CMP0102 NEW) # set policy on advanced variables and cmake cache
4+
cmake_policy(SET CMP0156 NEW) # new linker strategies
5+
cmake_policy(SET CMP0167 OLD) # Don't complain about boost
26

37
# Set the version number for the library
48
set (GTSAM_VERSION_MAJOR 4)

cmake/HandleBoost.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ endif()
2525
set(BOOST_FIND_MINIMUM_VERSION 1.65)
2626
set(BOOST_FIND_MINIMUM_COMPONENTS serialization system filesystem thread program_options date_time timer chrono regex)
2727

28-
find_package(Boost ${BOOST_FIND_MINIMUM_VERSION} COMPONENTS ${BOOST_FIND_MINIMUM_COMPONENTS})
28+
find_package(Boost ${BOOST_FIND_MINIMUM_VERSION} COMPONENTS ${BOOST_FIND_MINIMUM_COMPONENTS} REQUIRED)
2929

3030
# Required components
3131
if(NOT Boost_SERIALIZATION_LIBRARY OR NOT Boost_SYSTEM_LIBRARY OR NOT Boost_FILESYSTEM_LIBRARY OR

cmake/example_cmake_find_gtsam/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file shows how to build and link a user project against GTSAM using CMake
22
###################################################################################
33
# To create your own project, replace "example" with the actual name of your project
4-
cmake_minimum_required(VERSION 3.0)
4+
cmake_minimum_required(VERSION 3.5)
55
project(example CXX)
66

77
# Find GTSAM, either from a local build, or from a Debian/Ubuntu package.

0 commit comments

Comments
 (0)