This repository has been archived by the owner on Nov 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'ccpp-framework/' from commit 'ffe41affb1cbbe0f9e10a0d3bc753c0707…
- Loading branch information
Showing
89 changed files
with
11,041 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#====================================================================== | ||
# | ||
coverage: | ||
range: 60...90 | ||
round: down | ||
precision: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# All compiled Python modules | ||
*.pyc | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
#====================================================================== | ||
# Project settings | ||
#====================================================================== | ||
# Only build master. | ||
branches: | ||
only: | ||
- master | ||
- develop | ||
|
||
language: fortran | ||
|
||
#====================================================================== | ||
# Environment | ||
#====================================================================== | ||
|
||
# Code is Fortran. While docs need doxygen and graphviz to build | ||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- cmake | ||
- gcc-6 | ||
- gfortran-6 | ||
- g++-6 | ||
- doxygen | ||
- graphviz | ||
- lcov | ||
|
||
#====================================================================== | ||
# Build Matrix | ||
#====================================================================== | ||
matrix: | ||
include: | ||
- os: linux | ||
compiler: gcc | ||
sudo: false | ||
dist: trusty | ||
# DH commented out 03/27/2018 because travis has problems with brew | ||
# todo: fix (maybe below brew install gcc@6?) | ||
# - os: osx | ||
# compiler: gcc | ||
|
||
#====================================================================== | ||
# Building | ||
#====================================================================== | ||
before_install: | ||
- | | ||
if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then | ||
brew update | ||
brew install gcc@6 | ||
fi | ||
- | | ||
if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then | ||
pip install --user cpp-coveralls | ||
fi | ||
before_script: | ||
- export CC="gcc-6" FC="gfortran-6" CXX="g++-6" ; | ||
|
||
script: | ||
- mkdir build && cd build && cmake .. && make | ||
- | | ||
if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then | ||
export LD_LIBRARY_PATH=${PWD}/schemes/check/src/check-build | ||
make test | ||
fi | ||
- | | ||
if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then | ||
export DYLD_LIBRARY_PATH=${PWD}/schemes/check/src/check-build | ||
ctest | ||
fi | ||
- | | ||
if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then | ||
make clean | ||
alias gcov="/usr/bin/gcov-6" | ||
cmake -DCMAKE_BUILD_TYPE=Coverage .. && make coverage | ||
fi | ||
after_success: | ||
- | | ||
if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then | ||
bash <(curl -s https://codecov.io/bash) | ||
fi | ||
#====================================================================== | ||
# Notifications | ||
#====================================================================== | ||
notifications: | ||
email: | ||
recipients: [email protected] | ||
on_success: change | ||
on_failure: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
cmake_minimum_required(VERSION 2.8.11) | ||
|
||
if(POLICY CMP0048) | ||
cmake_policy(SET CMP0048 NEW) | ||
project(ccpp VERSION 0.1.0) | ||
else(POLICY CMP0048) | ||
project(ccpp) | ||
set(PROJECT_VERSION 0.1.0) | ||
set(PROJECT_VERSION_MAJOR 0) | ||
set(PROJECT_VERSION_MINOR 1) | ||
set(PROJECT_VERSION_PATCH 0) | ||
endif(POLICY CMP0048) | ||
|
||
if(POLICY CMP0042) | ||
cmake_policy(SET CMP0042 NEW) | ||
endif(POLICY CMP0042) | ||
|
||
#------------------------------------------------------------------------------ | ||
# Enable Fortran | ||
enable_language(Fortran) | ||
|
||
#------------------------------------------------------------------------------ | ||
# Set package definitions | ||
set(PACKAGE "CCPP") | ||
set(AUTHORS "Timothy Brown" "David Gill" "Dom Heinzeller") | ||
string(TIMESTAMP YEAR "%Y") | ||
|
||
#------------------------------------------------------------------------------ | ||
# The PGI compiler can not find any cap routines in their library. | ||
# This is due to how it labels subroutines within a modules. | ||
# For example the subroutine b() in the moduel a(), gets named a_b. | ||
# GCC and Intel do NOT do this, it is name simply as b. | ||
if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "PGI") | ||
message(STATUS "WARNING: PGI compiler is not fully ISO_C compliant; working solution involves a hack pgifix.py") | ||
endif() | ||
|
||
#------------------------------------------------------------------------------ | ||
# CMake Modules | ||
# Set the CMake module path | ||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") | ||
|
||
#------------------------------------------------------------------------------ | ||
# Set OpenMP flags for C/C++/Fortran | ||
if (OPENMP) | ||
include(detect_openmp) | ||
detect_openmp() | ||
set (CMAKE_Fortran_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") | ||
set (CMAKE_Fortran_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") | ||
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_Fortran_FLAGS}") | ||
message(STATUS "Enable OpenMP support for C/C++/Fortran compiler") | ||
else(OPENMP) | ||
message (STATUS "Disable OpenMP support for C/C++/Fortran compiler") | ||
endif() | ||
|
||
#------------------------------------------------------------------------------ | ||
# The Fortran compiler/linker flag inserted by cmake to create shared libraries | ||
# with the Intel compiler is deprecated (-i_dynamic), correct here. | ||
# CMAKE_Fortran_COMPILER_ID = {"Intel", "PGI", "GNU", "Clang", "MSVC", ...} | ||
if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "Intel") | ||
string(REPLACE "-i_dynamic" "-shared-intel" | ||
CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS | ||
"${CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS}") | ||
string(REPLACE "-i_dynamic" "-shared-intel" | ||
CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS | ||
"${CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS}") | ||
endif() | ||
|
||
#------------------------------------------------------------------------------ | ||
# Set a default build type if none was specified | ||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) | ||
message(STATUS "Setting build type to 'Debug' as none was specified.") | ||
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE) | ||
|
||
# Set the possible values of build type for cmake-gui | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" | ||
"MinSizeRel" "RelWithDebInfo") | ||
endif() | ||
|
||
#------------------------------------------------------------------------------ | ||
# By default we want a shared library | ||
option(BUILD_SHARED_LIBS "Build a shared library" ON) | ||
|
||
#------------------------------------------------------------------------------ | ||
# Enable code coverage | ||
if(CMAKE_COMPILER_IS_GNUCC AND (CMAKE_BUILD_TYPE STREQUAL "Coverage")) | ||
include(code_coverage) | ||
list(APPEND LIBS "gcov") | ||
endif() | ||
|
||
#------------------------------------------------------------------------------ | ||
# Enable testing | ||
enable_testing() | ||
|
||
#------------------------------------------------------------------------------ | ||
# Add the sub-directories | ||
# Source | ||
add_subdirectory(src) | ||
# Documentation | ||
add_subdirectory(doc) | ||
# All schemes | ||
add_subdirectory(schemes) | ||
|
||
#------------------------------------------------------------------------------ | ||
# Configure and enable packaging | ||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Common Community Phyics Package") | ||
set(CPACK_PACKAGE_VENDOR "DTC NCAR") | ||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md") | ||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") | ||
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) | ||
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) | ||
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) | ||
set(CPACK_PACKAGE_INSTALL_DIRECTORY | ||
"CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") | ||
set(CPACK_SOURCE_PACKAGE_FILE_NAME | ||
"${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") | ||
set(CPACK_SOURCE_GENERATOR "TBZ2") | ||
set(CPACK_GENERATOR "TBZ2") | ||
#set(CPACK_GENERATOR "DEB") | ||
#set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Timothy Brown") | ||
|
||
include(CPack) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Copyright 2017, NOAA, UCAR/NCAR CU/CIRES | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
|
Oops, something went wrong.