remove Build Dir from dependencies

This commit is contained in:
Maxime Gimeno 2018-01-26 14:59:58 +01:00
parent 9fc057e1cf
commit d577ee75a1
2 changed files with 6 additions and 0 deletions

View File

@ -1204,6 +1204,8 @@ You must disable CGAL_ENABLE_CHECK_HEADERS and CGAL_COMPUTE_DEPENDENCIES.")
if(POLICY CMP0057)
cmake_policy(SET CMP0057 NEW)
endif()
#get build dir for removal from deps
get_filename_component(BUILD_DIR ${CMAKE_BINARY_DIR} NAME)
foreach (package ${CGAL_CONFIGURED_PACKAGES_NAMES})
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include)
set(check_pkg_headers_depends "")

View File

@ -8,6 +8,9 @@ if(NOT CGAL_PACKAGES_PREFIX)
endif()
#message("regexp: \\. ${CGAL_PACKAGES_PREFIX}/[^/]*/include/CGAL/.*h")
#TO BE CHECKED
get_filename_component(INSTALLATION "${CMAKE_BINARY_DIR}" DIRECTORY)
get_filename_component(BUILD_DIR "${INSTALLATION}" NAME)
foreach(INPUT_FILE ${INPUT_FILES})
file(STRINGS ${INPUT_FILE} input)
#message("input is : ${input}")
@ -15,6 +18,7 @@ foreach(INPUT_FILE ${INPUT_FILES})
string(REGEX MATCHALL "^\\.* ${CGAL_PACKAGES_PREFIX}/[A-Za-z0-9_.-]*/include/CGAL/[A-Za-z0-9_/.-]*\\.h" header ${line})
string(REGEX REPLACE "\\.* ${CGAL_PACKAGES_PREFIX}/" "" header "${header}")
string(REGEX REPLACE "/.*" "" pkg "${header}")
string(REPLACE "${BUILD_DIR}" " " pkg "${pkg}")
if(header)
list(APPEND headers ${header})
endif()