From 0994c6a9d3efc03e7779e0fe15db93641e4a9860 Mon Sep 17 00:00:00 2001 From: isidorostsa Date: Sun, 25 Aug 2024 19:02:59 +0300 Subject: [PATCH] Disable by default --- cmake/HPX_SetupStdexec.cmake | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cmake/HPX_SetupStdexec.cmake b/cmake/HPX_SetupStdexec.cmake index 3d7b87618ec..b52a114a7a8 100644 --- a/cmake/HPX_SetupStdexec.cmake +++ b/cmake/HPX_SetupStdexec.cmake @@ -4,16 +4,16 @@ # Distributed under the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -if(HPX_WITH_CXX_STANDARD GREATER_EQUAL 20 - AND HPX_WITH_CXX20_STD_IDENTITY - AND NOT MSVC -) - set(HPX_WITH_STDEXEC - ON - CACHE BOOL "Enabled by default for C++20" FORCE - ) -elseif(HPX_WITH_STDEXEC) - hpx_error("HPX_WITH_STDEXEC Requires C++20 or later and std::identity.") +if(HPX_WITH_STDEXEC) + if(HPX_WITH_CXX_STANDARD LESS 20) + hpx_error("HPX_WITH_STDEXEC Requires C++20 or later.") + endif() + if(NOT HPX_WITH_CXX20_STD_IDENTITY) + hpx_error("HPX_WITH_STDEXEC Requires std::identity.") + endif() + if(MSVC) + hpx_error("HPX_WITH_STDEXEC is not available on MSVC.") + endif() endif() if(STDEXEC_ROOT AND NOT Stdexec_ROOT)