FindBoost: Fix Boost_NO_SYSTEM_PATHS to not consider environment (#15702)

Previously we added only NO_CMAKE_SYSTEM_PATH to find command calls.
Add NO_SYSTEM_ENVIRONMENT_PATH too so that paths found from system
environment variables are not considered either.
This commit is contained in:
Brad King 2016-05-02 11:40:01 -04:00
parent 24b2a36778
commit 5a9b2b3b11
1 changed files with 2 additions and 2 deletions

View File

@ -982,7 +982,7 @@ if(NOT Boost_INCLUDE_DIR)
endif()
if( Boost_NO_SYSTEM_PATHS)
list(APPEND _boost_INCLUDE_SEARCH_DIRS NO_CMAKE_SYSTEM_PATH)
list(APPEND _boost_INCLUDE_SEARCH_DIRS NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH)
else()
list(APPEND _boost_INCLUDE_SEARCH_DIRS PATHS
C:/boost/include
@ -1251,7 +1251,7 @@ foreach(c DEBUG RELEASE)
${Boost_INCLUDE_DIR}/stage/lib
)
if( Boost_NO_SYSTEM_PATHS )
list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} NO_CMAKE_SYSTEM_PATH)
list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH)
else()
list(APPEND _boost_LIBRARY_SEARCH_DIRS_${c} PATHS
C:/boost/lib