ENH: Test included header in Fortran preprocessing

This extends the Fortran preprocessing test to include a header file
through a preprocessor directive.
This commit is contained in:
Brad King 2009-02-24 14:32:31 -05:00
parent 66f2edbe63
commit ff32962a68
3 changed files with 7 additions and 5 deletions

View File

@ -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)

View File

@ -0,0 +1,5 @@
#ifdef BAR
PRINT * , 'BAR was defined via ADD_DEFINITIONS'
#else
PRINT *, 'If you can read this something went wrong'
#endif

View File

@ -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