diff --git a/CMakeLists.txt b/CMakeLists.txt index e7a1e2e..a8418d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/cmake/compilers.cmake b/cmake/compilers.cmake index 3225c33..ced0129 100644 --- a/cmake/compilers.cmake +++ b/cmake/compilers.cmake @@ -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) diff --git a/meson.build b/meson.build index 2d14d7c..02923d2 100644 --- a/meson.build +++ b/meson.build @@ -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'])