Skip to content

Commit

Permalink
cmake: remove logic for trying to enable -fconcepts as the `-fconce…
Browse files Browse the repository at this point in the history
…pts-ts` branch was broken and the flag is enabled by default in C++20 mode
  • Loading branch information
nmm0 committed Feb 14, 2025
1 parent ebfc8f5 commit 870f608
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,27 +81,6 @@ endif()

################################################################################

if(MDSPAN_ENABLE_CONCEPTS)
if(CMAKE_CXX_STANDARD GREATER_EQUAL 20)
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-fconcepts" COMPILER_SUPPORTS_FCONCEPTS)
if(COMPILER_SUPPORTS_FCONCEPTS)
message(STATUS "Using \"-fconcepts\" to enable concepts support")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fconcepts")
else()
check_cxx_compiler_flag("-fconcepts-ts" COMPILER_SUPPORTS_FCONCEPTS_TS)
if(COMPILER_SUPPORTS_FCONCEPTS)
message(STATUS "Using \"-fconcepts-ts\" to enable concepts support")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fconcepts-ts")
endif()
endif()
# Otherwise, it's possible that the compiler supports concepts without flags,
# but if it doesn't, they just won't be used, which is fine
endif()
endif()

################################################################################

if(MDSPAN_ENABLE_CUDA)
include(CheckLanguage)
check_language(CUDA)
Expand Down

0 comments on commit 870f608

Please sign in to comment.