Skip to content

Commit

Permalink
Enable post-processing of config of compilers (TriBITSPub#207, trilin…
Browse files Browse the repository at this point in the history
…os/Trilinos#1400)

Enable including a project-level file:

  cmake/ProjectCompilerPostConfig.cmake

for adding additional flags, or defining other variables.  Motivated by better
Kokkos/Trilinos integration (see trilinos/Trilinos#1400).
  • Loading branch information
kruger authored and bartlettroscoe committed Nov 30, 2017
1 parent b6406c6 commit 6fa3d69
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tribits/core/package_arch/TribitsGlobalMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1808,6 +1808,18 @@ MACRO(TRIBITS_SETUP_ENV)
ENABLE_LANGUAGE(Fortran)
ENDIF()

# Do some project-specific tweaks for compiler options, etc.
SET(PROJECT_COMPILER_CONFIG_FILE
# Can be used for things like Kokkos.
"${${PROJECT_NAME}_SOURCE_DIR}/cmake/ProjectCompilerPostConfig.cmake"
CACHE FILEPATH
"Allow for project-specific compiler settings."
)
IF (EXISTS "${PROJECT_COMPILER_CONFIG_FILE}")
TRIBITS_TRACE_FILE_PROCESSING(PROJECT INCLUDE "${PROJECT_COMPILER_CONFIG_FILE}")
INCLUDE("${PROJECT_COMPILER_CONFIG_FILE}")
ENDIF()

# Set up for strong compiler warnings and warnings as errors

INCLUDE(TribitsSetupBasicCompileLinkFlags)
Expand Down

0 comments on commit 6fa3d69

Please sign in to comment.