Skip to content

Commit

Permalink
Merge pull request #248 from climbfuji/fix_travis_standalone_build_20…
Browse files Browse the repository at this point in the history
…200111

master: fix travis build
  • Loading branch information
climbfuji authored Jan 24, 2020
2 parents 7ab419e + 55e861f commit e772109
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ string(TIMESTAMP YEAR "%Y")
# Set the CMake module path
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

#------------------------------------------------------------------------------
# Static or dynamic CCPP, default is dynamic; standalone build can only be dynamic
option(STATIC "Build a static CCPP" OFF)
if (PROJECT STREQUAL "Unknown" AND STATIC)
message(FATAL_ERROR "ccpp-framework standalone build can only be dynamic")
endif(PROJECT STREQUAL "Unknown" AND STATIC)

#------------------------------------------------------------------------------
# Set OpenMP flags for C/C++/Fortran
if (OPENMP)
Expand Down
10 changes: 5 additions & 5 deletions schemes/check/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
'../../../../../schemes/check/check_test.f90' : [ 'test' ],
}

# Default build dir, relative to current working directory,
# if not specified as command-line argument
DEFAULT_BUILD_DIR = '.'

# Auto-generated makefile/cmakefile snippets that contain all schemes
SCHEMES_MAKEFILE = '/dev/null'
SCHEMES_CMAKEFILE = '/dev/null'
Expand Down Expand Up @@ -84,9 +88,5 @@
# Template code to generate include files #
###############################################################################

# Name of the CCPP data structure in the host model cap;
# in the case of FV3, this is a 2-dimensional array with
# the number of blocks as the first and the number of
# OpenMP threads as the second dimension; nb is the loop
# index for the current block, nt for the current thread
# Name of the CCPP data structure in the host model cap
CCPP_DATA_STRUCTURE = 'cdata'
8 changes: 5 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,11 @@ set(${PACKAGE}_LIB_DIRS

#------------------------------------------------------------------------------
# Add the tests (designed for DYNAMIC build only)
if(!STATIC)
add_subdirectory(tests)
endif(!STATIC)
if(STATIC)
message(STATUS "Skipping tests, defined for dynamic build only")
else(STATIC)
add_subdirectory(tests)
endif(STATIC)

#------------------------------------------------------------------------------
# Define the executable and what to link
Expand Down

0 comments on commit e772109

Please sign in to comment.