Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

gcc-13 and qt5 build fixes #316

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ set(SCAP_WORKBENCH_VERSION_PATCH "1")
set(SCAP_WORKBENCH_VERSION "${SCAP_WORKBENCH_VERSION_MAJOR}.${SCAP_WORKBENCH_VERSION_MINOR}.${SCAP_WORKBENCH_VERSION_PATCH}")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_VERBOSE_MAKEFILE ON)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)

if(CMAKE_CXX_COMPILER_ID STREQUAL Clang)
set(CLANG_DEFAULT_CXX_STDLIB libc++)
set(CLANG_DEFAULT_RTLIB compiler-rt)
endif()

include(GNUInstallDirs)

set(CMAKE_AUTOMOC ON)
Expand Down Expand Up @@ -148,7 +160,7 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" AND ${CMAKE_CXX_COMPILER_VERSION} VE
endif()

if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -Wno-c++20-compat")
endif()

include_directories(${SCAP_WORKBENCH_INCLUDE_DIRS})
Expand Down
2 changes: 1 addition & 1 deletion src/OscapCapabilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void OscapCapabilities::parse(const QString& mmv)
if (lines.size() < 1)
return; // TODO: Throw exception?

#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
const QStringList firstLine = lines[0].split(' ', Qt::SkipEmptyParts);
#else
const QStringList firstLine = lines[0].split(' ', QString::SkipEmptyParts);
Expand Down
2 changes: 1 addition & 1 deletion src/RPMOpenHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ RPMOpenHelper::RPMOpenHelper(const QString& path)
static QRegExp tailoringRE("^\\.\\/usr\\/share\\/xml\\/scap\\/[^\\/]+\\/tailoring-xccdf\\.xml+$");
static QRegExp inputRE("^\\.\\/usr\\/share\\/xml\\/scap\\/[^\\/]+\\/[^\\/]+\\-(xccdf|ds)\\.xml+$");

#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
QStringList lines = proc.getStdErrContents().split('\n', Qt::SkipEmptyParts);
#else
QStringList lines = proc.getStdErrContents().split('\n', QString::SkipEmptyParts);
Expand Down
Loading