From 5065e7817393d9acf2689d3f666a1c375238a7e2 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 13 Aug 2019 11:50:26 +0000 Subject: [PATCH] [pstl] Rename PARALLELSTL_BACKEND to PSTL_PARALLEL_BACKEND It makes more sense to name configuration options as PSTL_XXX. Also, I'm naming it PSTL_PARALLEL_BACKEND because we might introduce the ability to customize the vectorization backend, in which case PSTL_BACKEND would become ambiguous. llvm-svn: 368672 --- pstl/CMakeLists.txt | 8 ++++---- pstl/cmake/ParallelSTLConfig.cmake.in | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pstl/CMakeLists.txt b/pstl/CMakeLists.txt index dd024c7..62451b2 100644 --- a/pstl/CMakeLists.txt +++ b/pstl/CMakeLists.txt @@ -16,7 +16,7 @@ math(EXPR VERSION_PATCH "(${PARALLELSTL_VERSION_SOURCE} % 10)") project(ParallelSTL VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH} LANGUAGES CXX) -set(PARALLELSTL_BACKEND "serial" CACHE STRING "Threading backend to use. Valid choices are 'serial' and 'tbb'. The default is 'serial'.") +set(PSTL_PARALLEL_BACKEND "serial" CACHE STRING "Threading backend to use. Valid choices are 'serial' and 'tbb'. The default is 'serial'.") if (NOT TBB_DIR) get_filename_component(PSTL_DIR_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME) @@ -33,16 +33,16 @@ add_library(ParallelSTL INTERFACE) add_library(pstl::ParallelSTL ALIAS ParallelSTL) target_compile_features(ParallelSTL INTERFACE cxx_std_17) -if (PARALLELSTL_BACKEND STREQUAL "serial") +if (PSTL_PARALLEL_BACKEND STREQUAL "serial") message(STATUS "Parallel STL uses the serial backend") set(_PSTL_PAR_BACKEND_SERIAL ON) -elseif (PARALLELSTL_BACKEND STREQUAL "tbb") +elseif (PSTL_PARALLEL_BACKEND STREQUAL "tbb") find_package(TBB 2018 REQUIRED tbb OPTIONAL_COMPONENTS tbbmalloc) message(STATUS "Parallel STL uses TBB ${TBB_VERSION} (interface version: ${TBB_INTERFACE_VERSION})") target_link_libraries(ParallelSTL INTERFACE TBB::tbb) set(_PSTL_PAR_BACKEND_TBB ON) else() - message(FATAL_ERROR "Requested unknown Parallel STL backend '${PARALLELSTL_BACKEND}'.") + message(FATAL_ERROR "Requested unknown Parallel STL backend '${PSTL_PARALLEL_BACKEND}'.") endif() set(PSTL_GENERATED_HEADERS_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated_headers") diff --git a/pstl/cmake/ParallelSTLConfig.cmake.in b/pstl/cmake/ParallelSTLConfig.cmake.in index 516c812..445ebaf 100644 --- a/pstl/cmake/ParallelSTLConfig.cmake.in +++ b/pstl/cmake/ParallelSTLConfig.cmake.in @@ -8,9 +8,9 @@ include(CMakeFindDependencyMacro) -set(PARALLELSTL_BACKEND "@PARALLELSTL_BACKEND@") +set(PSTL_PARALLEL_BACKEND "@PSTL_PARALLEL_BACKEND@") -if (PARALLELSTL_BACKEND STREQUAL "tbb") +if (PSTL_PARALLEL_BACKEND STREQUAL "tbb") find_dependency(TBB REQUIRED tbb) endif() -- 2.7.4