Skip to content

Commit b002744

Browse files
committed
compilers template
1 parent 612aa39 commit b002744

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ include(cmake/compiler_find.cmake)
66
project(Fortran2018Examples
77
LANGUAGES C Fortran
88
DESCRIPTION "Example of using modern Fortran syntax"
9-
VERSION 1.3.2)
9+
VERSION 1.3.3)
1010

1111
include(CTest)
1212
if(NOT DEFINED ${PROJECT_NAME}_BUILD_TESTING)

cmake/compilers.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
if(NOT CMAKE_Fortran_COMPILER_ID STREQUAL ${CMAKE_C_COMPILER_ID})
2+
message(FATAL_ERROR "C compiler ${CMAKE_C_COMPILER_ID} does not match Fortran compiler ${CMAKE_Fortran_COMPILER_ID}.
3+
Set environment variables CC and FC to control compiler selection in general.")
4+
endif()
5+
16
find_package(MPI COMPONENTS Fortran)
27

38
include(CheckCSourceCompiles)

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
project('Fortran2018examples', 'fortran', 'c',
2-
version : '1.3.2',
2+
version : '1.3.3',
33
meson_version: '>= 0.52.0',
44
default_options : ['default_library=static', 'buildtype=release', 'warning_level=3'])
55

0 commit comments

Comments
 (0)