Example CMake project #786
Replies: 2 comments
-
I managed to set up a minimal example. I will insert the CMakeFile here and edit it from time to time. If you have ideas to make it better, let us discuss it. The idea is to create a robust solution that will hopefully help others as well. This is a CMake project with a single source file main.cpp, using t8code compiled with VTK and MPI support. cmake_minimum_required(VERSION 3.12.0)
project(project VERSION 0.1.0 LANGUAGES C CXX)
# If t8code was build with MPI support and linked with VTK
find_package(MPI REQUIRED)
find_package(VTK REQUIRED)
include_directories($ENV{T8_INCLUDE})
link_directories($ENV{T8_LIB})
add_executable(project main.cpp)
target_link_libraries(project MPI::MPI_C)
target_link_libraries(project sc p4est t8) Remarks:
|
Beta Was this translation helpful? Give feedback.
-
https://github.com/DLR-AMR/png2mesh/blob/main/CMakeLists.txt |
Beta Was this translation helpful? Give feedback.
-
Hi,
If any of you have a CMake-based C++ application that uses t8code, could you please share the CMakeLists.txt file?
Beta Was this translation helpful? Give feedback.
All reactions