Skip to content

Commit c71951b

Browse files
committed
add test example
1 parent f2f3a18 commit c71951b

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

ci/run_tests.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ pushd program_with_module
164164
"$fpm" run --target Program_with_module
165165
popd
166166

167+
pushd program_with_cpp_guarded_module
168+
"$fpm" build
169+
"$fpm" run
170+
popd
171+
167172
pushd link_executable
168173
"$fpm" build
169174
"$fpm" run --target gomp_test
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build/*
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
program program_with_module
2+
#if defined(HAVE_MODULE)
3+
use greet_m, only: greeting
4+
#endif
5+
implicit none
6+
7+
#ifndef HAVE_MODULE
8+
print *, 'OK without module'
9+
#else
10+
print *, greeting
11+
#endif
12+
end program program_with_module
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
name = "Program_with_cpp_guarded_module"
2+
# Enable CPP but do not define macros
3+
[preprocess.cpp]

0 commit comments

Comments
 (0)