Skip to content
Snippets Groups Projects
Commit 32e970e5 authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon
Browse files

Fortran: disable auto-detection of fortran bindings

Auto-detection of language available doesn't correctly work in CMake so
just explicitly default to OFF here and error out if set to AUTO.
parent 27894a42
No related branches found
No related tags found
1 merge request!264Address various windows issues
......@@ -90,7 +90,7 @@ adios_option(ZeroMQ "Enable support for ZeroMQ" AUTO)
adios_option(HDF5 "Enable support for the HDF5 engine" AUTO)
adios_option(ADIOS1 "Enable support for the ADIOS 1.x engine" AUTO)
adios_option(Python "Enable support for Python bindings" AUTO)
adios_option(Fortran "Enable support for Fortran bindings" AUTO)
adios_option(Fortran "Enable support for Fortran bindings" OFF)
adios_option(SysVShMem "Enable support for SysV Shared Memory IPC on *NIX" AUTO)
include(${ADIOS2_SOURCE_DIR}/cmake/DetectOptions.cmake)
......
......@@ -33,25 +33,32 @@ if(ZFP_FOUND)
set(ADIOS2_HAVE_ZFP TRUE)
endif()
set(mpi_find_components C)
# Fortran
if(ADIOS2_USE_Fortran STREQUAL AUTO)
# Currently auto-detection for language support does not work in CMake. See
# documentation for the "enable_language" command
message(WARN "Auto-detection of Fortran is not currently supported; Disabling")
#enable_language(Fortran OPTIONAL)
elseif(ADIOS2_USE_Fortran)
enable_language(Fortran)
endif()
if(CMAKE_Fortran_COMPILER_LOADED)
set(ADIOS2_HAVE_Fortran TRUE)
list(APPEND mpi_find_components Fortran)
endif()
# MPI
if(ADIOS2_USE_MPI STREQUAL AUTO)
find_package(MPI)
find_package(MPI COMPONENTS ${mpi_find_components})
elseif(ADIOS2_USE_MPI)
find_package(MPI REQUIRED)
find_package(MPI COMPONENTS ${mpi_find_components} REQUIRED)
endif()
if(MPI_FOUND)
set(ADIOS2_HAVE_MPI TRUE)
endif()
# Fortran
if(ADIOS2_USE_Fortran)
set(ADIOS2_HAVE_Fortran TRUE)
enable_language(Fortran)
if(ADIOS2_HAVE_MPI)
find_package(MPI COMPONENTS Fortran REQUIRED)
endif()
endif()
# DataMan
if(SHARED_LIBS_SUPPORTED AND NOT MSVC)
set(ADIOS2_HAVE_DataMan TRUE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment