From ae170a2832f6a03b9afad1b1beaae6fca148fc4b Mon Sep 17 00:00:00 2001 From: Frederik Hennig <frederik.hennig@fau.de> Date: Wed, 18 Dec 2024 14:38:32 +0100 Subject: [PATCH] refactor examples structure --- CMakeLists.txt | 6 ------ examples/CMakeLists.txt | 8 ++++++++ examples/PoiseuilleChannel/CMakeLists.txt | 0 examples/PoiseuilleChannel/LbmAlgorithms.py | 0 examples/PoiseuilleChannel/PoiseuilleChannel.cpp | 3 +++ 5 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 examples/PoiseuilleChannel/CMakeLists.txt create mode 100644 examples/PoiseuilleChannel/LbmAlgorithms.py create mode 100644 examples/PoiseuilleChannel/PoiseuilleChannel.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index f02698b..5b1c017 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,6 @@ cmake_minimum_required( VERSION 3.24 ) project ( sfg-walberla ) -option( SFG_WALBERLA_BUILD_EXAMPLES "Build sfg-walberla's examples" OFF ) - list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ) find_package( PystencilsSfg REQUIRED ) @@ -19,7 +17,3 @@ target_link_libraries( INTERFACE core stencil domain_decomposition blockforest field ) - -if( ${SFG_WALBERLA_BUILD_EXAMPLES} ) - add_subdirectory( examples ) -endif() \ No newline at end of file diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 4b5db3b..dd2f833 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,3 +1,6 @@ +cmake_minimum_required( VERSION 3.24 ) +project( walberla-codegen-examples ) + include(FetchContent) FetchContent_Declare( @@ -6,3 +9,8 @@ FetchContent_Declare( ) FetchContent_MakeAvailable(walberla) + +add_subdirectory(${CMAKE_SOURCE_DIR}/.. ${CMAKE_BINARY_DIR}/sfg-walberla) + +add_subdirectory( PoiseuilleChannel ) + diff --git a/examples/PoiseuilleChannel/CMakeLists.txt b/examples/PoiseuilleChannel/CMakeLists.txt new file mode 100644 index 0000000..e69de29 diff --git a/examples/PoiseuilleChannel/LbmAlgorithms.py b/examples/PoiseuilleChannel/LbmAlgorithms.py new file mode 100644 index 0000000..e69de29 diff --git a/examples/PoiseuilleChannel/PoiseuilleChannel.cpp b/examples/PoiseuilleChannel/PoiseuilleChannel.cpp new file mode 100644 index 0000000..9b6bdc2 --- /dev/null +++ b/examples/PoiseuilleChannel/PoiseuilleChannel.cpp @@ -0,0 +1,3 @@ +int main(void) { + return 0; +} -- GitLab