AuxilaryFlags.cmake 1.15 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
###
#
# @copyright (c) 2009-2014 The University of Tennessee and The University
#                          of Tennessee Research Foundation.
#                          All rights reserved.
# @copyright (c) 2012-2014 Inria. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
#
#  @file AuxilaryFlags.cmake
#
#  @project MORSE
#  MORSE is a software package provided by:
#     Inria Bordeaux - Sud-Ouest,
#     Univ. of Tennessee,
#     King Abdullah Univesity of Science and Technology
#     Univ. of California Berkeley,
#     Univ. of Colorado Denver.
#
#  @version 0.9.0
#  @author Xavier Lacoste
#  @date 30-01-2015
#
# Define auxilary variables:
#  - CMAKE_Fortran_PREPROCESS_FLAGS : force C preprocessor.
#  - CMAKE_Fortran_FREEFORM_FLAG : Force free format.
28
#  - CMAKE_Fortran
29 30 31 32
###


IF(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
33 34 35
  list(APPEND CMAKE_Fortran_PREPROCESS_FLAGS "-cpp")
  list(APPEND CMAKE_Fortran_FREEFORM_FLAG "-ffree-form")

36 37
ELSEIF(CMAKE_Fortran_COMPILER_ID MATCHES Intel)
  list(APPEND CMAKE_Fortran_PREPROCESS_FLAG "-fpp")
38
  list(APPEND CMAKE_Fortran_FREEFORM_FLAG "")
39
ENDIF()