From 780469e7756090c425710c0b7c31b686eb1603c1 Mon Sep 17 00:00:00 2001 From: Roberto Di Remigio Date: Sat, 4 Aug 2018 09:32:17 -0400 Subject: [PATCH] Axe HDF5 superbuild --- .appveyor.yml | 1 + README.md | 3 +- chapter-08/README.md | 3 +- chapter-08/recipe-03/c-example/menu.yml | 21 ++ .../recipe-04/cxx-example-3.5/CMakeLists.txt | 4 + .../external/upstream/eigen3/CMakeLists.txt | 8 +- chapter-08/recipe-04/cxx-example-3.5/menu.yml | 20 ++ .../recipe-04/cxx-example/CMakeLists.txt | 4 + .../external/upstream/eigen3/CMakeLists.txt | 14 +- chapter-08/recipe-04/cxx-example/menu.yml | 20 ++ .../recipe-04/cxx-example/src/CMakeLists.txt | 9 +- chapter-08/recipe-05/README.md | 4 +- .../cxx-example/CMakeLists.txt | 10 +- .../external/upstream/CMakeLists.txt | 0 .../external/upstream/message/CMakeLists.txt | 15 +- .../cxx-example/src/CMakeLists.txt | 13 +- .../cxx-example/src/use_message.cpp | 0 .../recipe-05/fortran-example/CMakeLists.txt | 22 -- .../external/upstream/CMakeLists.txt | 4 - .../external/upstream/hdf5/CMakeLists.txt | 43 ---- .../hdf5/test_hdf5_has_fortran2003.f90 | 115 ---------- chapter-08/recipe-05/fortran-example/menu.yml | 23 -- .../fortran-example/src/CMakeLists.txt | 32 --- .../src/compound_fortran2003.f90 | 206 ------------------ .../src/test_hdf5_has_fortran2003.f90 | 115 ---------- chapter-08/recipe-05/title.txt | 2 +- chapter-08/recipe-06/README.md | 5 - chapter-08/recipe-06/title.txt | 1 - .../recipe-04/cxx-example/CMakeLists.txt | 2 +- 29 files changed, 130 insertions(+), 589 deletions(-) create mode 100644 chapter-08/recipe-03/c-example/menu.yml rename chapter-08/{recipe-06 => recipe-05}/cxx-example/CMakeLists.txt (66%) rename chapter-08/{recipe-06 => recipe-05}/cxx-example/external/upstream/CMakeLists.txt (100%) rename chapter-08/{recipe-06 => recipe-05}/cxx-example/external/upstream/message/CMakeLists.txt (57%) rename chapter-08/{recipe-06 => recipe-05}/cxx-example/src/CMakeLists.txt (52%) rename chapter-08/{recipe-06 => recipe-05}/cxx-example/src/use_message.cpp (100%) delete mode 100644 chapter-08/recipe-05/fortran-example/CMakeLists.txt delete mode 100644 chapter-08/recipe-05/fortran-example/external/upstream/CMakeLists.txt delete mode 100644 chapter-08/recipe-05/fortran-example/external/upstream/hdf5/CMakeLists.txt delete mode 100644 chapter-08/recipe-05/fortran-example/external/upstream/hdf5/test_hdf5_has_fortran2003.f90 delete mode 100644 chapter-08/recipe-05/fortran-example/menu.yml delete mode 100644 chapter-08/recipe-05/fortran-example/src/CMakeLists.txt delete mode 100644 chapter-08/recipe-05/fortran-example/src/compound_fortran2003.f90 delete mode 100644 chapter-08/recipe-05/fortran-example/src/test_hdf5_has_fortran2003.f90 delete mode 100644 chapter-08/recipe-06/README.md delete mode 100644 chapter-08/recipe-06/title.txt diff --git a/.appveyor.yml b/.appveyor.yml index 5a3f3efb2..12e5decfd 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -52,6 +52,7 @@ cache: install: - python -m pip install pipenv + - bash -c "pacman -Ss mercurial" - '%APPVEYOR_BUILD_FOLDER%\testing\dependencies\appveyor\install.bat' - ps: .$env:APPVEYOR_BUILD_FOLDER\testing\dependencies\appveyor\anaconda.ps1 - ps: .$env:APPVEYOR_BUILD_FOLDER\testing\dependencies\appveyor\install-msmpi.ps1 diff --git a/README.md b/README.md index 7bb5ff5cb..78a137954 100644 --- a/README.md +++ b/README.md @@ -114,8 +114,7 @@ - [Managing dependencies with a superbuild I. The Boost libraries](chapter-08/recipe-02/README.md) - [Managing dependencies with a superbuild II. The FFTW library](chapter-08/recipe-03/README.md) - [Managing dependencies with a superbuild III. The Eigen library](chapter-08/recipe-04/README.md) -- [Managing dependencies with a superbuild IV. The HDF5 library](chapter-08/recipe-05/README.md) -- [Managing your project as a superbuild](chapter-08/recipe-06/README.md) +- [Managing your project as a superbuild](chapter-08/recipe-05/README.md) ### [Chapter 9: Mixed-language Projects](chapter-09/README.md) diff --git a/chapter-08/README.md b/chapter-08/README.md index c0d06ea44..274132c12 100644 --- a/chapter-08/README.md +++ b/chapter-08/README.md @@ -4,5 +4,4 @@ - [Managing dependencies with a superbuild I. The Boost libraries](recipe-02/README.md) - [Managing dependencies with a superbuild II. The FFTW library](recipe-03/README.md) - [Managing dependencies with a superbuild III. The Eigen library](recipe-04/README.md) -- [Managing dependencies with a superbuild IV. The HDF5 library](recipe-05/README.md) -- [Managing your project as a superbuild](recipe-06/README.md) +- [Managing your project as a superbuild](recipe-05/README.md) diff --git a/chapter-08/recipe-03/c-example/menu.yml b/chapter-08/recipe-03/c-example/menu.yml new file mode 100644 index 000000000..acf9706e1 --- /dev/null +++ b/chapter-08/recipe-03/c-example/menu.yml @@ -0,0 +1,21 @@ +appveyor-vs: + definitions: + - FFTW3_FORCE_SUPERBUILD: 'ON' + +appveyor-msys: + definitions: + - FFTW3_FORCE_SUPERBUILD: 'ON' + +travis-linux: + definitions: + - FFTW3_FORCE_SUPERBUILD: 'ON' + +travis-osx: + definitions: + - FFTW3_FORCE_SUPERBUILD: 'ON' + +local: + definitions: + - FFTW3_FORCE_SUPERBUILD: 'ON' + env: + - VERBOSE_OUTPUT: 'ON' diff --git a/chapter-08/recipe-04/cxx-example-3.5/CMakeLists.txt b/chapter-08/recipe-04/cxx-example-3.5/CMakeLists.txt index 5cea20024..bf5478371 100644 --- a/chapter-08/recipe-04/cxx-example-3.5/CMakeLists.txt +++ b/chapter-08/recipe-04/cxx-example-3.5/CMakeLists.txt @@ -6,6 +6,10 @@ set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_STANDARD_REQUIRED ON) +set_property(DIRECTORY PROPERTY EP_BASE ${CMAKE_BINARY_DIR}/subprojects) + +option(Eigen3_FORCE_SUPERBUILD "Always build Eigen3 on our own" OFF) + add_subdirectory(external/upstream) include(ExternalProject) diff --git a/chapter-08/recipe-04/cxx-example-3.5/external/upstream/eigen3/CMakeLists.txt b/chapter-08/recipe-04/cxx-example-3.5/external/upstream/eigen3/CMakeLists.txt index 53ad855a8..309f21406 100644 --- a/chapter-08/recipe-04/cxx-example-3.5/external/upstream/eigen3/CMakeLists.txt +++ b/chapter-08/recipe-04/cxx-example-3.5/external/upstream/eigen3/CMakeLists.txt @@ -1,9 +1,13 @@ find_package(Eigen3 3.3.4 QUIET CONFIG) -if(TARGET Eigen3::Eigen) +if(TARGET Eigen3::Eigen AND (NOT Eigen3_FORCE_SUPERBUILD)) message(STATUS "Found Eigen3: ${EIGEN3_INCLUDE_DIR} (found version ${EIGEN3_VERSION_STRING})") add_library(eigen3_external INTERFACE) # dummy else() - message(STATUS "Suitable Eigen3 could not be located. Downloading and building!") + if(Eigen3_FORCE_SUPERBUILD) + message(STATUS "Forcing superbuild of Eigen3.") + else() + message(STATUS "Suitable Eigen3 could not be located. Downloading and building!") + endif() include(ExternalProject) ExternalProject_Add(eigen3_external HG_REPOSITORY diff --git a/chapter-08/recipe-04/cxx-example-3.5/menu.yml b/chapter-08/recipe-04/cxx-example-3.5/menu.yml index a1b2ac465..fa0bd20a8 100644 --- a/chapter-08/recipe-04/cxx-example-3.5/menu.yml +++ b/chapter-08/recipe-04/cxx-example-3.5/menu.yml @@ -1,5 +1,25 @@ +appveyor-vs: + definitions: + - Eigen3_FORCE_SUPERBUILD: 'ON' + +appveyor-msys: + definitions: + - Eigen3_FORCE_SUPERBUILD: 'ON' + +travis-linux: + definitions: + - Eigen3_FORCE_SUPERBUILD: 'ON' + # OpenMP does not work with clang travis-osx: + definitions: + - Eigen3_FORCE_SUPERBUILD: 'ON' failing_generators: - 'Unix Makefiles' - 'Ninja' + +local: + definitions: + - Eigen3_FORCE_SUPERBUILD: 'ON' + env: + - VERBOSE_OUTPUT: 'ON' diff --git a/chapter-08/recipe-04/cxx-example/CMakeLists.txt b/chapter-08/recipe-04/cxx-example/CMakeLists.txt index 6bcba9003..d1ab7a0dd 100644 --- a/chapter-08/recipe-04/cxx-example/CMakeLists.txt +++ b/chapter-08/recipe-04/cxx-example/CMakeLists.txt @@ -6,6 +6,10 @@ set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_STANDARD_REQUIRED ON) +set_property(DIRECTORY PROPERTY EP_BASE ${CMAKE_BINARY_DIR}/subprojects) + +option(Eigen3_FORCE_SUPERBUILD "Always build Eigen3 on our own" OFF) + add_subdirectory(external/upstream) include(ExternalProject) diff --git a/chapter-08/recipe-04/cxx-example/external/upstream/eigen3/CMakeLists.txt b/chapter-08/recipe-04/cxx-example/external/upstream/eigen3/CMakeLists.txt index 53ad855a8..9e6fb154f 100644 --- a/chapter-08/recipe-04/cxx-example/external/upstream/eigen3/CMakeLists.txt +++ b/chapter-08/recipe-04/cxx-example/external/upstream/eigen3/CMakeLists.txt @@ -1,14 +1,18 @@ find_package(Eigen3 3.3.4 QUIET CONFIG) -if(TARGET Eigen3::Eigen) +if(TARGET Eigen3::Eigen AND (NOT Eigen3_FORCE_SUPERBUILD)) message(STATUS "Found Eigen3: ${EIGEN3_INCLUDE_DIR} (found version ${EIGEN3_VERSION_STRING})") add_library(eigen3_external INTERFACE) # dummy else() - message(STATUS "Suitable Eigen3 could not be located. Downloading and building!") + if(Eigen3_FORCE_SUPERBUILD) + message(STATUS "Forcing superbuild of Eigen3.") + else() + message(STATUS "Suitable Eigen3 could not be located. Downloading and building!") + endif() include(ExternalProject) ExternalProject_Add(eigen3_external - HG_REPOSITORY - https://bitbucket.org/eigen/eigen - HG_TAG + GIT_REPOSITORY + https://github.com/eigenteam/eigen-git-mirror.git + GIT_TAG 3.3.4 UPDATE_COMMAND "" diff --git a/chapter-08/recipe-04/cxx-example/menu.yml b/chapter-08/recipe-04/cxx-example/menu.yml index a1b2ac465..fa0bd20a8 100644 --- a/chapter-08/recipe-04/cxx-example/menu.yml +++ b/chapter-08/recipe-04/cxx-example/menu.yml @@ -1,5 +1,25 @@ +appveyor-vs: + definitions: + - Eigen3_FORCE_SUPERBUILD: 'ON' + +appveyor-msys: + definitions: + - Eigen3_FORCE_SUPERBUILD: 'ON' + +travis-linux: + definitions: + - Eigen3_FORCE_SUPERBUILD: 'ON' + # OpenMP does not work with clang travis-osx: + definitions: + - Eigen3_FORCE_SUPERBUILD: 'ON' failing_generators: - 'Unix Makefiles' - 'Ninja' + +local: + definitions: + - Eigen3_FORCE_SUPERBUILD: 'ON' + env: + - VERBOSE_OUTPUT: 'ON' diff --git a/chapter-08/recipe-04/cxx-example/src/CMakeLists.txt b/chapter-08/recipe-04/cxx-example/src/CMakeLists.txt index a1ee51fc7..59b753fbd 100644 --- a/chapter-08/recipe-04/cxx-example/src/CMakeLists.txt +++ b/chapter-08/recipe-04/cxx-example/src/CMakeLists.txt @@ -11,5 +11,12 @@ add_executable(linear-algebra linear-algebra.cpp) target_link_libraries(linear-algebra PUBLIC Eigen3::Eigen - OpenMP::OpenMP_CXX + ) +set_target_properties( + linear-algebra + PROPERTIES + COMPILE_FLAGS + ${OpenMP_CXX_FLAGS} + LINK_FLAGS + ${OpenMP_CXX_FLAGS} ) diff --git a/chapter-08/recipe-05/README.md b/chapter-08/recipe-05/README.md index bd65595cf..2afbe272c 100644 --- a/chapter-08/recipe-05/README.md +++ b/chapter-08/recipe-05/README.md @@ -1,5 +1,5 @@ -# Managing dependencies with a superbuild IV. The HDF5 library +# Managing your project as a superbuild Abstract to be written ... -- [fortran-example](fortran-example/) +- [cxx-example](cxx-example/) diff --git a/chapter-08/recipe-06/cxx-example/CMakeLists.txt b/chapter-08/recipe-05/cxx-example/CMakeLists.txt similarity index 66% rename from chapter-08/recipe-06/cxx-example/CMakeLists.txt rename to chapter-08/recipe-05/cxx-example/CMakeLists.txt index 92d176f50..8d522454f 100644 --- a/chapter-08/recipe-06/cxx-example/CMakeLists.txt +++ b/chapter-08/recipe-05/cxx-example/CMakeLists.txt @@ -6,16 +6,23 @@ set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_STANDARD_REQUIRED ON) +if(NOT DEFINED CMAKE_BUILD_TYPE OR "${CMAKE_BUILD_TYPE}" STREQUAL "") + set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE) +endif() +message(STATUS "Build type set to ${CMAKE_BUILD_TYPE}") + +set_property(DIRECTORY PROPERTY EP_BASE ${CMAKE_BINARY_DIR}/subprojects) + add_subdirectory(external/upstream) include(ExternalProject) - ExternalProject_Add(${PROJECT_NAME}_core DEPENDS message_external SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src CMAKE_ARGS + -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} -DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS} @@ -23,6 +30,7 @@ ExternalProject_Add(${PROJECT_NAME}_core -Dmessage_DIR=${message_DIR} CMAKE_CACHE_ARGS -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} + -DCMAKE_PREFIX_PATH:PATH=${CMAKE_PREFIX_PATH} BUILD_ALWAYS 1 INSTALL_COMMAND diff --git a/chapter-08/recipe-06/cxx-example/external/upstream/CMakeLists.txt b/chapter-08/recipe-05/cxx-example/external/upstream/CMakeLists.txt similarity index 100% rename from chapter-08/recipe-06/cxx-example/external/upstream/CMakeLists.txt rename to chapter-08/recipe-05/cxx-example/external/upstream/CMakeLists.txt diff --git a/chapter-08/recipe-06/cxx-example/external/upstream/message/CMakeLists.txt b/chapter-08/recipe-05/cxx-example/external/upstream/message/CMakeLists.txt similarity index 57% rename from chapter-08/recipe-06/cxx-example/external/upstream/message/CMakeLists.txt rename to chapter-08/recipe-05/cxx-example/external/upstream/message/CMakeLists.txt index fb7275bec..adddfd199 100644 --- a/chapter-08/recipe-06/cxx-example/external/upstream/message/CMakeLists.txt +++ b/chapter-08/recipe-05/cxx-example/external/upstream/message/CMakeLists.txt @@ -1,6 +1,6 @@ find_package(message 1 CONFIG QUIET) if(message_FOUND) - get_property(_loc TARGET message::message PROPERTY LOCATION) + get_property(_loc TARGET message::message-shared PROPERTY LOCATION) message(STATUS "Found message: ${_loc} (found version ${message_VERSION})") add_library(message_external INTERFACE) # dummy else() @@ -15,10 +15,19 @@ else() "" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_PREFIX} + -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} CMAKE_CACHE_ARGS -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} + TEST_AFTER_INSTALL + 1 ) - set(message_DIR ${DEPS_INSTALL_PREFIX}/share/cmake/message - CACHE PATH "Path to internally built messageConfig.cmake" FORCE) + if(WIN32 AND NOT CYGWIN) + set(DEF_message_DIR ${STAGED_INSTALL_PREFIX}/CMake) + else() + set(DEF_message_DIR ${STAGED_INSTALL_PREFIX}/share/cmake) + endif() + file(TO_NATIVE_PATH "${DEF_message_DIR}/message" DEF_message_DIR) + set(message_DIR ${DEF_message_DIR} + CACHE PATH "Path to internally built messageConfig.cmake" FORCE) endif() diff --git a/chapter-08/recipe-06/cxx-example/src/CMakeLists.txt b/chapter-08/recipe-05/cxx-example/src/CMakeLists.txt similarity index 52% rename from chapter-08/recipe-06/cxx-example/src/CMakeLists.txt rename to chapter-08/recipe-05/cxx-example/src/CMakeLists.txt index 342d18317..d283ac8c3 100644 --- a/chapter-08/recipe-06/cxx-example/src/CMakeLists.txt +++ b/chapter-08/recipe-05/cxx-example/src/CMakeLists.txt @@ -1,13 +1,20 @@ cmake_minimum_required(VERSION 3.6 FATAL_ERROR) -project(recipe-06_core LANGUAGES CXX) +project(recipe-05_core + LANGUAGES CXX + ) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_EXTENSIONS OFF) +set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(message 1 CONFIG REQUIRED) -get_property(_loc TARGET message::message PROPERTY LOCATION) +get_property(_loc TARGET message::message-shared PROPERTY LOCATION) message(STATUS "Found message: ${_loc} (found version ${message_VERSION})") add_executable(use_message use_message.cpp) + target_link_libraries(use_message PUBLIC - message::message + message::message-shared ) diff --git a/chapter-08/recipe-06/cxx-example/src/use_message.cpp b/chapter-08/recipe-05/cxx-example/src/use_message.cpp similarity index 100% rename from chapter-08/recipe-06/cxx-example/src/use_message.cpp rename to chapter-08/recipe-05/cxx-example/src/use_message.cpp diff --git a/chapter-08/recipe-05/fortran-example/CMakeLists.txt b/chapter-08/recipe-05/fortran-example/CMakeLists.txt deleted file mode 100644 index fc8aa6a01..000000000 --- a/chapter-08/recipe-05/fortran-example/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -cmake_minimum_required(VERSION 3.6 FATAL_ERROR) - -project(recipe-05 LANGUAGES Fortran) - -add_subdirectory(external/upstream) - -include(ExternalProject) -ExternalProject_Add(${PROJECT_NAME}_core - DEPENDS - hdf5_external - SOURCE_DIR - ${CMAKE_CURRENT_SOURCE_DIR}/src - CMAKE_ARGS - -DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER} - CMAKE_CACHE_ARGS - -DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS} - -DHDF5_ROOT:PATH=${HDF5_ROOT} - BUILD_ALWAYS - 1 - INSTALL_COMMAND - "" - ) diff --git a/chapter-08/recipe-05/fortran-example/external/upstream/CMakeLists.txt b/chapter-08/recipe-05/fortran-example/external/upstream/CMakeLists.txt deleted file mode 100644 index c5380db12..000000000 --- a/chapter-08/recipe-05/fortran-example/external/upstream/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -set(DEPS_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/Deps) -message(STATUS "Installing dependencies to: ${DEPS_INSTALL_PREFIX}") - -add_subdirectory(hdf5) diff --git a/chapter-08/recipe-05/fortran-example/external/upstream/hdf5/CMakeLists.txt b/chapter-08/recipe-05/fortran-example/external/upstream/hdf5/CMakeLists.txt deleted file mode 100644 index c80cfceaf..000000000 --- a/chapter-08/recipe-05/fortran-example/external/upstream/hdf5/CMakeLists.txt +++ /dev/null @@ -1,43 +0,0 @@ -find_package(HDF5 1.8 QUIET COMPONENTS Fortran) -if(HDF5_FOUND) - set(scratch_directory ${CMAKE_CURRENT_BINARY_DIR}/HDF5_HAS_Fortran2003-test) - try_compile(HDF5_HAS_Fortran2003 - ${scratch_directory} - SOURCES - ${CMAKE_CURRENT_SOURCE_DIR}/test_hdf5_has_fortran2003.f90 - CMAKE_FLAGS - -DINCLUDE_DIRECTORIES=${HDF5_INCLUDE_DIRS} - LINK_LIBRARIES - ${HDF5_Fortran_LIBRARIES} - ) -endif() - -if(HDF5_FOUND AND HDF5_HAS_Fortran2003) - message(STATUS "Found HDF5 with Fortran2003 bindings (found version ${HDF5_VERSION})") - add_library(hdf5_external INTERFACE) -else() - message(STATUS "Suitable HDF5 could not be located. Downloading and building!") - include(ExternalProject) - ExternalProject_Add(hdf5_external - GIT_REPOSITORY - https://bitbucket.hdfgroup.org/scm/hdffv/hdf5.git - GIT_TAG - hdf5-1_10_2 - UPDATE_COMMAND - "" - CONFIGURE_COMMAND - CC=${CMAKE_C_COMPILER} FC=${CMAKE_Fortran_COMPILER} - /configure --prefix=${DEPS_INSTALL_PREFIX}/hdf5 --enable-fortran - BUILD_IN_SOURCE - 1 - BUILD_COMMAND - ${CMAKE_MAKE_PROGRAM} - INSTALL_COMMAND - ${CMAKE_MAKE_PROGRAM} install - ) - set(HDF5_ROOT ${DEPS_INSTALL_PREFIX}/hdf5 - CACHE PATH - "Path to internally built HDF5" - FORCE - ) -endif() diff --git a/chapter-08/recipe-05/fortran-example/external/upstream/hdf5/test_hdf5_has_fortran2003.f90 b/chapter-08/recipe-05/fortran-example/external/upstream/hdf5/test_hdf5_has_fortran2003.f90 deleted file mode 100644 index 9f0cc9f00..000000000 --- a/chapter-08/recipe-05/fortran-example/external/upstream/hdf5/test_hdf5_has_fortran2003.f90 +++ /dev/null @@ -1,115 +0,0 @@ -! This is the F2003 version of the h5_compound.c example source code. -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the COPYING file, which can be found at the root of the source code * -! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * -! If you do not have access to either file, you may request a copy from * -! help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! This example shows how to create an array of a compound datatype which -! contains an array of type complex and how to write it to hdf5 -! and how to read it back into a compound datatype for hdf5. -! - -PROGRAM compound_complex_fortran2003 - - USE hdf5 - USE ISO_C_BINDING - IMPLICIT NONE - - INTEGER, PARAMETER :: r_k8 = KIND(0.0d0) - INTEGER, PARAMETER :: NMAX = 3 - - TYPE sample - COMPLEX(KIND=r_k8), DIMENSION(1:NMAX) :: nlev - REAL(KIND=r_k8) :: N - END TYPE sample - - INTEGER(HID_T) :: sample_type_id, dset_id, dspace_id, file_id - INTEGER(HSIZE_T) :: dims(1) = (/NMAX/) - INTEGER :: error - - TYPE(sample), DIMENSION(1:NMAX), TARGET :: samples, read_samples - INTEGER :: i - - TYPE(C_PTR) :: f_ptr - INTEGER(HSIZE_T), DIMENSION(1) :: array_dims=(/2*NMAX/) ! complex is really (real,real) so double size of array - INTEGER(hid_t) :: array_type_id ! Nested Array Datatype ID - - ! Initialize data - DO i=1,NMAX - samples(i)%nlev(1:NMAX) = (3.14159_r_k8, 2.71828_r_k8) - samples(i)%N = i - END DO - - ! Initialize FORTRAN interface. - CALL h5open_f(error) - - ! Create a new file using default properties. - CALL h5fcreate_f("test.h5", H5F_ACC_TRUNC_F, file_id, error) - ! - ! Create the memory data type. - ! - CALL H5Tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(samples(1)), C_LOC(samples(2))), sample_type_id, error) - - ! Create the array type - CALL h5Tarray_create_f(H5T_NATIVE_DOUBLE, 1, array_dims, array_type_id, error) - ! Then use that array type to insert values into - CALL H5Tinsert_f( sample_type_id, "nlev", & - H5OFFSETOF(C_LOC(samples(1)),C_LOC(samples(1)%nlev(1))), array_type_id, error) - CALL H5Tinsert_f( sample_type_id, "N", & - H5OFFSETOF(C_LOC(samples(1)),C_LOC(samples(1)%N)), h5kind_to_type(r_k8,H5_REAL_KIND), error) - ! - ! Create dataspace - ! - CALL h5screate_simple_f(1, dims, dspace_id, error) - ! - ! Create the dataset. - ! - CALL H5Dcreate_f(file_id, "samples", sample_type_id, dspace_id, dset_id, error) - ! - ! Write data to the dataset - ! - f_ptr = C_LOC(samples(1)) - CALL H5Dwrite_f(dset_id, sample_type_id, f_ptr, error) - ! Close up - CALL h5dclose_f(dset_id, error) - CALL h5sclose_f(dspace_id, error) - CALL h5fclose_f(file_id, error) - ! - ! Open the file and the dataset. - ! - CALL H5Fopen_f("test.h5", H5F_ACC_RDONLY_F, file_id, error) - - CALL H5Dopen_f(file_id, "samples", dset_id, error) - ! - ! Create the memory data type. - ! - CALL H5Tcreate_f(H5T_COMPOUND_F,H5OFFSETOF(C_LOC(samples(1)), C_LOC(samples(2))), sample_type_id,error) - - CALL H5Tinsert_f( sample_type_id, "nlev", & - H5OFFSETOF(C_LOC(samples(1)),C_LOC(samples(1)%nlev(1))), array_type_id, error) - CALL H5Tinsert_f( sample_type_id, "N", & - H5OFFSETOF(C_LOC(samples(1)),C_LOC(samples(1)%N)), h5kind_to_type(r_k8,H5_REAL_KIND), error) - - f_ptr = C_LOC(read_samples(1)) - CALL H5Dread_f(dset_id, sample_type_id, f_ptr, error) - - ! - ! Display the fields - ! - DO i=1,NMAX - WRITE(*,'(A,3(" (",F8.5,",",F8.5,")"))') "SAMPLES =",read_samples(i)%nlev(1:NMAX) - WRITE(*,'(A,F8.5)') "N =", read_samples(i)%N - END DO - - CALL H5Tclose_f(sample_type_id, error) - CALL H5Dclose_f(dset_id, error) - CALL H5Fclose_f(file_id, error) - -END PROGRAM compound_complex_fortran2003 diff --git a/chapter-08/recipe-05/fortran-example/menu.yml b/chapter-08/recipe-05/fortran-example/menu.yml deleted file mode 100644 index 612d8f26e..000000000 --- a/chapter-08/recipe-05/fortran-example/menu.yml +++ /dev/null @@ -1,23 +0,0 @@ -appveyor-vs: - failing_generators: - - 'Visual Studio 15 2017 Win64' - -appveyor-msys: - failing_generators: - - 'Ninja' - -drone: - failing_generators: - - 'Ninja' - -travis-linux: - failing_generators: - - 'Ninja' - -travis-osx: - failing_generators: - - 'Ninja' - -local: - failing_generators: - - 'Ninja' diff --git a/chapter-08/recipe-05/fortran-example/src/CMakeLists.txt b/chapter-08/recipe-05/fortran-example/src/CMakeLists.txt deleted file mode 100644 index 8f7b2f7e6..000000000 --- a/chapter-08/recipe-05/fortran-example/src/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -cmake_minimum_required(VERSION 3.6 FATAL_ERROR) - -project(recipe-05_core LANGUAGES Fortran) - -find_package(HDF5 1.8 REQUIRED COMPONENTS Fortran) -if(HDF5_FOUND) - set(scratch_directory ${CMAKE_CURRENT_BINARY_DIR}/HDF5_HAS_Fortran2003-test) - try_compile(HDF5_HAS_Fortran2003 - ${scratch_directory} - SOURCES - ${PROJECT_SOURCE_DIR}/test_hdf5_has_fortran2003.f90 - CMAKE_FLAGS - -DINCLUDE_DIRECTORIES=${HDF5_INCLUDE_DIRS} - LINK_LIBRARIES - ${HDF5_Fortran_LIBRARIES} - ) -endif() -if(NOT HDF5_HAS_Fortran2003) - message(FATAL_ERROR "HDF5 was NOT compiled with Fortran 2003 bindings") -else() - message(STATUS "Found HDF5 with Fortran2003 bindings (found version ${HDF5_VERSION})") -endif() - -add_executable(compound_fortran2003 compound_fortran2003.f90) -target_include_directories(compound_fortran2003 - PUBLIC - ${HDF5_INCLUDE_DIRS} - ) -target_link_libraries(compound_fortran2003 - PUBLIC - ${HDF5_Fortran_LIBRARIES} - ) diff --git a/chapter-08/recipe-05/fortran-example/src/compound_fortran2003.f90 b/chapter-08/recipe-05/fortran-example/src/compound_fortran2003.f90 deleted file mode 100644 index 09e1b0433..000000000 --- a/chapter-08/recipe-05/fortran-example/src/compound_fortran2003.f90 +++ /dev/null @@ -1,206 +0,0 @@ -! This is the F2003 version of the h5_compound.c example source code. -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the COPYING file, which can be found at the root of the source code * -! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * -! If you do not have access to either file, you may request a copy from * -! help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! This example shows how to create a compound data type, -! write an array which has the compound data type to the file, -! and read back fields' subsets. -! - -PROGRAM main - USE hdf5 - USE ISO_C_BINDING - IMPLICIT NONE - -! KIND parameters - - INTEGER, PARAMETER :: int_k1 = SELECTED_INT_KIND(1) ! This should map to INTEGER*1 on most modern processors - INTEGER, PARAMETER :: int_k2 = SELECTED_INT_KIND(4) ! This should map to INTEGER*2 on most modern processors - INTEGER, PARAMETER :: int_k4 = SELECTED_INT_KIND(8) ! This should map to INTEGER*4 on most modern processors - INTEGER, PARAMETER :: int_k8 = SELECTED_INT_KIND(16) ! This should map to INTEGER*8 on most modern processors - - INTEGER, PARAMETER :: r_k4 = SELECTED_REAL_KIND(5) ! This should map to REAL*4 on most modern processors - INTEGER, PARAMETER :: r_k8 = SELECTED_REAL_KIND(10) ! This should map to REAL*8 on most modern processors - -! FILES - - CHARACTER(LEN=*), PARAMETER :: H5FILE_NAME = "SDScompound.h5" - CHARACTER(LEN=*), PARAMETER :: DATASETNAME = "ArrayOfStructures" - - INTEGER, PARAMETER :: LENGTH = 10 - INTEGER, PARAMETER :: RANK = 1 - -!---------------------------------------------------------------- -! First derived-type and dataset - TYPE s1_t - CHARACTER(LEN=1), DIMENSION(1:13) :: chr - INTEGER(KIND=int_k1) :: a - REAL(KIND=r_k4) :: b - REAL(KIND=r_k8) :: c - END TYPE s1_t - - TYPE(s1_t), TARGET :: s1(LENGTH) - INTEGER(hid_t) :: s1_tid ! File datatype identifier - -!---------------------------------------------------------------- -! Second derived-type (subset of s1_t) and dataset - TYPE s2_t - CHARACTER(LEN=1), DIMENSION(1:13) :: chr - REAL(KIND=r_k8) :: c - INTEGER(KIND=int_k1) :: a - END TYPE s2_t - - type(s2_t), target :: s2(LENGTH) - integer(hid_t) :: s2_tid ! Memory datatype handle - -!---------------------------------------------------------------- -! Third "derived-type" (will be used to read float field of s1) - INTEGER(hid_t) :: s3_tid ! Memory datatype handle - REAL(KIND=r_k4), TARGET :: s3(LENGTH) - - INTEGER :: i - INTEGER(hid_t) :: file, dataset, space - !type(H5F_fileid_type) :: file - !type(H5D_dsetid_type) :: dataset - !type(H5S_spaceid_type) :: space - INTEGER(hsize_t) :: DIM(1) = (/LENGTH/) ! Dataspace dimensions - INTEGER(SIZE_T) :: type_size ! Size of the datatype - INTEGER(SIZE_T) :: offset, sizeof_compound - INTEGER :: hdferr - TYPE(C_PTR) :: f_ptr - - INTEGER(SIZE_T) :: type_sizei ! Size of the integer datatype - INTEGER(SIZE_T) :: type_sizer ! Size of the real datatype - INTEGER(SIZE_T) :: type_sized ! Size of the double datatype - INTEGER(hid_t) :: tid3 ! /* Nested Array Datatype ID */ - INTEGER(HSIZE_T), DIMENSION(1) :: tdims1=(/13/) - ! - ! Initialize FORTRAN interface. - ! - - CALL h5open_f(hdferr) - - ! - ! Initialize the data - ! - DO i = 0, LENGTH-1 - s1(i+1)%chr(1)(1:1) = 'a' - s1(i+1)%chr(2)(1:1) = 'b' - s1(i+1)%chr(3)(1:1) = 'c' - s1(i+1)%chr(4:12)(1:1) = ' ' - s1(i+1)%chr(13)(1:1) = 'd' - s1(i+1)%a = i - s1(i+1)%b = i*i - s1(i+1)%c = 1./REAL(i+1) - END DO - ! - ! Create the data space. - ! - ! - CALL H5Screate_simple_f(RANK, dim, space, hdferr) - - ! - ! Create the file. - ! - CALL H5Fcreate_f(H5FILE_NAME, H5F_ACC_TRUNC_F, file, hdferr) - - ! - ! Create the memory data type. - ! - CALL H5Tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(s1(1)), C_LOC(s1(2))), s1_tid, hdferr) - - CALL h5tarray_create_f(H5T_NATIVE_CHARACTER, 1, tdims1, tid3, hdferr) - - CALL H5Tinsert_f(s1_tid, "chr_name", H5OFFSETOF(C_LOC(s1(1)),C_LOC(s1(1)%chr)),tid3, hdferr) - CALL H5Tinsert_f(s1_tid, "a_name", H5OFFSETOF(C_LOC(s1(1)),C_LOC(s1(1)%a)), h5kind_to_type(int_k1,H5_INTEGER_KIND), hdferr) - CALL H5Tinsert_f(s1_tid, "c_name", H5OFFSETOF(C_LOC(s1(1)),C_LOC(s1(1)%c)), h5kind_to_type(r_k8,H5_REAL_KIND), hdferr) - CALL H5Tinsert_f(s1_tid, "b_name", H5OFFSETOF(C_LOC(s1(1)),C_LOC(s1(1)%b)), h5kind_to_type(r_k4,H5_REAL_KIND), hdferr) - - ! - ! Create the dataset. - ! - CALL H5Dcreate_f(file, DATASETNAME, s1_tid, space, dataset, hdferr) - - ! - ! Write data to the dataset - ! - - f_ptr = C_LOC(s1(1)) - CALL H5Dwrite_f(dataset, s1_tid, f_ptr, hdferr) - - ! - ! Release resources - ! - CALL H5Tclose_f(s1_tid, hdferr) - CALL H5Sclose_f(space, hdferr) - CALL H5Dclose_f(dataset, hdferr) - CALL H5Fclose_f(file, hdferr) - - ! - ! Open the file and the dataset. - ! - - CALL H5Fopen_f(H5FILE_NAME, H5F_ACC_RDONLY_F, file, hdferr) - - CALL H5Dopen_f(file, DATASETNAME, dataset,hdferr) - - ! - ! Create a data type for s2 - ! - CALL H5Tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(s2(1)), C_LOC(s2(2))), s2_tid, hdferr) - - CALL H5Tinsert_f(s2_tid, "chr_name", H5OFFSETOF(C_LOC(s2(1)),C_LOC(s2(1)%chr)), tid3, hdferr) - CALL H5Tinsert_f(s2_tid, "c_name", H5OFFSETOF(C_LOC(s2(1)),C_LOC(s2(1)%c)), h5kind_to_type(r_k8,H5_REAL_KIND), hdferr) - CALL H5Tinsert_f(s2_tid, "a_name", H5OFFSETOF(C_LOC(s2(1)),C_LOC(s2(1)%a)), h5kind_to_type(int_k1,H5_INTEGER_KIND), hdferr) - - ! - ! Read two fields c and a from s1 dataset. Fields in the file - ! are found by their names "c_name" and "a_name". - s2(:)%c=-1; s2(:)%a=-1; - - - f_ptr = C_LOC(s2(1)) - CALL H5Dread_f(dataset, s2_tid, f_ptr, hdferr) - - ! - ! Display the fields - ! - DO i = 1, length - WRITE(*,'(/,A,/,999(A,1X))') "Field chr :", s2(i)%chr(1:13)(1:1) - ENDDO - WRITE(*,'(/,A,/,999(F8.4,1X))') "Field c :", s2(:)%c - WRITE(*,'(/,A,/,999(I0,1X))') "Field a :", s2(:)%a - ! - ! Create a data type for s3. - ! - CALL H5Tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(s3(1)),C_LOC(s3(2))),s3_tid, hdferr) - - CALL H5Tinsert_f(s3_tid, "b_name", 0_size_t, h5kind_to_type(r_k4,H5_REAL_KIND), hdferr) - ! - ! Read field b from s1 dataset. Field in the file is found by its name. - ! - s3(:)=-1 - f_ptr = C_LOC(s3(1)) - CALL H5Dread_f(dataset, s3_tid, f_ptr, hdferr) - ! - ! Display the field - ! - WRITE(*,'(/,A,/,999(F8.4,1X))') "Field b :",s3(:) - ! - ! Release resources - ! - CALL H5Tclose_f(s2_tid, hdferr) - CALL H5Tclose_f(s3_tid, hdferr) - CALL H5Dclose_f(dataset, hdferr) - CALL H5Fclose_f(file, hdferr) - -END PROGRAM main diff --git a/chapter-08/recipe-05/fortran-example/src/test_hdf5_has_fortran2003.f90 b/chapter-08/recipe-05/fortran-example/src/test_hdf5_has_fortran2003.f90 deleted file mode 100644 index 9f0cc9f00..000000000 --- a/chapter-08/recipe-05/fortran-example/src/test_hdf5_has_fortran2003.f90 +++ /dev/null @@ -1,115 +0,0 @@ -! This is the F2003 version of the h5_compound.c example source code. -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the COPYING file, which can be found at the root of the source code * -! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * -! If you do not have access to either file, you may request a copy from * -! help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! This example shows how to create an array of a compound datatype which -! contains an array of type complex and how to write it to hdf5 -! and how to read it back into a compound datatype for hdf5. -! - -PROGRAM compound_complex_fortran2003 - - USE hdf5 - USE ISO_C_BINDING - IMPLICIT NONE - - INTEGER, PARAMETER :: r_k8 = KIND(0.0d0) - INTEGER, PARAMETER :: NMAX = 3 - - TYPE sample - COMPLEX(KIND=r_k8), DIMENSION(1:NMAX) :: nlev - REAL(KIND=r_k8) :: N - END TYPE sample - - INTEGER(HID_T) :: sample_type_id, dset_id, dspace_id, file_id - INTEGER(HSIZE_T) :: dims(1) = (/NMAX/) - INTEGER :: error - - TYPE(sample), DIMENSION(1:NMAX), TARGET :: samples, read_samples - INTEGER :: i - - TYPE(C_PTR) :: f_ptr - INTEGER(HSIZE_T), DIMENSION(1) :: array_dims=(/2*NMAX/) ! complex is really (real,real) so double size of array - INTEGER(hid_t) :: array_type_id ! Nested Array Datatype ID - - ! Initialize data - DO i=1,NMAX - samples(i)%nlev(1:NMAX) = (3.14159_r_k8, 2.71828_r_k8) - samples(i)%N = i - END DO - - ! Initialize FORTRAN interface. - CALL h5open_f(error) - - ! Create a new file using default properties. - CALL h5fcreate_f("test.h5", H5F_ACC_TRUNC_F, file_id, error) - ! - ! Create the memory data type. - ! - CALL H5Tcreate_f(H5T_COMPOUND_F, H5OFFSETOF(C_LOC(samples(1)), C_LOC(samples(2))), sample_type_id, error) - - ! Create the array type - CALL h5Tarray_create_f(H5T_NATIVE_DOUBLE, 1, array_dims, array_type_id, error) - ! Then use that array type to insert values into - CALL H5Tinsert_f( sample_type_id, "nlev", & - H5OFFSETOF(C_LOC(samples(1)),C_LOC(samples(1)%nlev(1))), array_type_id, error) - CALL H5Tinsert_f( sample_type_id, "N", & - H5OFFSETOF(C_LOC(samples(1)),C_LOC(samples(1)%N)), h5kind_to_type(r_k8,H5_REAL_KIND), error) - ! - ! Create dataspace - ! - CALL h5screate_simple_f(1, dims, dspace_id, error) - ! - ! Create the dataset. - ! - CALL H5Dcreate_f(file_id, "samples", sample_type_id, dspace_id, dset_id, error) - ! - ! Write data to the dataset - ! - f_ptr = C_LOC(samples(1)) - CALL H5Dwrite_f(dset_id, sample_type_id, f_ptr, error) - ! Close up - CALL h5dclose_f(dset_id, error) - CALL h5sclose_f(dspace_id, error) - CALL h5fclose_f(file_id, error) - ! - ! Open the file and the dataset. - ! - CALL H5Fopen_f("test.h5", H5F_ACC_RDONLY_F, file_id, error) - - CALL H5Dopen_f(file_id, "samples", dset_id, error) - ! - ! Create the memory data type. - ! - CALL H5Tcreate_f(H5T_COMPOUND_F,H5OFFSETOF(C_LOC(samples(1)), C_LOC(samples(2))), sample_type_id,error) - - CALL H5Tinsert_f( sample_type_id, "nlev", & - H5OFFSETOF(C_LOC(samples(1)),C_LOC(samples(1)%nlev(1))), array_type_id, error) - CALL H5Tinsert_f( sample_type_id, "N", & - H5OFFSETOF(C_LOC(samples(1)),C_LOC(samples(1)%N)), h5kind_to_type(r_k8,H5_REAL_KIND), error) - - f_ptr = C_LOC(read_samples(1)) - CALL H5Dread_f(dset_id, sample_type_id, f_ptr, error) - - ! - ! Display the fields - ! - DO i=1,NMAX - WRITE(*,'(A,3(" (",F8.5,",",F8.5,")"))') "SAMPLES =",read_samples(i)%nlev(1:NMAX) - WRITE(*,'(A,F8.5)') "N =", read_samples(i)%N - END DO - - CALL H5Tclose_f(sample_type_id, error) - CALL H5Dclose_f(dset_id, error) - CALL H5Fclose_f(file_id, error) - -END PROGRAM compound_complex_fortran2003 diff --git a/chapter-08/recipe-05/title.txt b/chapter-08/recipe-05/title.txt index 18c480e81..16ea95af7 100644 --- a/chapter-08/recipe-05/title.txt +++ b/chapter-08/recipe-05/title.txt @@ -1 +1 @@ -Managing dependencies with a superbuild IV. The HDF5 library +Managing your project as a superbuild diff --git a/chapter-08/recipe-06/README.md b/chapter-08/recipe-06/README.md deleted file mode 100644 index 2afbe272c..000000000 --- a/chapter-08/recipe-06/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Managing your project as a superbuild - -Abstract to be written ... - -- [cxx-example](cxx-example/) diff --git a/chapter-08/recipe-06/title.txt b/chapter-08/recipe-06/title.txt deleted file mode 100644 index 16ea95af7..000000000 --- a/chapter-08/recipe-06/title.txt +++ /dev/null @@ -1 +0,0 @@ -Managing your project as a superbuild diff --git a/chapter-10/recipe-04/cxx-example/CMakeLists.txt b/chapter-10/recipe-04/cxx-example/CMakeLists.txt index f22249714..514c38aa0 100644 --- a/chapter-10/recipe-04/cxx-example/CMakeLists.txt +++ b/chapter-10/recipe-04/cxx-example/CMakeLists.txt @@ -59,12 +59,12 @@ ExternalProject_Add(${PROJECT_NAME}_core -DCMAKE_INSTALL_PREFIX=${STAGED_INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} - -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} -DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS} -DCMAKE_CXX_STANDARD_REQUIRED=${CMAKE_CXX_STANDARD_REQUIRED} -Dmessage_DIR=${message_DIR} CMAKE_CACHE_ARGS + -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} -DCMAKE_PREFIX_PATH:PATH=${CMAKE_PREFIX_PATH} BUILD_ALWAYS 1