Commit c1c3fe73 authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon
Browse files

Merge branch 'fix-intall-config-generation' into release

* fix-intall-config-generation:
  cmake: Make the post-install generation of adios2-config optional
  cmake: silences CMP0074 warning in adios2-config generation
  cmake: Pass CMAKE_PREFIX_PATH to adios2-config generation
parents 6b6fdea6 a39bcf4c
......@@ -234,7 +234,11 @@ add_subdirectory(cmake/install/packaging)
#------------------------------------------------------------------------------#
# Generating static adios-config
#------------------------------------------------------------------------------#
add_subdirectory(cmake/install/post)
option(ADIOS2_INSTALL_GENERATE_CONFIG "Install a generated adios2-config shell script for non-cmake projects" ON)
mark_as_advanced(ADIOS2_INSTALL_GENERATE_CONFIG)
if(ADIOS2_INSTALL_GENERATE_CONFIG)
add_subdirectory(cmake/install/post)
endif()
#------------------------------------------------------------------------------#
# Configuration summary
......
......@@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 3.0)
project(adios2-config-dummy C CXX)
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
find_package(adios2 REQUIRED)
add_executable(without_C foo.c main.c)
......
......@@ -59,6 +59,7 @@ function prefixify() {
}
export adios2_DIR="${DESTDIR}$1"
shift
CMAKE="@CMAKE_COMMAND@"
SOURCE_DIR="@ADIOS2_SOURCE_DIR@/cmake/install/post/adios2-config-dummy"
BUILD_DIR=$(mktemp -d)
......@@ -77,6 +78,11 @@ then
export FC="@MPI_Fortran_COMPILER@"
fi
if [ -n "@CMAKE_PREFIX_PATH@" ]
then
EXTRA_CMAKE_ARGS="${EXTRA_CMAKE_ARGS} -DCMAKE_PREFIX_PATH=@CMAKE_PREFIX_PATH@"
fi
echo "Configuring adios2-config dummy CMake project"
if ! ${CMAKE} -G "Unix Makefiles" ${SOURCE_DIR} ${EXTRA_CMAKE_ARGS}
then
......
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