Skip to content

Commit

Permalink
Don't expect the UDL definition for GCC < 4.9
Browse files Browse the repository at this point in the history
The compile tests should expect the UDL to
be there on GCC only for version 4.9 and above.
  • Loading branch information
danakj authored Aug 25, 2023
1 parent a35c30e commit 4d654c0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/compile-error-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ set(CMAKE_REQUIRED_FLAGS )
if (NOT SUPPORTS_USER_DEFINED_LITERALS)
set (SUPPORTS_USER_DEFINED_LITERALS OFF)
endif ()
if (SUPPORTS_USER_DEFINED_LITERALS AND CMAKE_COMPILER_IS_GNUCXX)
# GCC before 4.9 is not supported for user-defined literals as it requires an
# invalid syntax in their definition.
set (SUPPORTS_USER_DEFINED_LITERALS
$<IF:$<$<VERSION_LESS:$<CXX_COMPILER_VERSION>,4.9.0>,OFF,ON>
endif()

# Make sure that compiler features detected in the header
# match the features detected in CMake.
Expand Down

0 comments on commit 4d654c0

Please sign in to comment.