File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,19 @@ cmake_minimum_required(VERSION 3.14)
3
3
project (DonutFortran
4
4
LANGUAGES C Fortran )
5
5
6
+ if (CMAKE_CXX_COMPILER_ID MATCHES "(Clang|Intel)" )
7
+ add_compile_options ("$<$<COMPILE_LANGUAGE:C,CXX>:-Wall;-Wextra>" )
8
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
9
+ add_compile_options ("$<$<COMPILE_LANGUAGE:C,CXX>:/W3>" )
10
+ endif ()
11
+
6
12
if (CMAKE_Fortran_COMPILER_ID STREQUAL GNU )
7
- add_compile_options (-Wall -Wextra -Wpedantic
8
- "$<$<COMPILE_LANGUAGE:Fortran>:-Werror=array-bounds;-fcheck=bounds>"
13
+ add_compile_options (
14
+ "$<$<COMPILE_LANGUAGE:Fortran>:-fimplicit-none;-Wall;-Wextra;-Wpedantic;- Werror=array-bounds;-fcheck=bounds>"
9
15
"$<$<AND:$<CONFIG:Release>,$<COMPILE_LANGUAGE:Fortran>>:-fno-backtrace>"
10
16
)
17
+ elseif (CMAKE_Fortran_COMPILER_ID MATCHES "^Intel" )
18
+ add_compile_options ("$<$<COMPILE_LANGUAGE:Fortran>:-warn;-traceback;-check>" )
11
19
endif ()
12
20
13
21
add_executable (donut app/main.f90 )
You can’t perform that action at this time.
0 commit comments