Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile QLever with C++20 #385

Merged
merged 7 commits into from
May 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "third_party/stxxl"]
path = third_party/stxxl
url = https://github.com/bingmann/stxxl
url = https://github.com/joka921/stxxl
[submodule "third_party/googletest"]
path = third_party/googletest
url = https://github.com/google/googletest.git
Expand Down
24 changes: 13 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ cmake_minimum_required(VERSION 2.8.4)
project(QLever C CXX)

# C/C++ Versions
set (CMAKE_C_STANDARD 11)
set (CMAKE_C_STANDARD_REQUIRED ON)
set (CMAKE_CXX_STANDARD 17)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Check compiler versions:
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# Check version. If empty, warn. If too old, error out:
if ("${CMAKE_CXX_COMPILER_VERSION}" STREQUAL "")
message(WARNING "GCC Compiler version is unknown, proceed at your own risk!")
elseif (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
message(FATAL_ERROR "GCC compiler version must be at least 4.8!")
endif()
endif()
# Check version. If empty, warn. If too old, error out:
if ("${CMAKE_CXX_COMPILER_VERSION}" STREQUAL "")
message(WARNING "GCC Compiler version is unknown, proceed at your own risk!")
elseif (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
message(FATAL_ERROR "GCC compiler version must be at least 4.8!")
endif ()
endif ()

## Build targets for address sanitizer
# AddressSanitize
Expand Down Expand Up @@ -118,7 +118,9 @@ endif()
# Disable GNU parallel as it prevents build on Ubuntu 14.04
set(USE_GNU_PARALLEL OFF CACHE BOOL "Don't use gnu parallel" FORCE)
set(USE_OPENMP OFF CACHE BOOL "Don't use OPENMP as default" FORCE)

add_subdirectory(third_party/stxxl)

# apply STXXL CXXFLAGS
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${STXXL_CXX_FLAGS}")
include_directories(SYSTEM ${STXXL_INCLUDE_DIRS})
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM ubuntu:18.04 as base
LABEL maintainer="Niklas Schnelle <schnelle@informatik.uni-freiburg.de>"
FROM ubuntu:20.10 as base
LABEL maintainer="Johannes Kalmbach <kalmbacj@informatik.uni-freiburg.de>"
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV LC_CTYPE C.UTF-8
Expand All @@ -11,6 +11,7 @@ COPY . /app/

# Check formatting with the .clang-format project style
WORKDIR /app/
ENV DEBIAN_FRONTEND=noninteractive
RUN misc/format-check.sh

WORKDIR /app/build/
Expand Down
6 changes: 3 additions & 3 deletions src/engine/RuntimeInformation.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class RuntimeInformation {
void writeToStream(std::ostream& out, size_t indent = 1) const {
using json = nlohmann::json;
out << indentStr(indent) << '\n';
out << indentStr(indent - 1) << u8"├─ " << _descriptor << '\n';
out << indentStr(indent - 1) << "├─ " << _descriptor << '\n';
out << indentStr(indent) << "result_size: " << _rows << " x " << _cols
<< '\n';
out << indentStr(indent)
Expand Down Expand Up @@ -83,7 +83,7 @@ class RuntimeInformation {
out << '\n';
}
if (_children.size()) {
out << indentStr(indent) << u8"┬\n";
out << indentStr(indent) << "┬\n";
for (const RuntimeInformation& child : _children) {
child.writeToStream(out, indent + 1);
}
Expand Down Expand Up @@ -156,7 +156,7 @@ class RuntimeInformation {
static std::string indentStr(size_t indent) {
std::string ind;
for (size_t i = 0; i < indent; i++) {
ind += u8"│ ";
ind += "│ ";
}
return ind;
}
Expand Down