cosmetics

This commit is contained in:
Radovan Bast 2015-08-04 13:25:58 +02:00
parent 1e77115a23
commit 029dcf9dab
6 changed files with 22 additions and 16 deletions

View File

@ -10,5 +10,5 @@ source: ../../../modules/default_build_paths.cmake
[src]
source: ../../../modules/src.cmake
[git]
[git_info]
source: ../../../modules/git_info/git_info.cmake

View File

@ -0,0 +1,3 @@
include_directories(${PROJECT_BINARY_DIR})
add_executable(example example.F90)

View File

@ -0,0 +1,16 @@
program example
implicit none
logical :: test_ok
! file generated at build time
#include "git_info.h"
test_ok = len(GIT_COMMIT_HASH) > 0 .and. &
len(GIT_COMMIT_AUTHOR) > 0 .and. &
len(GIT_COMMIT_DATE) > 0 .and. &
len(GIT_BRANCH) > 0
if (test_ok) print *, 'Test OK!'
end program

View File

@ -1,2 +0,0 @@
include_directories("${PROJECT_BINARY_DIR}")
add_executable(example example.F90)

View File

@ -1,11 +0,0 @@
program example
implicit none
logical :: test_ok
! file generated on run-time
#include "git_info.h"
test_ok = len(GIT_COMMIT_HASH) > 0 .and. &
len(GIT_COMMIT_AUTHOR) > 0 .and. &
len(GIT_COMMIT_DATE) > 0 .and. &
len(GIT_BRANCH) > 0
if (test_ok) print *,'Test OK!'
end program

View File

@ -133,8 +133,8 @@ def test_fc():
assert 'Hello World!' in stdout
def test_fc_gitinfo():
stdout, stderr = configure_build_and_exe('fc_gitinfo', 'python setup.py --fc=gfortran')
def test_fc_git_info():
stdout, stderr = configure_build_and_exe('fc_git_info', 'python setup.py --fc=gfortran')
assert 'Test OK!' in stdout
# ------------------------------------------------------------------------------