Skip to content

Commit

Permalink
Update to C++17 in build-ref doc
Browse files Browse the repository at this point in the history
Commit:

  eac85c3 "Make C++17 the default"
  Author: Samuel Browne <[email protected]>
  Date:   Tue Dec 6 14:48:42 2022 -0700

updated the min C++ version from C++14 to C++17 but did not update the build
ref documentation for this minimum version.

This commit updates the build ref documentation minimum C++ version from C++14
to C++17 and updateds the example for using a newer C++ standard to C++20.
  • Loading branch information
bartlettroscoe committed May 22, 2024
1 parent 17a60ec commit b0395cd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions doc/build_ref/TrilinosBuildReferenceTemplate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -189,26 +189,26 @@ To see more documentation for each of these options, run a configure with
Setting the C++ language standard for Trilinos
----------------------------------------------

Trilinos currently supports building with the C++14 language standard as
Trilinos currently supports building with the C++17 language standard as
supported by a wide range of C++ compilers. In addition, the library targets
imported from the installed ``<Package>Config.cmake`` files (also pulled in
through ``TrilinosConfig.cmake``) will automatically require downstream CMake
projects turn on C++14 or later standard support in the compiler options
projects turn on C++17 or later standard support in the compiler options
(using the CMake ``INTERFACE_COMPILE_FEATURES`` properties of the Trilinos
library targets). Building Trilinos with C++11 or lower C++ language
library targets). Building Trilinos with C++14 or lower C++ language
standards is not supported.

However, to try building Trilinos with a higher C++ language standard (with a
supporting compiler), set the CMake cache variable ``CMAKE_CXX_STANDARD`` to
an appropriate value. For example, to try building Trilinos with C++17 turned
an appropriate value. For example, to try building Trilinos with C++20 turned
on, configure with::

-D CMAKE_CXX_STANDARD:STRING=17
-D CMAKE_CXX_STANDARD:STRING=20

As mentioned above, that will also result in all downstream C++ software built
CMake to be built with C++17 compiler options turned on as well.
CMake to be built with C++20 compiler options turned on as well.

However, Trilinos is currently only rigorously tested with C++14 compiler
However, Trilinos is currently only rigorously tested with C++17 compiler
options so trying to build and use with a higher language standard may not
give satisfactory results.

Expand Down

0 comments on commit b0395cd

Please sign in to comment.