Skip to content

Commit b51fc3d

Browse files
Merge pull request #1 from gismo/precice_v0.0
Initial commit
2 parents 942e0eb + faaec93 commit b51fc3d

File tree

16 files changed

+2237
-0
lines changed

16 files changed

+2237
-0
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13+
cancel-in-progress: true
14+
env:
15+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
16+
BUILD_TYPE: RelWithDebInfo
17+
18+
jobs:
19+
build:
20+
runs-on: "${{ matrix.os }}"
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
os: [windows-latest, macos-latest, ubuntu-latest]
25+
steps:
26+
- uses: actions/checkout@master
27+
with:
28+
repository: gismo/gismo
29+
ref: stable
30+
path: ./gismo
31+
32+
- uses: actions/checkout@master
33+
with:
34+
path: ./gismo/optional/${{ github.event.repository.name }}
35+
#token: ${{ secrets.GH_PAT }}
36+
37+
- name: "Run for ${{ matrix.os }}"
38+
shell: bash
39+
working-directory: ${{runner.workspace}}
40+
run: ctest -S ${{ github.event.repository.name }}/gismo/cmake/ctest_script.cmake -D CTEST_BUILD_NAME="${{ github.event.repository.name }}_actions_$GITHUB_RUN_NUMBER" -D CTEST_SITE="${{ matrix.os }}_[actions]" -D CMAKE_ARGS="-DCMAKE_BUILD_TYPE=$BUILD_TYPE;-DCMAKE_CXX_STANDARD=11;-DGISMO_WITH_XDEBUG=ON;-DGISMO_BUILD_UNITTESTS=ON" -D GISMO_OPTIONAL="${{ github.event.repository.name }}" -Q

.gitignore

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Prerequisites
2+
*.d
3+
4+
# Compiled Object files
5+
*.slo
6+
*.lo
7+
*.o
8+
*.obj
9+
10+
# Precompiled Headers
11+
*.gch
12+
*.pch
13+
14+
# Compiled Dynamic libraries
15+
*.so
16+
*.dylib
17+
*.dll
18+
19+
# Fortran module files
20+
*.mod
21+
*.smod
22+
23+
# Compiled Static libraries
24+
*.lai
25+
*.la
26+
*.a
27+
*.lib
28+
29+
# Executables
30+
*.exe
31+
*.out
32+
*.app
33+
34+
# Paraview
35+
*.vts
36+
*.vtp
37+
*.vtu
38+
*.pvd
39+
*.vtk
40+
41+
42+
# Log files
43+
*.log
44+
examples/*.txt
45+
*.csv
46+
*.err
47+
48+
# Include cmake files
49+
!CMakeLists.txt
50+
!examples/CMakeLists.txt

CMakeLists.txt

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
######################################################################
2+
## CMakeLists.txt --- gsPreCICE
3+
## This file is part of the G+Smo library.
4+
##
5+
######################################################################
6+
if(POLICY CMP0076)# CMake 3.13
7+
cmake_policy(SET CMP0076 NEW)
8+
endif()
9+
10+
11+
## gsPreCICE module
12+
project(gsPreCICE)
13+
14+
# Apply G+Smo config
15+
include(gsConfig)
16+
17+
# Collect file names
18+
aux_header_directory(${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_NAME}_HEADERS)
19+
#aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_NAME}_SOURCES)
20+
#aux_tmpl_header_directory(${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_NAME}_HPPFILES)
21+
22+
# Apply same configuration as G+Smo
23+
include(gsConfig)
24+
25+
find_package(precice REQUIRED CONFIG)
26+
27+
add_library(${PROJECT_NAME} INTERFACE)
28+
# target_sources(${PROJECT_NAME} INTERFACE $<BUILD_INTERFACE:${${PROJECT_NAME}_HEADERS}>)
29+
# target_link_libraries(${PROJECT_NAME} PRIVATE precice::precice)
30+
set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES precice::precice)
31+
32+
target_include_directories(${PROJECT_NAME} INTERFACE
33+
$<INSTALL_INTERFACE:gismo/gsPreCICE>
34+
)
35+
36+
add_dependencies(${PROJECT_NAME} precice)
37+
38+
set(gismo_LINKER ${gismo_LINKER} ${PROJECT_NAME}
39+
CACHE INTERNAL "${PROJECT_NAME} extra linker objects")
40+
41+
install(DIRECTORY ${PROJECT_SOURCE_DIR}
42+
DESTINATION include/gismo
43+
FILES_MATCHING PATTERN "gsPreCICE/*.h")
44+
45+
46+
# add filedata folder
47+
add_definitions(-DELAST_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/filedata/")
48+
49+
50+
# add unittests
51+
aux_gs_cpp_directory(${PROJECT_SOURCE_DIR}/unittests unittests_SRCS)
52+
set(gismo_UNITTESTS ${gismo_UNITTESTS} ${unittests_SRCS}
53+
CACHE INTERNAL "gismo list of unittests")
54+
55+
# Look for CMakeLists.txt in examples
56+
add_subdirectory(examples)

0 commit comments

Comments
 (0)