CMake: Only test stl for c++ versions before 11

This commit is contained in:
Maarten Bent
2020-04-07 00:15:57 +02:00
parent 5c2d186132
commit 3c4c4ee273

View File

@@ -143,7 +143,7 @@ wx_check_c_source_compiles(
stdio.h
)
#TODO: wxNO_VARIADIC_MACROS
if(wxUSE_STL)
if(wxUSE_STL AND NOT wxHAS_CXX11)
wx_check_cxx_source_compiles("
std::vector<int> moo;
std::list<int> foo;
@@ -168,6 +168,12 @@ if(wxUSE_STL)
HAVE_STD_STRING_COMPARE
string
)
wx_check_cxx_source_compiles(
"std::wstring s;"
HAVE_STD_WSTRING
string
)
endif()
# Check for availability of GCC's atomic operations builtins.
@@ -584,13 +590,6 @@ check_include_file(w32api.h HAVE_W32API_H)
check_include_file(wchar.h HAVE_WCHAR_H)
check_include_file(wcstr.h HAVE_WCSTR_H)
wx_check_cxx_source_compiles(
"std::wstring s;"
HAVE_STD_WSTRING
string
)
if(wxUSE_DATETIME)
# check for timezone variable
# doesn't exist under Darwin / Mac OS X which uses tm_gmtoff instead