Skip to content

Commit

Permalink
Make Fortran detection more reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuck Atkins committed May 25, 2018
1 parent 15127fb commit d0af1de
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
16 changes: 2 additions & 14 deletions cmake/DetectOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,10 @@ set(mpi_find_components C)

# Fortran
if(ADIOS2_USE_Fortran STREQUAL AUTO)
message(STATUS "Looking for a Fortran compiler")
include(CheckLanguage)
check_language(Fortran)
if(CMAKE_Fortran_COMPILER)
set(fcomp_args "-DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER}")
endif()
file(MAKE_DIRECTORY "${ADIOS2_BINARY_DIR}/cmake/check_f90")
execute_process(
COMMAND
"${CMAKE_COMMAND}" "${fcomp_args}" "${ADIOS2_SOURCE_DIR}/cmake/check_f90"
WORKING_DIRECTORY "${ADIOS2_BINARY_DIR}/cmake/check_f90"
RESULT_VARIABLE ADIOS2_FortranCompiles
)
if(ADIOS2_FortranCompiles EQUAL 0)
message(STATUS "Looking for a Fortran compiler -- found")
enable_language(Fortran)
else()
message(STATUS "Looking for a Fortran compiler -- not found")
endif()
elseif(ADIOS2_USE_Fortran)
enable_language(Fortran)
Expand Down
3 changes: 0 additions & 3 deletions cmake/check_f90/CMakeLists.txt

This file was deleted.

7 changes: 0 additions & 7 deletions cmake/check_f90/hello.f90

This file was deleted.

0 comments on commit d0af1de

Please sign in to comment.