Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

adj for blt and mpi opts #224

Merged
merged 1 commit into from
Aug 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 3 additions & 18 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,27 +88,12 @@ if(POLICY CMP0104)
cmake_policy(SET CMP0104 OLD)
endif()

################################
# Set BLT Options
################################

# don't use BLT's all warnings feature
set(ENABLE_ALL_WARNINGS OFF CACHE INTERNAL "")

################################
# Init BLT
################################
if (NOT BLT_CXX_STD)
set(BLT_CXX_STD "c++14" CACHE STRING "")
endif()

# if BLT_SOURCE_DIR is not set - use "blt" as default
if(NOT BLT_SOURCE_DIR)
set(BLT_SOURCE_DIR "blt")
endif()

# init blt using BLT_SOURCE_DIR
include(${BLT_SOURCE_DIR}/SetupBLT.cmake)
# This also includes
# our BLT defaults
include(cmake/SetupBLT.cmake)

################################
# Basic CMake Setup
Expand Down
73 changes: 73 additions & 0 deletions src/cmake/SetupBLT.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Copyright (c) Lawrence Livermore National Security, LLC and other VTK-h
# Project developers. See top-level LICENSE AND COPYRIGHT files for dates and
# other details. No copyright assignment is required to contribute to VTK-h.

################################################################
# don't use BLT's all warnings feature
################################################################
set(ENABLE_ALL_WARNINGS OFF CACHE BOOL "")

################################################################
# if BLT_SOURCE_DIR is not set - use "blt" as default
################################################################
if(NOT BLT_SOURCE_DIR)
set(BLT_SOURCE_DIR "blt")
endif()

################################################################
# if not set, prefer c++11 lang standard
################################################################
if(NOT BLT_CXX_STD)
set(BLT_CXX_STD "c++11" CACHE STRING "")
endif()

################################################################
# if not set, prefer folder grouped targets
################################################################
if(NOT ENABLE_FOLDERS)
set(ENABLE_FOLDERS TRUE CACHE STRING "")
endif()


################################################################
# init blt using BLT_SOURCE_DIR
################################################################
include(${BLT_SOURCE_DIR}/SetupBLT.cmake)

if(ENABLE_MPI)
# on some platforms (mostly cray systems) folks skip mpi
# detection in BLT by setting ENABLE_FIND_MPI = OFF
# in these cases, we need to set FOUND_MPI = TRUE,
# since the rest of our cmake logic to include MPI uses FOUND_MPI
if(NOT ENABLE_FIND_MPI)
set(FOUND_MPI ON CACHE BOOL "")
endif()
endif()

################################################################
# apply folders to a few ungrouped blt targets
################################################################

###############################################
# group main blt docs targets into docs folder
###############################################
blt_set_target_folder( TARGET docs FOLDER docs)

if(TARGET sphinx_docs)
blt_set_target_folder( TARGET sphinx_docs FOLDER docs)
endif()

if(TARGET doxygen_docs)
blt_set_target_folder( TARGET doxygen_docs FOLDER docs)
endif()

####################################################
# group top level blt health checks into blt folder
####################################################
if(TARGET check)
blt_set_target_folder( TARGET check FOLDER blt)
endif()

if(TARGET style)
blt_set_target_folder( TARGET style FOLDER blt)
endif()