#!/bin/sh # Copyright 2016 Ghislain Antony Vaillant # # This file is part of the autopkgtest testsuite for Field3D. set -e # Presence of $AUTOPKGTEST_TMP implies that someone will handle cleanup for us, so we # can avoid duplicating the effort (signal handling, etc.) here. if [ -z "$AUTOPKGTEST_TMP" ] then echo "Required envvar \"$AUTOPKGTEST_TMP\"is not set" >&2 exit 1 fi # Copy example source code. cp -r /usr/share/doc/field3d-doc/examples/* "$AUTOPKGTEST_TMP" cd "$AUTOPKGTEST_TMP" # Create the CMake project. cat < CMakeLists.txt cmake_minimum_required(VERSION 4.0) project(dummy) set(Boost_COMPONENTS thread) find_package(Boost COMPONENTS \${Boost_COMPONENTS} REQUIRED) include_directories(\${Boost_INCLUDE_DIRS}) link_directories(\${Boost_LIBRARY_DIRS}) find_package(HDF5 REQUIRED) include_directories(\${HDF5_INCLUDE_DIRS}) link_directories(\${HDF5_LIBRARY_DIRS}) find_package(PkgConfig) pkg_check_modules(OPENEXR QUIET OpenEXR) include_directories(\${OPENEXR_INCLUDE_DIRS}) link_libraries(Field3D \${Boost_LIBRARIES} \${HDF5_LIBRARIES} \${OPENEXR_LIBRARIES}) add_executable(create_and_write create_and_write/main.cpp) add_executable(mixed_types mixed_types/main.cpp) add_executable(read read/main.cpp) add_executable(sparse_field_io sparse_field_io/main.cpp) EOF # Configure and build. mkdir build && cd build cmake ./.. echo "configure: OK" make echo "build: OK"