Commit e25f7047 authored by Ben Boeckel's avatar Ben Boeckel Committed by Kitware Robot
Browse files

Merge topic 'fix-development-install' into release

bd392a4b VTK: bump for install tree fixes
5f14ca87 ParaViewInstallCMakePackageHelpers: set falsey variables locally
f5f7eb63 ParaViewInstallCMakePackageHelpers: spell the package property correctly
8bf20bf8 ParaViewInstallCMakePackageHelpers: use the loop variable
a44a77f3 Examples/CustomApplications: use different target names
cc4a256d Examples/Catalyst: bail if MPI cannot be found
8f7b1b1f ParaViewTestInstall: simplify directory creation
8518ae4e

 ParaViewTestInstall: pass generator information down
...
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !3446
parents 58bfbcc7 bd392a4b
......@@ -87,10 +87,17 @@ if (NOT PARAVIEW_RELOCATABLE_INSTALL)
endif ()
foreach (paraview_cmake_file IN LISTS paraview_cmake_files_to_install)
get_filename_component(subdir "${paraview_cmake_file}" DIRECTORY)
if (IS_ABSOLUTE "${paraview_cmake_file}")
file(RELATIVE_PATH paraview_cmake_subdir_root "${paraview_cmake_build_dir}" "${paraview_cmake_file}")
get_filename_component(paraview_cmake_subdir "${paraview_cmake_subdir_root}" DIRECTORY)
set(paraview_cmake_original_file "${paraview_cmake_file}")
else ()
get_filename_component(paraview_cmake_subdir "${paraview_cmake_file}" DIRECTORY)
set(paraview_cmake_original_file "${paraview_cmake_dir}/${paraview_cmake_file}")
endif ()
install(
FILES "${paraview_cmake_dir}/${paraview_cmake_file}"
DESTINATION "${paraview_cmake_destination}/${subdir}"
FILES "${paraview_cmake_original_file}"
DESTINATION "${paraview_cmake_destination}/${paraview_cmake_subdir}"
COMPONENT "development")
endforeach ()
......
......@@ -9,6 +9,8 @@ function (_paraview_package_append_variables)
"if (NOT DEFINED \"${var}\")
set(\"${var}\" \"${${var}}\")
list(APPEND _paraview_find_package_variables \"${var}\")
elseif (NOT ${var})
set(\"${var}\" \"${${var}}\")
endif ()
")
endforeach ()
......@@ -19,7 +21,7 @@ endif ()
endfunction ()
get_property(_paraview_packages GLOBAL
PROPERTY _vtk_module_find_packages_paraview)
PROPERTY _vtk_module_find_packages_ParaView)
if (_paraview_packages)
list(REMOVE_DUPLICATES _paraview_packages)
endif ()
......@@ -28,11 +30,11 @@ set(paraview_find_package_code)
foreach (_paraview_package IN LISTS _paraview_packages)
_paraview_package_append_variables(
# Standard CMake `find_package` mechanisms.
"${package}_DIR"
"${package}_ROOT"
"${_paraview_package}_DIR"
"${_paraview_package}_ROOT"
# Per-package custom variables.
${${package}_find_package_vars})
${${_paraview_package}_find_package_vars})
endforeach ()
file(GENERATE
......
......@@ -41,8 +41,14 @@
# PARAVIEW_VERSION : ParaView version string used when creating the installtree
message (STATUS "Building Examples against ParaView install tree")
# Remove the drive letter from `PARAVIEW_INSTALL_DIR` so we can append it to
# DESTDIR safely.
if (WIN32 AND IS_ABSOLUTE "${PARAVIEW_INSTALL_DIR}")
string(REGEX REPLACE "^.:" "" PARAVIEW_INSTALL_DIR "${PARAVIEW_INSTALL_DIR}")
endif ()
set (ParaView_DIR
$ENV{DESTDIR}${PARAVIEW_INSTALL_DIR}/lib/cmake/paraview-${PARAVIEW_VERSION})
$ENV{DESTDIR}${PARAVIEW_INSTALL_DIR}/${PARAVIEW_CMAKE_DESTINATION})
message(STATUS "ParaView_DIR: ${ParaView_DIR}")
# Build target "INSTALL" for paraview
if (MSVC)
......@@ -62,13 +68,28 @@ if (NOT irv EQUAL 0)
message(FATAL_ERROR "Could not build target 'install' for ParaView")
endif ()
set(generator_args)
if (CMAKE_GENERATOR)
list(APPEND generator_args
-G "${CMAKE_GENERATOR}")
endif ()
if (CMAKE_GENERATOR_PLATFORM)
list(APPEND generator_args
-A "${CMAKE_GENERATOR_PLATFORM}")
endif ()
if (CMAKE_GENERATOR_TOOLSET)
list(APPEND generator_args
-T "${CMAKE_GENERATOR_TOOLSET}")
endif ()
set (INSTALL_TEST_BUILD_DIR ${PARAVIEW_TEST_DIR}/Examples-bld)
if (NOT EXISTS ${INSTALL_TEST_BUILD_DIR})
execute_process(COMMAND ${CMAKE_COMMAND} -E
make_directory ${INSTALL_TEST_BUILD_DIR})
file(MAKE_DIRECTORY
${INSTALL_TEST_BUILD_DIR})
endif ()
execute_process (
COMMAND ${CMAKE_COMMAND}
${generator_args}
-DParaView_DIR:PATH=${ParaView_DIR}
${PARAVIEW_SOURCE_DIR}/Examples
WORKING_DIRECTORY ${INSTALL_TEST_BUILD_DIR}
......
......@@ -68,7 +68,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/vtkModuleWrapClientServer.cmake")
set(PARAVIEW_BUILD_QT_GUI "@PARAVIEW_BUILD_QT_GUI@")
set(PARAVIEW_USE_MPI "@PARAVIEW_USE_MPI@")
set(PARAVIEW_ENABLE_PYTHON "@PARAVIEW_ENABLE_PYTHON@")
set(PARAVIEW_PLUGIN_SUBDIR "paraview-@PARAVIEW_VERSION_MAJOR@.@PARAVIEW_VERSION_MINOR@/plugins")
set(PARAVIEW_PLUGIN_SUBDIR "paraview@paraview_version_suffix@/plugins")
set(_paraview_components_to_check)
foreach (_paraview_component IN LISTS "${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS")
......
......@@ -1043,7 +1043,10 @@ if (BUILD_TESTING AND PARAVIEW_INSTALL_DEVELOPMENT_FILES)
-DPARAVIEW_INSTALL_DIR:PATH=${CMAKE_INSTALL_PREFIX}
-DPARAVIEW_SOURCE_DIR:PATH=${CMAKE_SOURCE_DIR}
-DPARAVIEW_TEST_DIR:PATH=${CMAKE_BINARY_DIR}/Testing/Temporary
-DPARAVIEW_VERSION:STRING=${PARAVIEW_VERSION}
-DPARAVIEW_CMAKE_DESTINATION:STRING=${paraview_cmake_destination}
-DCMAKE_GENERATOR:STRING=${CMAKE_GENERATOR}
-DCMAKE_GENERATOR_PLATFORM:STRING=${CMAKE_GENERATOR_PLATFORM}
-DCMAKE_GENERATOR_TOOLSET:STRING=${CMAKE_GENERATOR_TOOLSET}
-P ${CMAKE_CURRENT_SOURCE_DIR}/CMake/ParaViewTestInstall.cmake)
set_tests_properties(pv.TestDevelopmentInstall PROPERTIES
LABELS "paraview"
......
......@@ -27,7 +27,13 @@ if (USE_CATALYST)
# FIXME: This should really be fixed to instead be done per-target.
add_definitions(-DUSE_CATALYST)
else ()
find_package(MPI REQUIRED COMPONENTS C)
find_package(MPI COMPONENTS C)
if (NOT MPI_FOUND)
message(STATUS
"${CMAKE_PROJECT_NAME} requires MPI support, but none was found. "
"Skipping ${CMAKE_PROJECT_NAME} examples.")
return ()
endif ()
endif ()
option(BUILD_TESTING "Build Testing" OFF)
......
......@@ -30,7 +30,7 @@ set(xml_files
ParaViewSources.xml)
paraview_client_add(
NAME paraview_revised
NAME paraview_clone1
VERSION "1.1.1"
SOURCES ${sources} ${ui_files}
APPLICATION_XMLS ${xml_files}
......
......@@ -30,7 +30,7 @@ set(xml_files
ParaViewSources.xml)
paraview_client_add(
NAME paraview_revised
NAME paraview_clone2
VERSION "1.1.1"
SOURCES ${sources} ${ui_files}
APPLICATION_XMLS ${xml_files}
......@@ -39,6 +39,6 @@ paraview_client_add(
ORGANIZATION "Kitware, Inc."
TITLE "ParaView (ReVisEd)")
target_link_libraries(paraview_revised
target_link_libraries(paraview_clone2
PRIVATE
ParaView::pqApplicationComponents)
Subproject commit dd45f2c5f09d301fb0b1e02200fa422c72db6ec2
Subproject commit def06a8086f11af9e76bed0249e740d46cf4ea79
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