Boost include not found (MacOSX Mojave 10.14.6)
I have boost 1.70 from brew. The compilation fails with [ 77%] Building CXX object examples/CMakeFiles/SmallVectorPoints.dir/SmallVectorPoints.cc.o /Users/phristov/alisw/work/SOAContainer/examples/SmallVectorPoints.cc:6:10: fatal error: 'boost/container/small_vector.hpp' file not found #include <boost/container/small_vector.hpp> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated.
The small patch below fixes the problem:
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index bac2b3a..03d05d2 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -7,6 +7,7 @@ find_package(BOOST QUIET)
if(${Boost_FOUND})
if(${Boost_VERSION} VERSION_GREATER 106199)
add_executable(SmallVectorPoints SmallVectorPoints.cc)
+ target_include_directories(SmallVectorPoints PUBLIC ${Boost_INCLUDE_DIRS})
else()
message(STATUS "skipping SmallVectorPoints example because BOOST version is ${Boost_VERSION}, which is older than 1.62.")
endif()