From de92f5ced0108477dc595728510910bf048ce54f Mon Sep 17 00:00:00 2001 From: Radovan Bast Date: Thu, 4 Jun 2015 18:06:30 +0200 Subject: [PATCH] improve fc.cmake doc --- modules/fc.cmake | 5 +++-- test/fc/cmake/autocmake.cfg | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/fc.cmake b/modules/fc.cmake index 9280838..8aa836f 100644 --- a/modules/fc.cmake +++ b/modules/fc.cmake @@ -9,13 +9,13 @@ # # CMAKE_Fortran_MODULE_DIRECTORY (${PROJECT_BINARY_DIR}/include/fortran) # -# Example autocmake.cfg entry:: +# Example ``autocmake.cfg`` entry:: # # [fc] # source: https://github.com/scisoft/autocmake/raw/master/modules/fc.cmake # docopt: --fc= Fortran compiler [default: gfortran]. # --extra-fc-flags= Extra Fortran compiler flags [default: '']. -# export: 'FC=%s' % arguments['--fc']`` +# export: 'FC=%s' % arguments['--fc'] # define: '-DEXTRA_FCFLAGS=%s' % arguments['--extra-fc-flags'] enable_language(Fortran) @@ -35,5 +35,6 @@ if(DEFINED EXTRA_FCFLAGS) endif() if(DEFINED ENV{FCFLAGS}) + message(STATUS "FCFLAGS is set to '$ENV{FCFLAGS}'.") set(CMAKE_Fortran_FLAGS "$ENV{FCFLAGS}") endif() diff --git a/test/fc/cmake/autocmake.cfg b/test/fc/cmake/autocmake.cfg index f75b91c..f5261f4 100644 --- a/test/fc/cmake/autocmake.cfg +++ b/test/fc/cmake/autocmake.cfg @@ -1,10 +1,12 @@ [project] name: example -[fortran] +[fc] source: https://github.com/scisoft/autocmake/raw/master/modules/fc.cmake docopt: --fc= Fortran compiler [default: gfortran]. + --extra-fc-flags= Extra Fortran compiler flags [default: '']. export: 'FC=%s' % arguments['--fc'] +define: '-DEXTRA_FCFLAGS=%s' % arguments['--extra-fc-flags'] [compilers] source: https://github.com/scisoft/autocmake/raw/master/compilers/GNU.Fortran.cmake