Skip to content

Commit c0720dd

Browse files
committed
Default relacy only fofr GNU
1 parent 5a875d4 commit c0720dd

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ else()
9191
set(STDEXEC_BUILD_TESTS_DEFAULT OFF)
9292
endif()
9393
option(STDEXEC_BUILD_TESTS "Build stdexec tests" ${STDEXEC_BUILD_TESTS_DEFAULT})
94-
option(STDEXEC_BUILD_RELACY_TESTS "Build stdexec relacy tests" ${STDEXEC_BUILD_TESTS_DEFAULT})
9594

9695
# STDEXEC_BUILD_TESTS is used solely to configure CTest's BUILD_TESTING option,
9796
# which is CMake's preferred option for enabling testing when using CTest.
@@ -151,6 +150,14 @@ else()
151150
set(stdexec_compiler_frontend ${CMAKE_CXX_COMPILER_ID})
152151
endif()
153152

153+
# Build relacy tests by default only for GNU compiler and if tests are enabled
154+
if(${STDEXEC_BUILD_TESTS} AND stdexec_compiler_frontend STREQUAL "GNU")
155+
set(STDEXEC_BUILD_RELACY_TESTS_DEFAULT ON)
156+
else()
157+
set(STDEXEC_BUILD_RELACY_TESTS_DEFAULT OFF)
158+
endif()
159+
option(STDEXEC_BUILD_RELACY_TESTS "Build stdexec relacy tests" ${STDEXEC_BUILD_RELACY_TESTS_DEFAULT})
160+
154161
set(stdexec_export_targets)
155162

156163
# Define the main library

0 commit comments

Comments
 (0)