aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt43
1 files changed, 30 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e5cbd03..29ad827 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,31 +1,48 @@
cmake_minimum_required(VERSION 3.10)
-project(boltzbub)
+project(boltzbub LANGUAGES CXX)
-set(
- CMAKE_CXX_FLAGS
- "${CMAKE_CXX_FLAGS} -std=c++1z -W -Wall -Wextra -Winline -pedantic"
+add_library(
+ boltzbub
+ src/lbm.cc
+ src/fluid_buffer.cc
+ src/boundary_conditions.cc
)
-include_directories(
- src/
+target_compile_features(
+ boltzbub
+ PUBLIC
+ cxx_std_17
)
-set(
- BASE
- src/lbm.cc
- src/fluid_buffer.cc
- src/boundary_conditions.cc
+target_include_directories(
+ boltzbub
+ PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/src
+)
+
+target_link_libraries(
+ boltzbub
+ PRIVATE
+ stdc++fs
)
add_executable(
cavity2d
cavity2d.cc
- ${BASE}
+)
+
+target_link_libraries(
+ cavity2d
+ boltzbub
)
add_executable(
cavity2d_with_obstacles
cavity2d_with_obstacles.cc
- ${BASE}
src/box_obstacle.cc
)
+
+target_link_libraries(
+ cavity2d_with_obstacles
+ boltzbub
+)