A template repository for projects that link against t8code. The project is configured such that it will build as a new library. It includes testing with Googletest.
To set up this project with your custom project name:
./setup_project.sh your_project_nameor manually:
cmake -P configure_project.cmake -DPROJECT_NAME_LOWER=your_project_nameAfter running the setup script:
- All template files (.in) will be processed
- The generated files will have your project name
- You can then commit these as your project
Note: Currently this project relies on t8code's PR: DLR-AMR/t8code#2010, which is not yet merged.
After project setup, build with:
mkdir build && cd build
cmake ..
makeIf t8code, sc or p4est are not found by CMake, you can use:
cmake -DT8CODE_DIR=path/to/T8CODEConfig.cmake -DP4EST_DIR=path/to/P4ESTConfig.cmake -DSC_DIR=path/to/SCConfig.cmake ..We also recommend to use:
-DCMAKE_INSTALL_PREFIX=/path/to/install
-DCMAKE_INSTALL_LIBDIR=/path/to/installwhen you want to locally install this package.
To install, simply call:
make installThe basic CMake setting file. Note that src/ and test/ folders have their own additional CMake files.
A main program to show how to use and link against t8pie and how to set up t8code.
Contains the source and header files of the library.
src/t8pie_helloworld.cxx and .hxx define a very simple hello world function.
Contains tests.
Contains thirdparty libraries. This project ships with a copy of googletest-mpi which is compiled and linked to be used in tests. In future this copy could be replaced with using FetchContent in CMake (see also DLR-AMR/t8code#1984).