[cmake-commits] king committed CMakeLists.txt 1.12 1.13 test_preprocess.F90 NONE 1.1

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Jan 9 10:30:13 EST 2008


Update of /cvsroot/CMake/CMake/Tests/Fortran
In directory public:/mounts/ram/cvs-serv3150/Tests/Fortran

Modified Files:
	CMakeLists.txt 
Added Files:
	test_preprocess.F90 
Log Message:
ENH: Patch from Maik to add preprocessor directive handling to Fortran dependency scanning.  Also added -fpp flag to Intel Fortran compiler on Windows by default.


--- NEW FILE: test_preprocess.F90 ---
MODULE Available
! no conent
END MODULE

PROGRAM PPTEST
! value of InPPFalseBranch ; values of SkipToEnd
! 0 <empty>
#ifndef FOO
  ! 1 ; <0>
  USE NotAvailable
# ifndef FOO
    ! 2 ; <0,0>
    USE NotAvailable
# else
    ! 2 ; <0,0>
    USE NotAvailable
# endif
  ! 1 ; <0>
# ifdef FOO
    ! 2 ; <0,1>
    USE NotAvailable
# else
    ! 2 ; <0,1>
    USE NotAvailable
# endif
  ! 1 ; <0>
#else
  ! 0 ; <0>
  USE Available
# ifndef FOO
    ! 1 ; <0,0>
    USE NotAvailable
# else
    ! 0 ; <0,0>
    USE Available
# endif
  ! 0 ; <0>
# ifdef FOO
    ! 0 ; <0,1>
    USE Available
# else
    ! 1 ; <0,1>
    USE NotAvailable
# endif
  ! 0 ; <0>
#endif
! 0 ; <empty>

#ifdef BAR
  PRINT * , 'BAR was defined via ADD_DEFINITIONS'
#else
  PRINT *, 'If you can read this something went wrong'
#endif

END PROGRAM

Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/Fortran/CMakeLists.txt,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- CMakeLists.txt	30 Dec 2007 21:11:38 -0000	1.12
+++ CMakeLists.txt	9 Jan 2008 15:30:11 -0000	1.13
@@ -23,6 +23,9 @@
     in_interface/main.f90
     in_interface/module.f90)
 
+  ADD_DEFINITIONS(-DFOO -DBAR=1)
+  ADD_EXECUTABLE(test_preprocess test_preprocess.F90)
+
   SET(TEST_MODULE_DEPENDS 1)
 ENDIF(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
 



More information about the Cmake-commits mailing list