Merge branch 'niko_devel' into 'master'

Some cmake / ci fixes.

See merge request slam/basalt!3
This commit is contained in:
Vladyslav Usenko 2019-05-14 14:38:34 +00:00
commit 3666e2d937
3 changed files with 11 additions and 10 deletions

View File

@ -140,7 +140,7 @@ clang-format:
script: script:
- ./scripts/clang-format-all.sh - ./scripts/clang-format-all.sh
# check if any files are now modified and error if yes # check if any files are now modified and error if yes
- (if git diff --name-only --diff-filter=M | grep '\..pp$'; then echo $'\n Some files are not properly formatted. You can use "./scripts/clang-format-all.sh".\n'; git diff --diff-filter=M; false; fi) - (if [ -n "`git diff --name-only --diff-filter=M`" ]; then echo $'\n Some files are not properly formatted. You can use "./scripts/clang-format-all.sh".\n'; git diff --diff-filter=M; false; fi)
bionic-test: bionic-test:
<<: *test_deb_definition <<: *test_deb_definition

View File

@ -110,9 +110,11 @@ if(APPLE)
set(CMAKE_FIND_FRAMEWORK LAST) set(CMAKE_FIND_FRAMEWORK LAST)
# use brewed llvm's libc++ # use brewed llvm's libc++
add_compile_options("-nostdinc++") # Note: the suffix "/../v1" for the include path is needed to work around a recent cmake issue:
include_directories("/usr/local/opt/llvm/include/c++/v1") # https://gitlab.kitware.com/cmake/cmake/issues/19251#note_571030
include_directories("/usr/local/opt/llvm/include/c++/v1/../v1")
link_directories("/usr/local/opt/llvm/lib") link_directories("/usr/local/opt/llvm/lib")
add_compile_options("-nostdinc++")
set(STD_CXX_FS c++fs) set(STD_CXX_FS c++fs)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
@ -167,7 +169,7 @@ set(CMAKE_CXX_FLAGS "${BASALT_CXX_FLAGS} -march=${CXX_MARCH} ${BASALT_PASSED_CXX
set(EIGEN_INCLUDE_DIR_HINTS ${EIGEN_ROOT}) set(EIGEN_INCLUDE_DIR_HINTS ${EIGEN_ROOT})
find_package(Eigen3 3.3.7 REQUIRED) find_package(Eigen3 3.3.7 EXACT REQUIRED MODULE)
include_directories(${EIGEN3_INCLUDE_DIR}) include_directories(${EIGEN3_INCLUDE_DIR})
message(STATUS "Found Eigen headers in: ${EIGEN3_INCLUDE_DIR}") message(STATUS "Found Eigen headers in: ${EIGEN3_INCLUDE_DIR}")
if(NOT EIGEN3_INCLUDE_DIR MATCHES "^${EIGEN_ROOT}") if(NOT EIGEN3_INCLUDE_DIR MATCHES "^${EIGEN_ROOT}")

View File

@ -15,6 +15,10 @@
# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com> # Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
# Redistribution and use is allowed according to the terms of the 2-clause BSD license. # Redistribution and use is allowed according to the terms of the 2-clause BSD license.
# Adaptations (c) Nikolaus Demmel 2019
# - pass NO_DEFAULT_PATH --> only works when passing exact HINTS
if(NOT Eigen3_FIND_VERSION) if(NOT Eigen3_FIND_VERSION)
if(NOT Eigen3_FIND_VERSION_MAJOR) if(NOT Eigen3_FIND_VERSION_MAJOR)
set(Eigen3_FIND_VERSION_MAJOR 2) set(Eigen3_FIND_VERSION_MAJOR 2)
@ -63,12 +67,7 @@ else (EIGEN3_INCLUDE_DIR)
find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
HINTS ${EIGEN_INCLUDE_DIR_HINTS} HINTS ${EIGEN_INCLUDE_DIR_HINTS}
PATHS NO_DEFAULT_PATH
/usr/local/include
/opt/local/include
${CMAKE_INSTALL_PREFIX}/include
${KDE4_INCLUDE_DIR}
PATH_SUFFIXES eigen3 eigen
) )
if(EIGEN3_INCLUDE_DIR) if(EIGEN3_INCLUDE_DIR)