Skip to content

Commit

Permalink
add project name to message
Browse files Browse the repository at this point in the history
  • Loading branch information
white238 committed Mar 5, 2024
1 parent fa3ad27 commit 403961b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 24 deletions.
10 changes: 6 additions & 4 deletions cmake/BLTSetupTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ else()
set(BLT_ENABLE_OPENMP ${ENABLE_OPENMP})
set(BLT_ENABLE_FIND_MPI ${ENABLE_FIND_MPI})
set(BLT_ENABLE_CLANG_CUDA ${ENABLE_CLANG_CUDA})

set(_current_project_name ${PROJECT_NAME})
endif()

# Detect if Fortran has been introduced.
Expand All @@ -57,7 +59,7 @@ endif()
# MPI
#------------------------------------
if (NOT TARGET mpi)
message(STATUS "MPI Support is ${BLT_ENABLE_MPI}")
message(STATUS "${_current_project_name} MPI support is ${BLT_ENABLE_MPI}")
if (BLT_ENABLE_MPI AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/thirdparty/BLTSetupMPI.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/thirdparty/BLTSetupMPI.cmake")
endif()
Expand All @@ -68,7 +70,7 @@ endif()
# OpenMP
#------------------------------------
if (NOT TARGET openmp)
message(STATUS "OpenMP Support is ${BLT_ENABLE_OPENMP}")
message(STATUS "${_current_project_name} OpenMP support is ${BLT_ENABLE_OPENMP}")
if (BLT_ENABLE_OPENMP AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/thirdparty/BLTSetupOpenMP.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/thirdparty/BLTSetupOpenMP.cmake")
endif()
Expand All @@ -79,7 +81,7 @@ endif()
# CUDA
#------------------------------------
if (NOT TARGET cuda)
message(STATUS "CUDA Support is ${BLT_ENABLE_CUDA}")
message(STATUS "${_current_project_name} CUDA support is ${BLT_ENABLE_CUDA}")
if (BLT_ENABLE_CUDA AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/thirdparty/BLTSetupCUDA.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/thirdparty/BLTSetupCUDA.cmake")
endif()
Expand All @@ -90,7 +92,7 @@ endif()
# HIP
#------------------------------------
if (NOT TARGET blt_hip)
message(STATUS "HIP Support is ${BLT_ENABLE_HIP}")
message(STATUS "${_current_project_name} HIP support is ${BLT_ENABLE_HIP}")
if (BLT_ENABLE_HIP AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/thirdparty/BLTSetupHIP.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/thirdparty/BLTSetupHIP.cmake")
endif()
Expand Down
26 changes: 6 additions & 20 deletions cmake/BLTThirdPartyConfigFlags.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,18 @@ set(BLT_ENABLE_HIP @ENABLE_HIP@)
set(BLT_ENABLE_MPI @ENABLE_MPI@)
set(BLT_ENABLE_OPENMP @ENABLE_OPENMP@)
set(BLT_ENABLE_FIND_MPI @ENABLE_FIND_MPI@)
set(BLT_ENABLE_CLANG_CUDA @ENABLE_CLANG_CUDA@)

foreach(_var BLT_ENABLE_CUDA BLT_ENABLE_HIP BLT_ENABLE_MPI BLT_ENABLE_OPENMP BLT_ENABLE_FIND_MPI)
if(NOT ${_var})
set(${_var} OFF)
endif()
endforeach()

# User configurable CUDA options needed by downstream. Normally, exporting
# these targets would pass these flags to downstream targets, but this
# must be done manually if targets aren't exported.
if ("@ENABLE_CLANG_CUDA@" AND NOT DEFINED ENABLE_CLANG_CUDA)
set(BLT_ENABLE_CLANG_CUDA "@ENABLE_CLANG_CUDA@")
# If the user specifies this variable, ignore the inherited flag.
elseif (DEFINED ENABLE_CLANG_CUDA)
set(BLT_ENABLE_CLANG_CUDA ${ENABLE_CLANG_CUDA})
endif()

if ("@BLT_CLANG_CUDA_ARCH@" AND NOT DEFINED BLT_CLANG_CUDA_ARCH)
if (NOT DEFINED BLT_CLANG_CUDA_ARCH)
set(BLT_CLANG_CUDA_ARCH "@BLT_CLANG_CUDA_ARCH@")
endif()

if ("@CUDA_TOOLKIT_ROOT_DIR@" AND NOT DEFINED CUDA_TOOLKIT_ROOT_DIR)
if (NOT DEFINED CUDA_TOOLKIT_ROOT_DIR)
set(CUDA_TOOLKIT_ROOT_DIR "@CUDA_TOOLKIT_ROOT_DIR@")
endif()

# User configurable HIP options needed by downstream
if ("@ROCM_PATH@" AND NOT DEFINED ROCM_PATH)
if (NOT DEFINED ROCM_PATH)
set(ROCM_PATH "@ROCM_PATH@")
endif()

set(_current_project_name @PROJECT_NAME@)

0 comments on commit 403961b

Please sign in to comment.