Skip to content

Commit

Permalink
Export compilation type (GridTools#1387)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasm91 authored and Lukas Mosimann committed Dec 10, 2019
1 parent 344f524 commit ea20e6f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions cmake/GridToolsConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ message(STATUS "GridTools version @GridTools_VERSION@ found at ${GRIDTOOLS_CONFI
include(CMakeFindDependencyMacro)
find_dependency(Boost @REQUIRED_BOOST_VERSION@)

if (@GT_USE_MPI@)
if(@GT_USE_MPI@)
find_dependency(MPI COMPONENTS CXX)
include("@PACKAGE_GRIDTOOLS_MODULE_PATH@/workaround_mpi.cmake")
_fix_mpi_flags()
endif()

if (@OPENMP_AVAILABLE@)
if(@OPENMP_AVAILABLE@)
find_dependency(OpenMP COMPONENTS CXX)
endif()

Expand All @@ -24,7 +24,11 @@ set(GRIDTOOLS_HAS_BACKEND_MC @GT_ENABLE_BACKEND_MC@)
set(GRIDTOOLS_HAS_BACKEND_X86 @GT_ENABLE_BACKEND_X86@)
set(GRIDTOOLS_HAS_BACKEND_NAIVE @GT_ENABLE_BACKEND_NAIVE@)

if (GRIDTOOLS_ENABLE_PERFORMANCE_METERS)
if(@CUDA_AVAILABLE@)
set(GRIDTOOLS_CUDA_COMPILATION_TYPE "@GT_CUDA_COMPILATION_TYPE@")
endif()

if(GRIDTOOLS_ENABLE_PERFORMANCE_METERS)
target_compile_definitions(GridTools::gridtools INTERFACE GT_ENABLE_METERS)
endif()

Expand Down
2 changes: 1 addition & 1 deletion cmake/flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ option(GT_GCL_ONLY "If on only library is build but not the examples and tests"
option(GT_TESTS_ICOSAHEDRAL_GRID "compile tests for icosahedral grids" OFF )

set(GT_CUDA_COMPILATION_TYPE "NVCC-CUDA" CACHE STRING "How to compile CUDA backend code")
set_property(CACHE PROPERTY STRINGS "NVCC-CUDA" "Clang-CUDA" "HIPCC-AMDGPU")
set_property(CACHE GT_CUDA_COMPILATION_TYPE PROPERTY STRINGS "NVCC-CUDA" "Clang-CUDA" "HIPCC-AMDGPU")
mark_as_advanced(GT_CUDA_COMPILATION_TYPE)

CMAKE_DEPENDENT_OPTION(
Expand Down

0 comments on commit ea20e6f

Please sign in to comment.