-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- README now contains some useful documentation - added examples to CI
- Loading branch information
1 parent
8be088b
commit 78aac9d
Showing
16 changed files
with
227 additions
and
25 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
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
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
2 changes: 1 addition & 1 deletion
2
examples/hello-world/CMakeLists.txt → examples/01-hello-world/CMakeLists.txt
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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
examples/advection-2D/CMakeLists.txt → examples/02-advection-2D/CMakeLists.txt
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
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
examples/karman-2D/CMakeLists.txt → examples/03-karman-2D/CMakeLists.txt
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,19 @@ | ||
# Note: this file is only intended to be used by the CI infrastructure, to make sure all examples build correctly | ||
# If you are a human reader, please consider the individual examples, including their respective CMakeLists.txt files | ||
|
||
cmake_minimum_required( VERSION 3.24 ) | ||
project( L3STER-examples-all ) | ||
add_subdirectory( .. L3STER-bin ) | ||
file( GLOB subdirs ${CMAKE_CURRENT_SOURCE_DIR}/* ) | ||
foreach ( dir IN LISTS subdirs ) | ||
if ( IS_DIRECTORY "${dir}" ) | ||
cmake_path( GET dir STEM name ) | ||
if ( "${name}" STREQUAL build ) | ||
continue() | ||
endif () | ||
message( STATUS "Found example: ${name}" ) | ||
file( GLOB src "${dir}/*.cpp" ) | ||
add_executable( ${name} ${src} ) | ||
target_link_libraries( ${name} L3STER ) | ||
endif () | ||
endforeach () |
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,13 @@ | ||
#!/bin/bash | ||
|
||
. /spack/share/spack/setup-env.sh | ||
spack env activate build-env | ||
|
||
cd examples || exit 1 | ||
mkdir -p build | ||
cd build || exit 1 | ||
cmake \ | ||
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \ | ||
-DCMAKE_CXX_COMPILER=mpic++ \ | ||
.. || exit 1 | ||
cmake --build . -- -j "$(grep -c ^processor /proc/cpuinfo)" || exit 1 |
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
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