From d6c1191c7a0bb834836bd23e3be18eb9f133cfd2 Mon Sep 17 00:00:00 2001
From: Lukas Nellen <lukas@nucleares.unam.mx>
Date: Mon, 14 Jan 2019 21:03:06 -0600
Subject: [PATCH] OS X portability

- Suppress warnings when using apple clang
- Boost can be in non-default location - add to include path
---
 CMakeLists.txt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1288cd3c6..14d59a7fd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,7 +43,7 @@ set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
 set(CMAKE_CXX_FLAGS_RELEASE "-O3 -g") # -O2 would not trade speed for size, neither O2/3 use fast-math 
 
 # clang produces a lot of unecessary warnings without this:
-add_compile_options("$<$<CXX_COMPILER_ID:Clang>:-Wno-nonportable-include-path>") 
+add_compile_options("$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wno-nonportable-include-path>")
 
 # unit testing coverage, does not work yet
 #include (CodeCoverage)
@@ -61,6 +61,10 @@ add_compile_options("$<$<CXX_COMPILER_ID:Clang>:-Wno-nonportable-include-path>")
 
 # dependencies
 find_package (Boost 1.60 REQUIRED)
+if (Boost_FOUND)
+  include_directories(${Boost_INCLUDE_DIRS})
+endif (Boost_FOUND)
+
 find_package (Eigen3 REQUIRED)
 #find_package (HDF5) # not yet needed
 
-- 
GitLab