Skip to content

Instantly share code, notes, and snippets.

@plevold
plevold / string.f90
Created February 13, 2023 11:23
Mutable Fortran string type
module string_mod
implicit none
private
public string_t
type :: string_t
private
character(len=:), allocatable :: chars
integer :: n = 0
@plevold
plevold / CMakeLists.txt
Last active May 18, 2017 06:28
Using pFUnit with CMake
cmake_minimum_required (VERSION 3.2 FATAL_ERROR)
# Enable CTest
enable_testing()
# This assumes that you've already cloned the pFUnit source code, built and installed it (make install)
# to a suitable location on your computer. Adding search paths using the PATHS argument is often necessary.
# See https://cmake.org/cmake/help/v3.0/command/find_package.html for more information.
# Note that the pFUnit package will be OS, compiler and compiler version dependent as it distributes Fortran mod-files.
find_package("pFUnit" REQUIRED)