Files
CMake/Tests/RunCMake/CMP0129/Fortran.cmake
makise-homura 3958ed878f LCC: Add policy CMP0129 regarding interpreting LCC as GNU
Due to MCST LCC compiler identification is now changed to LCC,
there should be a way for old projects to still identify it as GNU,
as it was before.
This commits adds the policy:
CMP0129: Compiler id for MCST LCC compilers is now LCC, not GNU.
This policy controls such a behavior.
OLD behaivior is to treat LCC as GNU, NEW is to treat is as LCC.
2021-10-21 17:24:22 +03:00

16 lines
343 B
CMake

include(CheckLanguage)
check_language(Fortran)
if(NOT CMAKE_Fortran_COMPILER)
# No Fortran compiler, skipping Fortran test
return()
endif()
if(SET_CMP0129)
cmake_policy(SET CMP0129 ${SET_CMP0129})
endif()
enable_language(Fortran)
set(CMAKE_VERBOSE_MAKEFILE TRUE)
include(CompareCompilerVersion.cmake)
compare_compiler_version(Fortran)