Skip to content

Commit bbbed05

Browse files
committed
#63: write end-to-end demo of burgers' eq
1 parent 36561ea commit bbbed05

File tree

4 files changed

+468
-0
lines changed

4 files changed

+468
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,6 @@ set(CMAKE_CXX_EXTENSIONS OFF)
6262

6363
enable_testing()
6464
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/end-to-end-roms)
65+
66+
# Build the standalone full tutorial (burgers example)
67+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/full-tutorial)

full-tutorial/CMakeLists.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
cmake_minimum_required(VERSION 3.18)
2+
3+
project(burgers_tutorial CXX)
4+
5+
# Ensure C++17 (root also enforces this, but keep local for safety)
6+
include(CheckCXXCompilerFlag)
7+
check_cxx_compiler_flag("-std=c++17" COMPILER_SUPPORT_CPP17)
8+
if(NOT COMPILER_SUPPORT_CPP17)
9+
message(FATAL_ERROR "Compiler does not support -std=c++17. This is required.")
10+
endif()
11+
set(CMAKE_CXX_STANDARD 17)
12+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
13+
set(CMAKE_CXX_EXTENSIONS OFF)
14+
15+
set(exename burgers)
16+
add_executable(${exename} ${CMAKE_CURRENT_SOURCE_DIR}/burgers.cpp)
17+
18+
# Pull in the headers
19+
target_include_directories(${exename} PRIVATE
20+
${CMAKE_CURRENT_SOURCE_DIR}/../tpls/eigen-3.4.0
21+
${CMAKE_CURRENT_SOURCE_DIR}/../tpls # pressio_cmake_config.h
22+
${CMAKE_CURRENT_SOURCE_DIR}/../tpls/pressio-rom/include
23+
${CMAKE_CURRENT_SOURCE_DIR}/../tpls/pressio-ops/include
24+
${CMAKE_CURRENT_SOURCE_DIR}/../tpls/pressio-log/include
25+
)

0 commit comments

Comments
 (0)