Replace cxx_thread_local check

This commit is contained in:
Cacodemon345 2023-08-14 17:07:05 +06:00 committed by Christoph Oelckers
parent 14a3cf8fc2
commit ce8753c6e1

View file

@ -278,10 +278,7 @@ endif()
# Check for thread_local keyword, it's optional at the moment
CHECK_CXX_SOURCE_COMPILES("thread_local int i; int main() { i = 0; }"
HAVE_THREAD_LOCAL)
if( NOT HAVE_THREAD_LOCAL )
if ( NOT (cxx_thread_local IN_LIST CMAKE_CXX_COMPILE_FEATURES) )
message( SEND_ERROR "C++ compiler doesn't support thread_local storage duration specifier" )
endif()