Commit d992e6db authored by Robert Maynard's avatar Robert Maynard

Refer to SuperBuild_* name rather than ParaViewSuperBuild_*

This change allows the infastructure to be used even when the
name of the project changes. This is useful for making superbuilds
of custom paraview projects which want a unique project name.

Change-Id: I12819dc9862bf5d43f028d7dd955c53d084c3dc0
parent b4e29337
......@@ -55,7 +55,7 @@ function (PVExternalProject_Add name)
set (new_argn)
# check if we have a BUILD_COMMAND or CONFIGURE_COMMAND.
# check if we have a BUILD_COMMAND or CONFIGURE_COMMAND.
get_property(has_build_command TARGET pv-${name}
PROPERTY _EP_BUILD_COMMAND SET)
if(NOT has_build_command)
......@@ -96,7 +96,7 @@ function (PVExternalProject_Add name)
if (has_build_command)
set(new_argn ${new_argn}
BUILD_COMMAND
BUILD_COMMAND
${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/pv-${name}-build.cmake)
endif()
......@@ -125,7 +125,7 @@ function (PVExternalProject_Add name)
if (has_configure_command)
get_target_property(step_command pv-${name} _EP_CONFIGURE_COMMAND)
_ep_replace_location_tags(${name} step_command)
configure_file(${ParaViewSuperBuild_CMAKE_DIR}/pep_configure.cmake.in
configure_file(${SuperBuild_CMAKE_DIR}/pep_configure.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/pv-${name}-configure.cmake
@ONLY
)
......@@ -134,7 +134,7 @@ function (PVExternalProject_Add name)
if (has_build_command)
get_target_property(step_command pv-${name} _EP_BUILD_COMMAND)
_ep_replace_location_tags(${name} step_command)
configure_file(${ParaViewSuperBuild_CMAKE_DIR}/pep_configure.cmake.in
configure_file(${SuperBuild_CMAKE_DIR}/pep_configure.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/pv-${name}-build.cmake
@ONLY)
endif()
......
......@@ -8,8 +8,10 @@ if (APPLE)
endif()
project(ParaViewSuperBuild)
set (ParaViewSuperBuild_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
set (ParaViewSuperBuild_PROJECTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Projects")
set (SuperBuild_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
set (SuperBuild_PROJECTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Projects")
set (SuperBuild_BINARY_DIR ${ParaViewSuperBuild_BINARY_DIR})
include(CMakeDependentOption)
#-----------------------------------------------------------------------------
......@@ -44,10 +46,10 @@ endif()
# Setup CMAKE_MODULE_PATH so that platform specific configurations are processed
# before the generic ones.
set (CMAKE_MODULE_PATH
"${ParaViewSuperBuild_PROJECTS_DIR}/${platform}"
"${ParaViewSuperBuild_PROJECTS_DIR}/common"
"${ParaViewSuperBuild_PROJECTS_DIR}"
"${ParaViewSuperBuild_CMAKE_DIR}"
"${SuperBuild_PROJECTS_DIR}/${platform}"
"${SuperBuild_PROJECTS_DIR}/common"
"${SuperBuild_PROJECTS_DIR}"
"${SuperBuild_CMAKE_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}"
${CMAKE_MODULE_PATH})
......@@ -127,7 +129,7 @@ include (versions)
# enable testing support.
include(CTest)
configure_file(
"${ParaViewSuperBuild_CMAKE_DIR}/CTestCustom.cmake.in"
"${SuperBuild_CMAKE_DIR}/CTestCustom.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake" @ONLY)
#------------------------------------------------------------------------------
......@@ -177,7 +179,7 @@ endif()
return()
SET (CMAKE_INSTALL_COMPONENT runtime)
## When building with Mesa and generating command line tools alone,
## When building with Mesa and generating command line tools alone,
## we provide the user with an option to use OSMesa.
#dependent_option(ENABLE_OSMESA
# "Turn ON to enable Offscreen Mesa 3D support." OFF
......
......@@ -2,7 +2,7 @@ add_external_project(acusolve_plugin
DEPENDS paraview
CMAKE_ARGS
-DParaView_DIR:PATH=${ParaViewSuperBuild_BINARY_DIR}/paraview/src/paraview-build
-DParaView_DIR:PATH=${SuperBuild_BINARY_DIR}/paraview/src/paraview-build
INSTALL_COMMAND
${CMAKE_COMMAND} -E tar cfz
......
......@@ -46,7 +46,7 @@ endif()
add_test(NAME GenerateParaViewPackage
COMMAND ${CMAKE_CPACK_COMMAND} -G DragNDrop -V
WORKING_DIRECTORY ${ParaViewSuperBuild_BINARY_DIR})
WORKING_DIRECTORY ${SuperBuild_BINARY_DIR})
set_tests_properties(GenerateParaViewPackage PROPERTIES
# needed so that tests are run on typical paraview
# dashboards
......
......@@ -7,7 +7,7 @@ add_external_project(
# 1. incorrect target links when HDF5 support is enabeld
# 2. incorrect install rules on windows (and cleans up install rules on other
# platforms too).
${CMAKE_COMMAND} -E copy_if_different ${ParaViewSuperBuild_PROJECTS_DIR}/patches/cgns.src.CMakeLists.txt
${CMAKE_COMMAND} -E copy_if_different ${SuperBuild_PROJECTS_DIR}/patches/cgns.src.CMakeLists.txt
<SOURCE_DIR>/src/CMakeLists.txt
CMAKE_ARGS
-DCGNS_BUILD_SHARED:BOOL=ON
......@@ -22,7 +22,7 @@ if (WIN32)
# anyways when using MSVC (since the path didn't consider build configuration).
add_external_project_step(patch1
COMMENT "Fixing Windows install rules for CGNS tools"
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ParaViewSuperBuild_PROJECTS_DIR}/patches/cgns.src.tools.CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SuperBuild_PROJECTS_DIR}/patches/cgns.src.tools.CMakeLists.txt
<SOURCE_DIR>/src/tools/CMakeLists.txt
DEPENDEES update
DEPENDERS patch)
......
......@@ -5,7 +5,7 @@ add_external_project(
# HDF5 1.8.9 has a CMake install rule bug. Fix that.
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_if_different
${ParaViewSuperBuild_PROJECTS_DIR}/patches/hdf5.CMakeLists.txt
${SuperBuild_PROJECTS_DIR}/patches/hdf5.CMakeLists.txt
<SOURCE_DIR>/CMakeLists.txt
CMAKE_ARGS
......@@ -21,7 +21,7 @@ if (MSVC)
# compiler when using nmake or ninja generators. This patch fixes that.
add_external_project_step(patch_fix_msvc
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${ParaViewSuperBuild_PROJECTS_DIR}/patches/hdf5.config.cmake.ConfigureChecks.cmake
${SuperBuild_PROJECTS_DIR}/patches/hdf5.config.cmake.ConfigureChecks.cmake
<SOURCE_DIR>/config/cmake/ConfigureChecks.cmake
DEPENDEES update # do after update
DEPENDERS patch # do before patch
......@@ -45,7 +45,7 @@ if (WIN32)
if (NOT 64bit_build)
add_external_project_step(patch_fix_h5public
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${ParaViewSuperBuild_PROJECTS_DIR}/patches/hdf5.src.H5public.h
${SuperBuild_PROJECTS_DIR}/patches/hdf5.src.H5public.h
<SOURCE_DIR>/src/H5public.h
DEPENDEES update # do after update
DEPENDERS patch # do before patch
......
add_external_project(mili_plugin
DEPENDS paraview
CMAKE_ARGS
-DParaView_DIR:PATH=${ParaViewSuperBuild_BINARY_DIR}/paraview/src/paraview-build
-DParaView_DIR:PATH=${SuperBuild_BINARY_DIR}/paraview/src/paraview-build
)
......@@ -2,7 +2,7 @@ add_external_project(nektar_plugin
DEPENDS paraview
CMAKE_ARGS
-DParaView_DIR:PATH=${ParaViewSuperBuild_BINARY_DIR}/paraview/src/paraview-build
-DParaView_DIR:PATH=${SuperBuild_BINARY_DIR}/paraview/src/paraview-build
-DBLAS_atlas_LIBRARY:FILEPATH=/soft/apps/atlas-3.8.2-gcc-shared/lib/libatlas.a
-DBLAS_f77blas_LIBRARY:FILEPATH=/soft/apps/atlas-3.8.2-gcc-shared/lib/libf77blas.a
-DLAPACK_lapack_LIBRARY:FILEPATH=/soft/apps/atlas-3.8.2-gcc-shared/lib/liblapack.a
......
set (extra_cmake_args)
if (manta_ENABLED)
list (APPEND extra_cmake_args
-DMANTA_BUILD:PATH=${ParaViewSuperBuild_BINARY_DIR}/manta/src/manta-build)
-DMANTA_BUILD:PATH=${SuperBuild_BINARY_DIR}/manta/src/manta-build)
endif()
add_external_project(paraview
......
......@@ -41,7 +41,7 @@ install(CODE
if (qt_ENABLED AND NOT USE_SYSTEM_qt)
install(DIRECTORY
# install all qt plugins (including sqllite).
# FIXME: we can reconfigure Qt to be built with inbuilt sqllite support to
# FIXME: we can reconfigure Qt to be built with inbuilt sqllite support to
# avoid the need for plugins.
"@install_location@/plugins/"
DESTINATION "lib/paraview-${pv_version}"
......@@ -76,7 +76,7 @@ endif()
add_test(NAME GenerateParaViewPackage
COMMAND ${CMAKE_CPACK_COMMAND} -G TGZ -V
WORKING_DIRECTORY ${ParaViewSuperBuild_BINARY_DIR})
WORKING_DIRECTORY ${SuperBuild_BINARY_DIR})
set_tests_properties(GenerateParaViewPackage PROPERTIES
# needed so that tests are run on typical paraview
# dashboards
......
......@@ -2,7 +2,7 @@ add_external_project(vistrails_plugin
DEPENDS paraview boost
CMAKE_ARGS
-DParaView_DIR:PATH=${ParaViewSuperBuild_BINARY_DIR}/paraview/src/paraview-build
-DParaView_DIR:PATH=${SuperBuild_BINARY_DIR}/paraview/src/paraview-build
INSTALL_COMMAND
${CMAKE_COMMAND} -DSOURCE_DIR:PATH=<SOURCE_DIR>
......
......@@ -53,7 +53,7 @@ install(FILES "${install_location}/bin/.plugins"
# install python since (since python dlls are not in the install location)
if (python_ENABLED AND NOT USE_SYSTEM_python)
# install the Python's modules.
install(DIRECTORY "${ParaViewSuperBuild_BINARY_DIR}/python/src/python/Lib"
install(DIRECTORY "${SuperBuild_BINARY_DIR}/python/src/python/Lib"
DESTINATION "bin"
USE_SOURCE_PERMISSIONS
COMPONENT ParaView)
......@@ -78,7 +78,7 @@ endif()
if (qt_ENABLED AND NOT USE_SYSTEM_qt)
install(DIRECTORY
# install all qt plugins (including sqllite).
# FIXME: we can reconfigure Qt to be built with inbuilt sqllite support to
# FIXME: we can reconfigure Qt to be built with inbuilt sqllite support to
# avoid the need for plugins.
"${install_location}/plugins/"
DESTINATION "bin"
......@@ -100,7 +100,7 @@ if (mpi_ENABLED AND NOT USE_SYSTEM_mpi)
DESTINATION "bin"
USE_SOURCE_PERMISSIONS
COMPONENT ParaView
FILES_MATCHING
FILES_MATCHING
PATTERN "mpi*.exe"
PATTERN "ompi*.exe"
PATTERN "opal*.exe"
......@@ -133,11 +133,11 @@ include(CPack)
add_test(NAME GenerateParaViewPackage-NSIS
COMMAND ${CMAKE_CPACK_COMMAND} -G NSIS -V
WORKING_DIRECTORY ${ParaViewSuperBuild_BINARY_DIR})
WORKING_DIRECTORY ${SuperBuild_BINARY_DIR})
add_test(NAME GenerateParaViewPackage-ZIP
COMMAND ${CMAKE_CPACK_COMMAND} -G ZIP -V
WORKING_DIRECTORY ${ParaViewSuperBuild_BINARY_DIR})
WORKING_DIRECTORY ${SuperBuild_BINARY_DIR})
set_tests_properties(GenerateParaViewPackage-NSIS
GenerateParaViewPackage-ZIP
......
......@@ -3,11 +3,11 @@ set (python_executable_dir)
if (64bit_build)
set (configuration "Release|x64")
set (python_executable_dir
"${ParaViewSuperBuild_BINARY_DIR}/python/src/python/PCbuild/amd64")
"${SuperBuild_BINARY_DIR}/python/src/python/PCbuild/amd64")
else()
set (configuration "Release|Win32")
set (python_executable_dir
"${ParaViewSuperBuild_BINARY_DIR}/python/src/python/PCbuild")
"${SuperBuild_BINARY_DIR}/python/src/python/PCbuild")
endif()
......@@ -15,7 +15,7 @@ endif()
# in the following build commands, we use devenv explicitly since the generator
# the user has chosen could be nmake, in which case CMAKE_BUILD_TOOL is not the
# right tool. Since devenv is in the path in the nmake build environment as well
# as VS environment, we can safely call it.
# as VS environment, we can safely call it.
add_external_project_or_use_system(python
DEPENDS zlib
BUILD_IN_SOURCE 1
......@@ -62,5 +62,5 @@ endforeach()
set (pv_python_executable "${python_executable_dir}/python.exe")
add_extra_cmake_args(
-DPYTHON_EXECUTABLE:FILEPATH=${python_executable_dir}/python.exe
-DPYTHON_INCLUDE_DIR:FILEPATH=${ParaViewSuperBuild_BINARY_DIR}/python/src/python/Include
-DPYTHON_INCLUDE_DIR:FILEPATH=${SuperBuild_BINARY_DIR}/python/src/python/Include
-DPYTHON_LIBRARY:FILEPATH=${python_executable_dir}/python27.lib)
# include the common qt.use.system.cmake file.
include("${ParaViewSuperBuild_PROJECTS_DIR}/qt.use.system.cmake")
include("${SuperBuild_PROJECTS_DIR}/qt.use.system.cmake")
option(PACKAGE_SYSTEM_QT
"When enabled and USE_SYSTEM_qt is ON, packages needed Qt files" ON)
......@@ -28,15 +28,15 @@ if (EXISTS "${QT_QMAKE_EXECUTABLE}")
USE_SOURCE_PERMISSIONS
COMPONENT Qt_Runtime
# skip debug dlls
FILES_MATCHING REGEX "^.*d4.dll$" EXCLUDE
FILES_MATCHING REGEX "^.*d4.dll$" EXCLUDE
PATTERN "*.dll")
install(DIRECTORY "${qt_bin_dir}/"
DESTINATION "bin"
USE_SOURCE_PERMISSIONS
COMPONENT Qt_Runtime
# skip debug dlls
FILES_MATCHING REGEX "^.*d4.dll$" EXCLUDE
FILES_MATCHING REGEX "^.*d4.dll$" EXCLUDE
PATTERN "*.dll")
endif()
......@@ -2,27 +2,27 @@ add_external_project(
silo
DEPENDS zlib hdf5
BUILD_IN_SOURCE 1
PATCH_COMMAND
${CMAKE_COMMAND} -DSILO_PATCHES_DIR:PATH=${ParaViewSuperBuild_PROJECTS_DIR}/patches/silo_win32
PATCH_COMMAND
${CMAKE_COMMAND} -DSILO_PATCHES_DIR:PATH=${SuperBuild_PROJECTS_DIR}/patches/silo_win32
-D64BIT_BUILD:BOOL=${64bit_build}
-DSILO_SOURCE_DIR:PATH=<SOURCE_DIR>
-DSILO_INSTALL_DIR:PATH=<INSTALL_DIR>
-P ${CMAKE_CURRENT_LIST_DIR}/silo.patch.cmake
CONFIGURE_COMMAND
${CMAKE_COMMAND} -DSILO_PATCHES_DIR:PATH=${ParaViewSuperBuild_PROJECTS_DIR}/patches/silo_win32
${CMAKE_COMMAND} -DSILO_PATCHES_DIR:PATH=${SuperBuild_PROJECTS_DIR}/patches/silo_win32
-D64BIT_BUILD:BOOL=${64bit_build}
-DSILO_SOURCE_DIR:PATH=<SOURCE_DIR>
-DSILO_INSTALL_DIR:PATH=<INSTALL_DIR>
-P ${CMAKE_CURRENT_LIST_DIR}/silo.configure.cmake
BUILD_COMMAND
${CMAKE_COMMAND} -DSILO_PATCHES_DIR:PATH=${ParaViewSuperBuild_PROJECTS_DIR}/patches/silo_win32
${CMAKE_COMMAND} -DSILO_PATCHES_DIR:PATH=${SuperBuild_PROJECTS_DIR}/patches/silo_win32
-D64BIT_BUILD:BOOL=${64bit_build}
-DSILO_SOURCE_DIR:PATH=<SOURCE_DIR>
-DSILO_INSTALL_DIR:PATH=<INSTALL_DIR>
-DDEVENV_PATH:FILEPATH=${DEVENV_PATH}
-P ${CMAKE_CURRENT_LIST_DIR}/silo.build.cmake
INSTALL_COMMAND
${CMAKE_COMMAND} -DSILO_PATCHES_DIR:PATH=${ParaViewSuperBuild_PROJECTS_DIR}/patches/silo_win32
${CMAKE_COMMAND} -DSILO_PATCHES_DIR:PATH=${SuperBuild_PROJECTS_DIR}/patches/silo_win32
-D64BIT_BUILD:BOOL=${64bit_build}
-DSILO_SOURCE_DIR:PATH=<SOURCE_DIR>
-DSILO_INSTALL_DIR:PATH=<INSTALL_DIR>
......
......@@ -5,7 +5,7 @@ add_external_project(szip
PATCH_COMMAND
# BUG: szip does not install ricehdf.h
# replace the file with an appropriate version.
${CMAKE_COMMAND} -E copy_if_different ${ParaViewSuperBuild_PROJECTS_DIR}/patches/szip.src.CMakeLists.txt
${CMAKE_COMMAND} -E copy_if_different ${SuperBuild_PROJECTS_DIR}/patches/szip.src.CMakeLists.txt
<SOURCE_DIR>/src/CMakeLists.txt
)
......
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