Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/capgen_unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Build the framework
run: |
cmake -S. -B./build -DCCPP_FRAMEWORK_ENABLE_TESTS=ON
cmake -S. -B./build -DOPENMP=ON -DCCPP_FRAMEWORK_ENABLE_TESTS=ON
cd build
make

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# All compiled Python modules
*.pyc

# CMake build directory
build/
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
build/
build/

19 changes: 16 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,28 @@ include(cmake/ccpp_capgen.cmake)
set(PACKAGE "ccpp-framework")
string(TIMESTAMP YEAR "%Y")

option(OPENMP "Enable OpenMP support for the framework" OFF)
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
option(CCPP_FRAMEWORK_BUILD_DOCUMENTATION
"Create and install the HTML documentation (requires Doxygen)" OFF)
option(OPENMP "Enable OpenMP support for the framework" OFF)
option(CCPP_FRAMEWORK_ENABLE_TESTS "Enable building/running CCPP regression tests" OFF)
option(CCPP_FRAMEWORK_ENABLE_TESTS "Enable building/running CCPP regression tests" OFF)
option(CCPP_RUN_ADVECTION_TEST "Enable advection regression test" OFF)
option(CCPP_RUN_CAPGEN_TEST "Enable capgen regression test" OFF)
option(CCPP_RUN_DDT_HOST_TEST "Enable ddt host regression test" OFF)
option(CCPP_RUN_VAR_COMPATIBILITY_TEST "Enable variable compatibility regression test" OFF)
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)

message("")
message("OPENMP .............................. ${OPENMP}")
message("BUILD_SHARED_LIBS ................... ${BUILD_SHARED_LIBS}")
message("")
message("CCPP_FRAMEWORK_BUILD_DOCUMENTATION ...${CCPP_FRAMEWORK_BUILD_DOCUMENTATION}")
message("CCPP_FRAMEWORK_ENABLE_TESTS ......... ${CCPP_FRAMEWORK_ENABLE_TESTS}")
message("CCPP_RUN_ADVECTION_TEST ............. ${CCPP_RUN_ADVECTION_TEST}")
message("CCPP_RUN_CAPGEN_TEST ................ ${CCPP_RUN_CAPGEN_TEST}")
message("CCPP_RUN_DDT_HOST_TEST .............. ${CCPP_RUN_DDT_HOST_TEST}")
message("CCPP_RUN_VAR_COMPATIBILITY_TEST ..... ${CCPP_RUN_VAR_COMPATIBILITY_TEST}")
message("")

set(CCPP_VERBOSITY "0" CACHE STRING "Verbosity level of output (default: 0)")

# Warn user on conflicting test options
Expand Down
3 changes: 3 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_I
# Define the executable and what to link
add_library(ccpp_framework STATIC ${SOURCES_F90})
target_link_libraries(ccpp_framework PUBLIC MPI::MPI_Fortran)
if(OPENMP)
target_link_libraries(ccpp_framework PUBLIC OpenMP::OpenMP_Fortran)
endif()
set_target_properties(ccpp_framework PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR})
Expand Down