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

Replace std::experimental with std::, add gnuplot to CI packages, bump patch #30

Merged
merged 6 commits into from
May 31, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/run-tests-archlinux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ RUN pacman -S --noconfirm \
curl \
fmt \
git \
gnuplot \
llvm \
llvm-libs \
ninja \
Expand Down
1 change: 1 addition & 0 deletions .github/actions/run-tests-ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ RUN apt install -y \
cmake \
curl \
git \
gnuplot-nox \
libboost-all-dev \
libclang-dev \
libfmt-dev \
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.25)
project(ctbench VERSION 1.3.2)
project(ctbench VERSION 1.3.3)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

Expand Down
2 changes: 1 addition & 1 deletion cmake/docs.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Documentation options
set(DOXYGEN_EXTRACT_ALL YES)
set(DOXYGEN_GENERATE_TREEVIEW YES)
set(DOXYGEN_EXCLUDE_PATTERNS */build/* */tests/* */build-docs/* paper.md)
set(DOXYGEN_EXCLUDE_PATTERNS */build/* */tests/* */build-docs/* */example/* paper.md)
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE ${CMAKE_SOURCE_DIR}/readme.md)
set(DOXYGEN_EXAMPLE_PATH ${CMAKE_SOURCE_DIR})
set(DOXYGEN_DOT_TRANSPARENT YES)
Expand Down
7 changes: 2 additions & 5 deletions grapher/include/grapher/utils/error.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <cstdint>
#include <cstdlib>
#include <experimental/source_location>
#include <source_location>
#include <string_view>

Expand Down Expand Up @@ -31,8 +30,7 @@ inline std::string to_string(error_level_t error_level) {
/// Prints a warning
inline void warn(std::string_view explain,
error_level_t error_level = warning_v,
std::experimental::source_location loc =
std::experimental::source_location::current()) {
std::source_location loc = std::source_location::current()) {
llvm::errs() << fmt::format(
"[{}] {}:{}:{} ({}) - {}\n", to_string(error_level), loc.file_name(),
loc.line(), loc.column(), loc.function_name(), explain);
Expand All @@ -43,8 +41,7 @@ inline void warn(std::string_view explain,
/// Condition value is then returned (useful for warnings).
inline bool check(bool condition, std::string_view explain,
error_level_t error_level = error_v, int err_code = -1,
std::experimental::source_location loc =
std::experimental::source_location::current()) {
std::source_location loc = std::source_location::current()) {
if (!condition) {
warn(explain, error_level, loc);
if (error_level == error_v) {
Expand Down
8 changes: 3 additions & 5 deletions grapher/include/grapher/utils/json.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <experimental/source_location>
#include <optional>
#include <source_location>
#include <string>
#include <type_traits>

Expand Down Expand Up @@ -40,8 +40,7 @@ field_loc_to_string(grapher::json_t::json_pointer const &json_ptr) {
template <typename LocType>
inline grapher::json_t::const_reference
get_as_json(grapher::json_t const &object, LocType const &field_location,
const std::experimental::source_location loc =
std::experimental::source_location::current()) {
const std::source_location loc = std::source_location::current()) {
std::string const field_location_str = field_loc_to_string(field_location);

check(object.contains(field_location),
Expand All @@ -55,8 +54,7 @@ get_as_json(grapher::json_t const &object, LocType const &field_location,
template <typename ReferenceType, typename LocType>
inline ReferenceType
get_as_ref(grapher::json_t const &object, LocType const &field_location,
const std::experimental::source_location loc =
std::experimental::source_location::current()) {
const std::source_location loc = std::source_location::current()) {

using ValueType = std::decay_t<ReferenceType>;

Expand Down