diff --git a/Common/3dParty/boost/boost.pri b/Common/3dParty/boost/boost.pri index 7a0278cea4..7d6f30de2d 100644 --- a/Common/3dParty/boost/boost.pri +++ b/Common/3dParty/boost/boost.pri @@ -4,6 +4,7 @@ CORE_BOOST_LIBS = $$PWD/build/$$CORE_BUILDS_PLATFORM_PREFIX/lib core_ios:CONFIG += disable_enum_constexpr_conversion core_android:CONFIG += disable_enum_constexpr_conversion core_mac:CONFIG += disable_enum_constexpr_conversion +core_linux_clang:CONFIG += disable_enum_constexpr_conversion core_android { INCLUDEPATH += $$PWD/build/android/include diff --git a/Common/base.pri b/Common/base.pri index e8dc81b132..8e240dfcf5 100644 --- a/Common/base.pri +++ b/Common/base.pri @@ -109,6 +109,31 @@ win32:!contains(QMAKE_TARGET.arch, x86_64): { CONFIG += core_win_32 } +linux-clang-libc++ { + CONFIG += core_linux + CONFIG += core_linux_64 + CONFIG += core_linux_clang + message("linux-64-clang-libc++") +} +linux-clang-libc++-32 { + CONFIG += core_linux + CONFIG += core_linux_32 + CONFIG += core_linux_clang + message("linux-32-clang-libc++") +} +linux-clang { + CONFIG += core_linux + CONFIG += core_linux_64 + CONFIG += core_linux_clang + message("linux-64-clang") +} +linux-clang-32 { + CONFIG += core_linux + CONFIG += core_linux_32 + CONFIG += core_linux_clang + message("linux-32-clang") +} + linux-g++ { CONFIG += core_linux linux-g++:contains(QMAKE_HOST.arch, x86_64): { @@ -196,6 +221,10 @@ core_mac { } } +core_linux_clang { + QMAKE_CFLAGS += -Wno-implicit-function-declaration +} + # PREFIXES core_windows { CONFIG -= debug_and_release debug_and_release_target @@ -416,6 +445,12 @@ message($$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX) # COMPILER CONFIG += c++11 +#CONFIG += enable_cpp_17 +enable_cpp_17 { + CONFIG += c++1z + DEFINES += _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION +} + !core_windows { QMAKE_CXXFLAGS += -Wno-register QMAKE_CFLAGS += -Wno-register @@ -423,7 +458,11 @@ CONFIG += c++11 core_linux { core_static_link_libstd { - QMAKE_LFLAGS += -static-libstdc++ -static-libgcc + !core_linux_clang { + QMAKE_LFLAGS += -static-libstdc++ -static-libgcc + } else { + # TODO: add libc++abi? + } message(core_static_link_libstd) } plugin { diff --git a/DesktopEditor/graphics/pro/raster.pri b/DesktopEditor/graphics/pro/raster.pri index f5e54810fc..28d4b2d2d8 100644 --- a/DesktopEditor/graphics/pro/raster.pri +++ b/DesktopEditor/graphics/pro/raster.pri @@ -19,6 +19,10 @@ core_linux { QMAKE_CXXFLAGS += -Wno-narrowing } +core_linux_clang { + QMAKE_CFLAGS += -Wno-incompatible-function-pointer-types +} + core_mac { DEFINES += HAVE_UNISTD_H HAVE_FCNTL_H } diff --git a/DesktopEditor/raster/Metafile/Common/MetaFileTypes.h b/DesktopEditor/raster/Metafile/Common/MetaFileTypes.h index 09ff44864a..e3ec2d110b 100644 --- a/DesktopEditor/raster/Metafile/Common/MetaFileTypes.h +++ b/DesktopEditor/raster/Metafile/Common/MetaFileTypes.h @@ -34,6 +34,7 @@ #include #include +#include #include "../../../common/StringExt.h" #ifndef BYTE