-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add custom source extension capability to
preprocess
support preprocessor suffixes fix for allocatable string replace function wiht subroutine fix allocations check present use macros only if allocated
- Loading branch information
Showing
11 changed files
with
206 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
program test_preprocess_suffix | ||
use preprocess_cpp | ||
#ifndef TESTMACRO | ||
stop -1 | ||
#else | ||
stop 0 | ||
#endif | ||
end program test_preprocess_suffix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name = "preprocess_cpp_suffix" | ||
version = "1" | ||
|
||
[preprocess] | ||
[preprocess.cpp] | ||
macros = ["TESTMACRO", "TESTMACRO2=3", "TESTMACRO3={version}"] | ||
suffixes = ["fpp"] |
22 changes: 22 additions & 0 deletions
22
example_packages/preprocess_cpp_suffix/src/preprocess_cpp.fpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module preprocess_cpp | ||
implicit none | ||
private | ||
|
||
public :: say_hello | ||
contains | ||
subroutine say_hello | ||
print *, "Hello, preprocess_cpp!" | ||
#ifndef TESTMACRO | ||
This breaks the build. | ||
#endif | ||
|
||
#if TESTMACRO2 != 3 | ||
This breaks the build. | ||
#endif | ||
|
||
#if TESTMACRO3 != 1 | ||
This breaks the build. | ||
#endif | ||
|
||
end subroutine say_hello | ||
end module preprocess_cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.