Merge pull request #4827 from lrineau/Installation-remove_code_about_REFERENCE_CACHE_DIR-GF

Remove CGAL_REFERENCE_CACHE_DIR from our CMake scripts
This commit is contained in:
Laurent Rineau 2020-07-08 16:24:39 +02:00
commit 61c04aed10
2 changed files with 1 additions and 51 deletions

View File

@ -382,8 +382,6 @@ include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake)
include(${CGAL_MODULES_DIR}/CGAL_enable_end_of_configuration_hook.cmake) include(${CGAL_MODULES_DIR}/CGAL_enable_end_of_configuration_hook.cmake)
cgal_setup_module_path() cgal_setup_module_path()
message( STATUS "CGAL_REFERENCE_CACHE_DIR=${CGAL_REFERENCE_CACHE_DIR}" )
if ( RUNNING_CGAL_AUTO_TEST ) if ( RUNNING_CGAL_AUTO_TEST )
message(STATUS "Operating system:") message(STATUS "Operating system:")
execute_process(COMMAND uname -a execute_process(COMMAND uname -a
@ -392,41 +390,6 @@ if ( RUNNING_CGAL_AUTO_TEST )
ERROR_VARIABLE uname_a) ERROR_VARIABLE uname_a)
message(STATUS "${uname_a}") message(STATUS "${uname_a}")
CGAL_display_compiler_version() CGAL_display_compiler_version()
if ( NOT "${CGAL_REFERENCE_CACHE_DIR}" STREQUAL "" )
if ( EXISTS ${CGAL_REFERENCE_CACHE_DIR} )
if ( EXISTS ${CGAL_REFERENCE_CACHE_DIR}/CMakeCache.txt )
message( STATUS "Loading reference cache from ${CGAL_REFERENCE_CACHE_DIR}" )
load_cache( ${CGAL_REFERENCE_CACHE_DIR}
EXCLUDE CGAL_Core_LIBRARY
CGAL_CORE_PACKAGE_DIR
WITH_CGAL_Core
CGAL_INSTALLATION_PACKAGE_DIR
CGAL_MAINTENANCE_PACKAGE_DIR
CGAL_PDB_BINARY_DIR
CGAL_PDB_SOURCE_DIR
CGAL_BINARY_DIR
CGAL_SOURCE_DIR)
# message("List of cache variables:")
## The following lines removes nasty loaded cache values. We do not
## want that the current build tree depends on binaries that were
## build in the reference build tree.
get_property(cache_variables DIRECTORY PROPERTY CACHE_VARIABLES)
foreach(var ${cache_variables})
# get_property(var_value CACHE ${var} PROPERTY VALUE)
# get_property(type CACHE ${var} PROPERTY TYPE)
string(REGEX MATCH "^CGAL(_.*_(DEPENDS|BINARY_DIR)|_.*LIBRARY)$" var_name_matches ${var})
if(var_name_matches)
unset(${var} CACHE)
# else()
# message("${var}:${var_type}=${var_value}")
endif()
endforeach()
endif()
endif()
endif()
endif() endif()
include(CGAL_Common) include(CGAL_Common)

View File

@ -490,13 +490,7 @@ build_cgal_on_host()
CGAL_BINARY_DIR="${CGAL_BINARY_DIR_BASE}/${PLATFORM}" CGAL_BINARY_DIR="${CGAL_BINARY_DIR_BASE}/${PLATFORM}"
if [ -d "${REFERENCE_PLATFORMS_DIR}/${PLATFORM}" ] ; then log "${ACTUAL_LOGFILE}" "Building cgal libs on host ${HOST} and platform ${PLATFORM}\nUnder ${CGAL_BINARY_DIR}\n"
CGAL_REFERENCE_CACHE_DIR="${REFERENCE_PLATFORMS_DIR}/${PLATFORM}"
else
CGAL_REFERENCE_CACHE_DIR=""
fi
log "${ACTUAL_LOGFILE}" "Building cgal libs on host ${HOST} and platform ${PLATFORM}\nUnder ${CGAL_BINARY_DIR}\nUsing reference cache directory ${CGAL_REFERENCE_CACHE_DIR}"
if [ -f "${CGAL_BINARY_DIR}/localbuildscript" ] ; then if [ -f "${CGAL_BINARY_DIR}/localbuildscript" ] ; then
log "${ACTUAL_LOGFILE}" "WARNING! Already built on platform ${PLATFORM}." log "${ACTUAL_LOGFILE}" "WARNING! Already built on platform ${PLATFORM}."
@ -514,19 +508,12 @@ if [ -z "\$CMAKE_GENERATOR" ]; then
CMAKE_GENERATOR='${CMAKE_GENERATOR}'; CMAKE_GENERATOR='${CMAKE_GENERATOR}';
fi fi
MAKE_CMD='${MAKE_CMD}'; MAKE_CMD='${MAKE_CMD}';
if [ -n "${IS_CYGWIN}" ]; then
CGAL_REFERENCE_CACHE_DIR=\$( cygpath -w '${CGAL_REFERENCE_CACHE_DIR}' );
else
CGAL_REFERENCE_CACHE_DIR='${CGAL_REFERENCE_CACHE_DIR}';\
fi
export CMAKE_GENERATOR; export CMAKE_GENERATOR;
export MAKE_CMD; export MAKE_CMD;
export CGAL_BINARY_DIR; export CGAL_BINARY_DIR;
export CGAL_REFERENCE_CACHE_DIR;
cd '${CGAL_BINARY_DIR}'; cd '${CGAL_BINARY_DIR}';
cmake \${INIT_FILE:+"-C\${INIT_FILE}"} '${CMAKE_GENERATOR}' -DRUNNING_CGAL_AUTO_TEST=TRUE \\ cmake \${INIT_FILE:+"-C\${INIT_FILE}"} '${CMAKE_GENERATOR}' -DRUNNING_CGAL_AUTO_TEST=TRUE \\
-DCGAL_REFERENCE_CACHE_DIR="\$CGAL_REFERENCE_CACHE_DIR" \\
VERBOSE=1 \\ VERBOSE=1 \\
../../..; ../../..;
${MAKE_CMD} VERBOSE=ON -k -fMakefile ; ${MAKE_CMD} VERBOSE=ON -k -fMakefile ;