This commit is contained in:
Radovan Bast 2015-06-04 17:27:18 +02:00
parent d660ba856d
commit 60ecbdfec1
3 changed files with 22 additions and 0 deletions

3
.gitignore vendored
View File

@ -8,3 +8,6 @@ test/*/cmake/update.py*
test/*/cmake/lib/
test/*/cmake/modules/
test/*/setup.py
# generated by doc/extract_rst.py
doc/module-reference.rst

View File

@ -1,3 +1,14 @@
#.rst:
#
# Adds Fortran support.
# Appends EXTRA_Fortran_FLAGS to CMAKE_Fortran_FLAGS.
# If environment variable FCFLAGS is set, then these flags are used
# and no other flags are appended.
#
# Defines::
#
# CMAKE_Fortran_MODULE_DIRECTORY (${PROJECT_BINARY_DIR}/include/fortran)
enable_language(Fortran)
set(CMAKE_Fortran_MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/include/fortran)
@ -13,3 +24,7 @@ endif()
if(DEFINED EXTRA_Fortran_FLAGS)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${EXTRA_Fortran_FLAGS}")
endif()
if(DEFINED ENV{FCFLAGS})
set(CMAKE_Fortran_FLAGS "$ENV{FCFLAGS}")
endif()

View File

@ -4,6 +4,10 @@
# The reason why this information is stored
# in a file and not as CMake variable is that CMake-unaware programs can parse
# and use it (e.g. Sphinx).
#
# Defines::
#
# PROGRAM_VERSION
if(EXISTS "${PROJECT_SOURCE_DIR}/VERSION")
file(READ "${PROJECT_SOURCE_DIR}/VERSION" PROGRAM_VERSION)