Disabled find_package(MKL) and find_package(OpenMP) checks when not building MKL and/or OpenMP, to speed up cmake times.

release/4.3a0
Richard Roberts 2014-02-08 10:37:24 -05:00
parent 01be5dce94
commit 46e40dfe95
1 changed files with 14 additions and 10 deletions

View File

@ -169,6 +169,7 @@ find_package(GooglePerfTools)
############################################################################### ###############################################################################
# Find MKL # Find MKL
if(GTSAM_USE_EIGEN_MKL)
find_package(MKL) find_package(MKL)
if(MKL_FOUND AND GTSAM_WITH_EIGEN_MKL) if(MKL_FOUND AND GTSAM_WITH_EIGEN_MKL)
@ -177,16 +178,19 @@ if(MKL_FOUND AND GTSAM_WITH_EIGEN_MKL)
include_directories(${MKL_INCLUDE_DIR}) include_directories(${MKL_INCLUDE_DIR})
list(APPEND GTSAM_ADDITIONAL_LIBRARIES ${MKL_LIBRARIES}) list(APPEND GTSAM_ADDITIONAL_LIBRARIES ${MKL_LIBRARIES})
endif() endif()
endif()
############################################################################### ###############################################################################
# Find OpenMP # Find OpenMP
if(GTSAM_USE_EIGEN_MKL AND GTSAM_USE_EIGEN_MKL_OPENMP)
find_package(OpenMP) find_package(OpenMP)
if(OPENMP_FOUND AND GTSAM_USE_EIGEN_MKL AND GTSAM_WITH_EIGEN_MKL_OPENMP) if(OPENMP_FOUND AND GTSAM_USE_EIGEN_MKL AND GTSAM_WITH_EIGEN_MKL_OPENMP)
set(GTSAM_USE_EIGEN_MKL_OPENMP 1) # This will go into config.h set(GTSAM_USE_EIGEN_MKL_OPENMP 1) # This will go into config.h
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif() endif()
endif()
############################################################################### ###############################################################################