diff options
author | Adrian Kummerlaender | 2018-10-10 22:46:12 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2018-10-10 22:46:12 +0200 |
commit | e720bbf4ead889a607a11513c4a64cc3ccb3e691 (patch) | |
tree | 3937d2b92e3b06c00dcd183cd71fdba65a9017e5 /CMakeLists.txt | |
parent | b4a61621fc1d2d6350c8f700ee3196950e476000 (diff) | |
download | boltzbub-e720bbf4ead889a607a11513c4a64cc3ccb3e691.tar boltzbub-e720bbf4ead889a607a11513c4a64cc3ccb3e691.tar.gz boltzbub-e720bbf4ead889a607a11513c4a64cc3ccb3e691.tar.bz2 boltzbub-e720bbf4ead889a607a11513c4a64cc3ccb3e691.tar.lz boltzbub-e720bbf4ead889a607a11513c4a64cc3ccb3e691.tar.xz boltzbub-e720bbf4ead889a607a11513c4a64cc3ccb3e691.tar.zst boltzbub-e720bbf4ead889a607a11513c4a64cc3ccb3e691.zip |
Improve build instructions
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 43 |
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 +) |