-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathoops_compiler_flags.cmake
More file actions
59 lines (50 loc) · 2.31 KB
/
Copy pathoops_compiler_flags.cmake
File metadata and controls
59 lines (50 loc) · 2.31 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# (C) Copyright 2009-2016 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation nor
# does it submit to any jurisdiction.
if( NOT CMAKE_BUILD_TYPE MATCHES "Debug" )
add_definitions( -DNDEBUG )
endif( )
#######################################################################################
# Fortran
#######################################################################################
if( CMAKE_Fortran_COMPILER_ID MATCHES "GNU" )
include( compiler_flags_GNU_Fortran )
elseif( CMAKE_Fortran_COMPILER_ID MATCHES "Intel" )
include( compiler_flags_Intel_Fortran )
elseif( CMAKE_Fortran_COMPILER_ID MATCHES "PGI" OR CMAKE_Fortran_COMPILER_ID MATCHES "NVHPC" )
include( compiler_flags_NVHPC_Fortran )
elseif( CMAKE_Fortran_COMPILER_ID MATCHES "XL" )
include( compiler_flags_XL_Fortran )
elseif( CMAKE_Fortran_COMPILER_ID MATCHES "Cray" )
include( compiler_flags_Cray_Fortran )
elseif( CMAKE_Fortran_COMPILER_ID MATCHES "NVHPC" )
include( compiler_flags_NVHPC_Fortran )
else()
message( STATUS "Fortran compiler with ID ${CMAKE_CXX_COMPILER_ID} will be used with CMake default options")
endif()
#######################################################################################
# C
#######################################################################################
# todo
#######################################################################################
# C++
#######################################################################################
if( CMAKE_CXX_COMPILER_ID MATCHES "GNU" )
include( compiler_flags_GNU_CXX )
elseif( CMAKE_CXX_COMPILER_ID MATCHES "Intel" )
include( compiler_flags_Intel_CXX )
elseif( CMAKE_CXX_COMPILER_ID MATCHES "XL" )
include( compiler_flags_XL_CXX )
elseif( CMAKE_CXX_COMPILER_ID MATCHES "Cray" )
include( compiler_flags_Cray_CXX )
elseif( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
include( compiler_flags_Clang_CXX )
elseif( CMAKE_CXX_COMPILER_ID MATCHES "NVHPC" )
include( compiler_flags_NVHPC_CXX )
else()
message( STATUS "C++ compiler with ID ${CMAKE_CXX_COMPILER_ID} will be used with CMake default options")
endif()