Commit d423d75c authored by Chuck Atkins's avatar Chuck Atkins Committed by Kitware Robot
Browse files

Merge topic 'fix-sdk-symlinks' into release

cf30fe65 Update LANL CLE6 cache file
0ea218d1

 Partially restore old symlink handling
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !461
parents 7bb02c15 cf30fe65
......@@ -14,7 +14,8 @@ set(BUILD_SHARED_LIBS ON CACHE BOOL "")
# Enable the appropriate packages
set(ENABLE_boost ON CACHE BOOL "")
set(ENABLE_bzip2 ON CACHE BOOL "")
set(ENABLE_cgns ON CACHE BOOL "")
set(ENABLE_expat ON CACHE BOOL "")
set(ENABLE_ffmpeg ON CACHE BOOL "")
set(ENABLE_freetype ON CACHE BOOL "")
set(ENABLE_genericio ON CACHE BOOL "")
......@@ -22,7 +23,6 @@ set(ENABLE_hdf5 ON CACHE BOOL "")
set(ENABLE_libxml2 ON CACHE BOOL "")
set(ENABLE_llvm ON CACHE BOOL "")
set(ENABLE_matplotlib ON CACHE BOOL "")
set(ENABLE_mpi ON CACHE BOOL "")
set(ENABLE_numpy ON CACHE BOOL "")
set(ENABLE_osmesa ON CACHE BOOL "")
set(ENABLE_ospray ON CACHE BOOL "")
......@@ -32,11 +32,11 @@ set(ENABLE_png ON CACHE BOOL "")
set(ENABLE_python ON CACHE BOOL "")
set(ENABLE_silo ON CACHE BOOL "")
set(ENABLE_visitbridge ON CACHE BOOL "")
set(ENABLE_vtkm ON CACHE BOOL "")
set(ENABLE_zlib ON CACHE BOOL "")
# These will get pulled from the compute node's userland
set(USE_SYSTEM_bzip2 ON CACHE BOOL "")
set(USE_SYSTEM_boost ON CACHE BOOL "")
set(USE_SYSTEM_expat ON CACHE BOOL "")
set(USE_SYSTEM_freetype ON CACHE BOOL "")
set(USE_SYSTEM_hdf5 ON CACHE BOOL "")
set(USE_SYSTEM_libxml2 ON CACHE BOOL "")
......@@ -47,33 +47,13 @@ set(USE_SYSTEM_png ON CACHE BOOL "")
set(USE_SYSTEM_python ON CACHE BOOL "")
set(USE_SYSTEM_zlib ON CACHE BOOL "")
# Enable all architectures for OSPray
set(embree_BUILD_ISA "AVX;AVX2;AVX512KNL" CACHE STRING "")
# Enable all architectures for OSPray and Mesa
set(ospray_BUILD_ISA ALL CACHE STRING "")
set(mesa_SWR_ARCH "avx,avx2,knl,skx" CACHE STRING "")
# ParaView details
set(superbuild_download_location ${CMAKE_BINARY_DIR}/../downloads CACHE STRING "")
set(SUPERBUILD_PROJECT_PARALLELISM 10 CACHE STRING "")
set(paraview_SOURCE_SELECTION 5.4.0 CACHE BOOL "")
# Specify where the necessary tarballs have been downloaded to
set(superbuild_download_location ${CMAKE_BINARY_DIR}/../../downloads CACHE STRING "")
set(ANACONDA_BASE /usr/projects/hpcsoft/cle6.0/common/anaconda/4.1.1-python-2.7)
set(PYTHON_EXECUTABLE ${ANACONDA_BASE}/bin/python2 CACHE FILEPATH "")
set(PYTHON_INCLUDE_DIR ${ANACONDA_BASE}/include/python2.7 CACHE PATH "")
set(PYTHON_LIBRARY ${ANACONDA_BASE}/lib/libpython2.7.so CACHE FILEPATH "")
set(FREETYPE_INCLUDE_DIR_freetype2 ${ANACONDA_BASE}/include/freetype2 CACHE PATH "")
set(FREETYPE_INCLUDE_DIR_ft2build ${ANACONDA_BASE}/include CACHE PATH "")
set(FREETYPE_LIBRARY ${ANACONDA_BASE}/lib/libfreetype.so CACHE FILEPATH "")
set(LIBXML2_INCLUDE_DIR ${ANACONDA_BASE}/include/libxml2 CACHE PATH "")
set(LIBXML2_LIBRARIES ${ANACONDA_BASE}/lib/libxml2.so CACHE FILEPATH "")
set(LIBXML2_XMLLINT_EXECUTABLE ${ANACONDA_BASE}/bin/xmllint CACHE FILEPATH "")
set(PNG_LIBRARY_RELEASE ${ANACONDA_BASE}/lib/libpng.so CACHE FILEPATH "")
set(PNG_PNG_INCLUDE_DIR ${ANACONDA_BASE}/include CACHE PATH "")
set(ZLIB_INCLUDE_DIR ${ANACONDA_BASE}/include CACHE PATH "")
set(ZLIB_LIBRARY_RELEASE ${ANACONDA_BASE}/lib/libz.so CACHE FILEPATH "")
set(PARAVIEW_EXTRA_CMAKE_ARGUMENTS
"-DVTK_USE_SYSTEM_JPEG:BOOL=ON;-DVTK_USE_SYSTEM_LZMA:BOOL=ON;-DVTK_USE_SYSTEM_TIFF:BOOL=ON"
CACHE STRING "")
......@@ -172,6 +172,19 @@ set(dependency_search_paths
"${real_superbuild_install_location}/lib/python2.7/site-packages"
"${real_superbuild_install_location}/lib/python2.7/lib-dynload")
foreach (fname IN LISTS libraries_to_install binaries_to_install)
get_filename_component(fname_dir "${fname}" DIRECTORY)
get_filename_component(fname_dir_real "${fname_dir}" REALPATH)
# Verify that what we're installing is from the temporary install tree
string(SUBSTRING "${fname_dir}" 0 ${real_sbinst_len} fname_dir_prefix)
if (NOT (fname_dir_prefix STREQUAL real_superbuild_install_location))
continue()
endif ()
string(SUBSTRING "${fname_dir_real}" 0 ${real_sbinst_len} fname_dir_real_prefix)
if (NOT (fname_dir_real_prefix STREQUAL real_superbuild_install_location))
continue()
endif ()
# Install static libraries separately.
if (fname MATCHES "\\${CMAKE_STATIC_LIBRARY_SUFFIX}$")
install_superbuild_static_library("${fname}")
......@@ -207,21 +220,39 @@ foreach (fname IN LISTS libraries_to_install binaries_to_install)
endif ()
endif ()
list(APPEND bins_and_deps "${fname}")
execute_process(
COMMAND ldd "${fname}"
COMMAND grep -iv "not found"
COMMAND awk [=[($2 == "=>") && ($3 ~ /^\//) {print $3}]=]
ERROR_QUIET
OUTPUT_VARIABLE ldd_out
OUTPUT_STRIP_TRAILING_WHITESPACE
)
string(REPLACE "\n" ";" ldd_out "${ldd_out}")
list(APPEND bins_and_deps ${ldd_out})
# The TBB libraries are special.
if (fname MATCHES "libtbb(|_malloc)")
install_superbuild_binary("${fname}")
continue ()
endif ()
list_append_unique(all_binaries
"${fname}")
# We still want to install a symlink but only perform dependency resolution
# on actual files.
if (IS_SYMLINK "${fname}")
continue ()
endif ()
get_prerequisites("${fname}" dependencies 1 1 "" "${dependency_search_paths}")
if (NOT dependencies)
continue ()
endif ()
foreach (dep IN LISTS dependencies)
if (IS_SYMLINK "${dep}")
# Symlinks better not cross the root directory. Bad install, bad.
get_filename_component(resolved_dep "${dep}" REALPATH)
list(APPEND all_binaries "${resolved_dep}")
endif ()
list(APPEND all_binaries "${dep}")
endforeach ()
endforeach ()
if (bins_and_deps)
list(REMOVE_DUPLICATES bins_and_deps)
if (all_binaries)
list(REMOVE_DUPLICATES all_binaries)
endif ()
foreach (f IN LISTS bins_and_deps)
foreach (f IN LISTS all_binaries)
install_superbuild_binary("${f}")
endforeach ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment