Skip to content

Commit 5065e78

Browse files
committedAug 13, 2019
[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
1 parent 58f03f2 commit 5065e78

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
 

‎pstl/CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ math(EXPR VERSION_PATCH "(${PARALLELSTL_VERSION_SOURCE} % 10)")
1616

1717
project(ParallelSTL VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH} LANGUAGES CXX)
1818

19-
set(PARALLELSTL_BACKEND "serial" CACHE STRING "Threading backend to use. Valid choices are 'serial' and 'tbb'. The default is 'serial'.")
19+
set(PSTL_PARALLEL_BACKEND "serial" CACHE STRING "Threading backend to use. Valid choices are 'serial' and 'tbb'. The default is 'serial'.")
2020

2121
if (NOT TBB_DIR)
2222
get_filename_component(PSTL_DIR_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
@@ -33,16 +33,16 @@ add_library(ParallelSTL INTERFACE)
3333
add_library(pstl::ParallelSTL ALIAS ParallelSTL)
3434
target_compile_features(ParallelSTL INTERFACE cxx_std_17)
3535

36-
if (PARALLELSTL_BACKEND STREQUAL "serial")
36+
if (PSTL_PARALLEL_BACKEND STREQUAL "serial")
3737
message(STATUS "Parallel STL uses the serial backend")
3838
set(_PSTL_PAR_BACKEND_SERIAL ON)
39-
elseif (PARALLELSTL_BACKEND STREQUAL "tbb")
39+
elseif (PSTL_PARALLEL_BACKEND STREQUAL "tbb")
4040
find_package(TBB 2018 REQUIRED tbb OPTIONAL_COMPONENTS tbbmalloc)
4141
message(STATUS "Parallel STL uses TBB ${TBB_VERSION} (interface version: ${TBB_INTERFACE_VERSION})")
4242
target_link_libraries(ParallelSTL INTERFACE TBB::tbb)
4343
set(_PSTL_PAR_BACKEND_TBB ON)
4444
else()
45-
message(FATAL_ERROR "Requested unknown Parallel STL backend '${PARALLELSTL_BACKEND}'.")
45+
message(FATAL_ERROR "Requested unknown Parallel STL backend '${PSTL_PARALLEL_BACKEND}'.")
4646
endif()
4747

4848
set(PSTL_GENERATED_HEADERS_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated_headers")

‎pstl/cmake/ParallelSTLConfig.cmake.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
include(CMakeFindDependencyMacro)
1010

11-
set(PARALLELSTL_BACKEND "@PARALLELSTL_BACKEND@")
11+
set(PSTL_PARALLEL_BACKEND "@PSTL_PARALLEL_BACKEND@")
1212

13-
if (PARALLELSTL_BACKEND STREQUAL "tbb")
13+
if (PSTL_PARALLEL_BACKEND STREQUAL "tbb")
1414
find_dependency(TBB REQUIRED tbb)
1515
endif()
1616

0 commit comments

Comments
 (0)
Please sign in to comment.