Skip to content

Commit 0acd6e1

Browse files
authored
Merge pull request #2 from tclune/master
Eliminate requirement for Fortran compiler to install
2 parents ae22a45 + 2e0f248 commit 0acd6e1

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*~

CMakeLists.txt

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,17 @@ if(COMMAND cmake_policy)
33
cmake_policy(SET CMP0003 NEW)
44
endif(COMMAND cmake_policy)
55

6-
set(CMAKE_Fortran_COMPILER ${FC})
7-
8-
project (FTL)
9-
enable_language (Fortran)
10-
11-
message("${CMAKE_Fortran_COMPILER_ID}")
12-
if ("${CMAKE_Fortran_COMPILER_ID}" MATCHES "Intel")
13-
# set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -traceback -save-temps -check uninit")
14-
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O0 -traceback -save-temps -check uninit -check bounds -g -warn unused")
15-
# set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -Ofast")
16-
elseif ("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
17-
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O0 -fbacktrace -fcheck=bounds -fcheck=pointer -fcheck=mem -g")
18-
elseif ("${CMAKE_Fortran_COMPILER_ID}" MATCHES "NAG")
19-
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O0 -g -gline -C=dangling")
20-
endif ()
21-
22-
include (cmake_utils/CheckCompilerCapabilities.cmake)
6+
set(PFUNIT "" CACHE PATH "(optional) path to installed testing framework")
7+
if (PFUNIT)
8+
set(CMAKE_Fortran_COMPILER ${FC})
9+
project (FTL Fortran)
10+
else ()
11+
project (FTL NONE)
12+
endif()
2313

2414
add_subdirectory(include)
2515
add_subdirectory(examples)
2616

27-
if(EXISTS ${PFUNIT})
17+
if(PFUNIT)
2818
add_subdirectory(tests)
2919
endif()

0 commit comments

Comments
 (0)