forked from trilinos/Trilinos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modernize for newer CMake and compilers (trilinos#8498)
This now builds without errors with Clang 10.0. (There was a build error before this update.) * Require CMake 3.17.1 which is the same minimum now required by Trilinos * Updated the documentation to use Markdown and use raw CMake and no do-cmake script * Deleted unneccasary do-cmake script * Deleted usage of a 'Trilinos_PREFIX' var and just use built-in CMake var CMAKE_PREFIX_PATH directly as documented in CMake documentation for 'find_package()' * Turn off warning from Kokkos about not suupporting C++ extensions * Fix build error with source code
- Loading branch information
1 parent
a34ba7b
commit 542f171
Showing
6 changed files
with
72 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Example of building against install Trilinos with CMake | ||
|
||
``` | ||
****************************************************************** | ||
*** WARNING: THIS CODE IS NOT AUTOMATICALLY TESTED IN TRILINOS *** | ||
*** BECAUSE IT REQUIRES AN INSTALLED TRILINOS *** | ||
****************************************************************** | ||
``` | ||
|
||
This is a small demonstration of how to build an application code using CMake | ||
against an installation of Trilinos. This example also demonstrates how to | ||
use CTest. | ||
|
||
To run this example, do the following steps. | ||
|
||
1. Configure Trilinos to be installed: | ||
|
||
``` | ||
$ cd <any-base-dir>/ | ||
$ mkdir <tril-build-dir> | ||
$ cd <tril-build-dir>/ | ||
$ cmake \ | ||
-D CMAKE_INSTALL_PREFIX=<install-prefix> \ | ||
-D Trilinos_ENABLE_Teuchos=ON \ | ||
-D Trilinos_ENABLE_Epetra=ON \ | ||
[other options] \ | ||
<trilinos-src> | ||
``` | ||
|
||
NOTE: Must enable at least the Trilinos packages Teuchos and Epetra in order | ||
to build this example. But in a real case, enable and install any packages | ||
needed by the application. | ||
|
||
2. Build and install Trilinos: | ||
|
||
``` | ||
$ make -j4 install | ||
`` | ||
This will put a file under `<install-prefix>/` called `TrilinosConfig.cmake`. | ||
3. Configure the example project: | ||
``` | ||
$ cd <any--base-dir>/ | ||
$ mkdir <app-build-dir> | ||
$ cd <app-build-dir>/ | ||
$ cmake \ | ||
CMAKE_PREFIX_PATH=<install-prefix> \ | ||
<trilinos-src>/demos/buildAgainstTrilinos | ||
``` | ||
4. Build the application | ||
``` | ||
$ make -j4 | ||
``` | ||
5. Run the application tests: | ||
``` | ||
$ ctest -j4 | ||
``` | ||
Look into comments in the `CMakeLists.txt` files for more info. | ||
Send questions to trilinos-framework@software.sandia.gov. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters