Merge pull request #1237 from borglab/jose-fixes
commit
fb8d6abb21
|
@ -190,7 +190,7 @@ if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT MSVC)
|
if (NOT MSVC)
|
||||||
option(GTSAM_BUILD_WITH_MARCH_NATIVE "Enable/Disable building with all instructions supported by native architecture (binary may not be portable!)" ON)
|
option(GTSAM_BUILD_WITH_MARCH_NATIVE "Enable/Disable building with all instructions supported by native architecture (binary may not be portable!)" OFF)
|
||||||
if(GTSAM_BUILD_WITH_MARCH_NATIVE AND (APPLE AND NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64"))
|
if(GTSAM_BUILD_WITH_MARCH_NATIVE AND (APPLE AND NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64"))
|
||||||
# Add as public flag so all dependant projects also use it, as required
|
# Add as public flag so all dependant projects also use it, as required
|
||||||
# by Eigen to avid crashes due to SIMD vectorization:
|
# by Eigen to avid crashes due to SIMD vectorization:
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Option for using system Eigen or GTSAM-bundled Eigen
|
# Option for using system Eigen or GTSAM-bundled Eigen
|
||||||
|
# Default: Use system's Eigen if found automatically:
|
||||||
option(GTSAM_USE_SYSTEM_EIGEN "Find and use system-installed Eigen. If 'off', use the one bundled with GTSAM" OFF)
|
find_package(Eigen3 QUIET)
|
||||||
|
set(USE_SYSTEM_EIGEN_INITIAL_VALUE ${Eigen3_FOUND})
|
||||||
|
option(GTSAM_USE_SYSTEM_EIGEN "Find and use system-installed Eigen. If 'off', use the one bundled with GTSAM" ${USE_SYSTEM_EIGEN_INITIAL_VALUE})
|
||||||
|
unset(USE_SYSTEM_EIGEN_INITIAL_VALUE)
|
||||||
|
|
||||||
if(NOT GTSAM_USE_SYSTEM_EIGEN)
|
if(NOT GTSAM_USE_SYSTEM_EIGEN)
|
||||||
# This option only makes sense if using the embedded copy of Eigen, it is
|
# This option only makes sense if using the embedded copy of Eigen, it is
|
||||||
|
@ -11,7 +14,7 @@ endif()
|
||||||
|
|
||||||
# Switch for using system Eigen or GTSAM-bundled Eigen
|
# Switch for using system Eigen or GTSAM-bundled Eigen
|
||||||
if(GTSAM_USE_SYSTEM_EIGEN)
|
if(GTSAM_USE_SYSTEM_EIGEN)
|
||||||
find_package(Eigen3 REQUIRED)
|
find_package(Eigen3 REQUIRED) # need to find again as REQUIRED
|
||||||
|
|
||||||
# Use generic Eigen include paths e.g. <Eigen/Core>
|
# Use generic Eigen include paths e.g. <Eigen/Core>
|
||||||
set(GTSAM_EIGEN_INCLUDE_FOR_INSTALL "${EIGEN3_INCLUDE_DIR}")
|
set(GTSAM_EIGEN_INCLUDE_FOR_INSTALL "${EIGEN3_INCLUDE_DIR}")
|
||||||
|
|
Loading…
Reference in New Issue