Skip to content

Commit

Permalink
Merge pull request #228 from Goddard-Fortran-Ecosystem/bugfix/#227-WS…
Browse files Browse the repository at this point in the history
…L-workaround

Fixes #227 - WSL issue
  • Loading branch information
tclune authored Jul 29, 2020
2 parents f61186e + c3781c8 commit a98edb4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed

- Fixed problem under WSL+Gfortran-9 in which -O0 crashed pFUnit self tests.

## [4.1.9] - 2020-05-29

Expand Down
12 changes: 7 additions & 5 deletions cmake/GNU.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ set(traceback "-fbacktrace")
set(check_all "-fbounds-check")
set(cpp "-cpp")

string(REGEX MATCH "Microsoft" WSL ${CMAKE_HOST_SYSTEM_VERSION})
if (WSL)
set(opt "-O2")
else ()
set(opt "-O0")
endif ()

set(CMAKE_Fortran_FLAGS_DEBUG "-O0")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3")
#set(CMAKE_Fortran_FLAGS "-g ${cpp} -O0 ${traceback} ${check_all} -ffree-line-length-512")
set(CMAKE_Fortran_FLAGS "-g ${cpp} -O0 ${traceback} -ffree-line-length-512")

set(CMAKE_Fortran_FLAGS "-g ${cpp} ${opt} ${traceback} -ffree-line-length-512")

add_definitions(-D_GNU)

0 comments on commit a98edb4

Please sign in to comment.