================ @@ -291,10 +291,13 @@ option(LIBCXX_HAS_EXTERNAL_THREAD_API "Build libc++ with an externalized threading API. This option may only be set to ON when LIBCXX_ENABLE_THREADS=ON." OFF) -if (LIBCXX_ENABLE_THREADS) - set(LIBCXX_PSTL_CPU_BACKEND "std_thread" CACHE STRING "Which PSTL CPU backend to use") -else() - set(LIBCXX_PSTL_CPU_BACKEND "serial" CACHE STRING "Which PSTL CPU backend to use") +set(LIBCXX_PSTL_BACKEND "openmp" CACHE INTERNAL "Which PSTL backend to use") +if (LIBCXX_PSTL_BACKEND STREQUAL "") + if (LIBCXX_ENABLE_THREADS) + set(LIBCXX_PSTL_BACKEND "std-thread") + else() + set(LIBCXX_PSTL_BACKEND "serial") + endif() ---------------- ldionne wrote:
I think I would do something like: ``` if (LIBCXX_ENABLE_THREADS) set(LIBCXX_PSTL_BACKEND_DEFAULT "std-thread") else() set(LIBCXX_PSTL_BACKEND_DEFAULT "serial") endif() set(LIBCXX_PSTL_BACKEND "${LIBCXX_PSTL_BACKEND_DEFAULT}" CACHE STRING "Select the PSTL backend to use. Valid values are serial, std-thread, ...., openmp. Default: ${LIBCXX_PSTL_BACKEND_DEFAULT}") ``` https://github.com/llvm/llvm-project/pull/66968 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits