summaryrefslogtreecommitdiffstats
path: root/Tests/Fortran
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/Fortran')
-rw-r--r--Tests/Fortran/CMakeLists.txt1
-rw-r--r--Tests/Fortran/include/test_preprocess.h5
-rw-r--r--Tests/Fortran/test_preprocess.F906
3 files changed, 7 insertions, 5 deletions
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt
index e8515c4..e4fc4c2 100644
--- a/Tests/Fortran/CMakeLists.txt
+++ b/Tests/Fortran/CMakeLists.txt
@@ -127,6 +127,7 @@ if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
in_interface/module.f90)
add_definitions(-DFOO -DBAR=1)
+ include_directories(${testf_SOURCE_DIR}/include)
add_executable(test_preprocess test_preprocess.F90)
set(TEST_MODULE_DEPENDS 1)
diff --git a/Tests/Fortran/include/test_preprocess.h b/Tests/Fortran/include/test_preprocess.h
new file mode 100644
index 0000000..29ac4b6
--- /dev/null
+++ b/Tests/Fortran/include/test_preprocess.h
@@ -0,0 +1,5 @@
+#ifdef BAR
+ PRINT * , 'BAR was defined via ADD_DEFINITIONS'
+#else
+ PRINT *, 'If you can read this something went wrong'
+#endif
diff --git a/Tests/Fortran/test_preprocess.F90 b/Tests/Fortran/test_preprocess.F90
index 374a6ff..e4f1fbe 100644
--- a/Tests/Fortran/test_preprocess.F90
+++ b/Tests/Fortran/test_preprocess.F90
@@ -46,10 +46,6 @@ PROGRAM PPTEST
#endif
! 0 ; <empty>
-#ifdef BAR
- PRINT * , 'BAR was defined via ADD_DEFINITIONS'
-#else
- PRINT *, 'If you can read this something went wrong'
-#endif
+#include "test_preprocess.h"
END PROGRAM