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:
parent
66f2edbe63
commit
ff32962a68
|
@ -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)
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
#ifdef BAR
|
||||
PRINT * , 'BAR was defined via ADD_DEFINITIONS'
|
||||
#else
|
||||
PRINT *, 'If you can read this something went wrong'
|
||||
#endif
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue