Skip to content

Instantly share code, notes, and snippets.

View hegish's full-sized avatar

Jan Hegewald hegish

View GitHub Profile
@hegish
hegish / CMakeLists.txt
Created May 17, 2017 12:37
simple pfunit unit test build using cmake
cmake_minimum_required(VERSION 3.7)
project(pfunittests.x Fortran)
# create the corresponding F90 file for all our pfunit files (*.pf) via pFUnitParser.py
file(GLOB pfunitparser_files ${CMAKE_CURRENT_LIST_DIR}/*.pf)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_CURRENT_LIST_DIR})
foreach(f ${pfunitparser_files})
set(outfile ${CMAKE_CURRENT_BINARY_DIR}${f}.F90)
add_custom_target(run ALL DEPENDS ${outfile})