mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 09:46:02 -04:00
nullptr compatibility: special detection for clang
This commit is contained in:
parent
ae1703f1ce
commit
5ed4a1ab79
@ -34,7 +34,7 @@ else (MSVC)
|
||||
set(CPPLINT_ARG_OUTPUT "--output=eclipse")
|
||||
set(CPPCHECK_ARG_TEMPLATE "--template=gcc")
|
||||
# Useful compile flags and extra warnings
|
||||
add_compile_options(-fstack-protector -Wall -Wextra -Wpedantic -Wno-long-long -Wswitch-enum -Wshadow -Winline)
|
||||
add_compile_options(-fstack-protector -Wall -Wextra -Wpedantic -Wno-long-long -Wswitch-enum -Wshadow -Winline -Wno-c++0x-compat)
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
# GCC flags
|
||||
if (SQLITECPP_USE_GCOV AND CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
@ -30,7 +30,8 @@
|
||||
#define nullptr NULL
|
||||
#endif // nullptr
|
||||
#endif // _MSC_VER < 1600
|
||||
#else // _MSC_VER
|
||||
#elif defined(__clang__) && __has_feature(cxx_nullptr) // Clang 3.0+
|
||||
#else // GCC or older Clang
|
||||
#if (__cplusplus < 201103L) && !defined(__GXX_EXPERIMENTAL_CXX0X__) // before C++11 on GCC4.7 and Visual Studio 2010
|
||||
#ifndef HAVE_NULLPTR
|
||||
#define HAVE_NULLPTR ///< A macro to avoid double definition of nullptr
|
||||
|
Loading…
x
Reference in New Issue
Block a user