Skip to content

Commit

Permalink
compilers template
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Nov 3, 2020
1 parent 612aa39 commit b002744
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include(cmake/compiler_find.cmake)
project(Fortran2018Examples
LANGUAGES C Fortran
DESCRIPTION "Example of using modern Fortran syntax"
VERSION 1.3.2)
VERSION 1.3.3)

include(CTest)
if(NOT DEFINED ${PROJECT_NAME}_BUILD_TESTING)
Expand Down
5 changes: 5 additions & 0 deletions cmake/compilers.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
if(NOT CMAKE_Fortran_COMPILER_ID STREQUAL ${CMAKE_C_COMPILER_ID})
message(FATAL_ERROR "C compiler ${CMAKE_C_COMPILER_ID} does not match Fortran compiler ${CMAKE_Fortran_COMPILER_ID}.
Set environment variables CC and FC to control compiler selection in general.")
endif()

find_package(MPI COMPONENTS Fortran)

include(CheckCSourceCompiles)
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('Fortran2018examples', 'fortran', 'c',
version : '1.3.2',
version : '1.3.3',
meson_version: '>= 0.52.0',
default_options : ['default_library=static', 'buildtype=release', 'warning_level=3'])

Expand Down

0 comments on commit b002744

Please sign in to comment.