Skip to content
Snippets Groups Projects
Commit 2a5720cc authored by Martin Beseda's avatar Martin Beseda
Browse files

FIX: Boost_* variables are now deleted from cache to prevent preserving wrong paths.

parent b8605f13
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,7 @@ if(NOT Boost_FIND_COMPONENTS)
endif()
# Look for a standard boost header file.
set(Boost_INCLUDE_DIRS "Boost_INCLUDE_DIRS-NOTFOUND")
find_path(
Boost_INCLUDE_DIRS
......@@ -41,19 +42,16 @@ find_path(
PATHS
/usr/include/boost
/usr/include
/home/boost
PATH_SUFFIXES
boost
include
)
)
if(NOT Boost_INCLUDE_DIRS)
message(FATAL_ERROR "Boost include directory was not found! Please, set variable BOOST_INCLUDEDIR to the correct path.")
#else()
# include_directories("${Boost_INCLUDE_DIRS}")
endif()
# Create a list of requested Boost libraries with "system" names
......@@ -79,6 +77,7 @@ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
endforeach()
# Look for libraries specified by COMPONENTS flag
set(Boost_LIBRARY_DIRS "Boost_LIBRARY_DIRS-NOTFOUND")
find_path(
Boost_LIBRARY_DIRS
......@@ -90,7 +89,6 @@ find_path(
$ENV{BOOST_LIBRARYDIR}
${CMAKE_CURRENT_LIST_DIR}/external_dependencies/boost
PATHS
/usr/lib/boost
/usr/lib/x86_64-linux-gnu
......@@ -104,6 +102,7 @@ find_path(
# targets, so they may be linked
set(Boost_LIBRARIES ${REQUESTED_BOOST_LIBS})
foreach(LIBNAME ${Boost_LIBRARIES})
set(${LIBNAME} "${LIBNAME}-NOTFOUND")
find_library(
${LIBNAME}
......@@ -115,11 +114,7 @@ foreach(LIBNAME ${Boost_LIBRARIES})
$ENV{BOOST_LIBRARYDIR}
${CMAKE_CURRENT_LIST_DIR}/external_dependencies/boost
PATHS
${BOOST_LIBRARYDIR}
$ENV{BOOST_LIBRARYDIR}
${CMAKE_CURRENT_LIST_DIR}/external_dependencies/boost
/usr/lib/boost
/usr/lib/x86_64-linux-gnu
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment