Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ include(ystdlib-helpers)
option(BUILD_SHARED_LIBS "Build using shared libraries." OFF)
option(ystdlib_BUILD_TESTING "Build the testing tree for ystdlib." ON)

# Require compiler versions that support the C++20 features necessary for compiling ystdlib
# Require compiler versions that support the C++17 features necessary for compiling ystdlib
# See also: https://en.cppreference.com/w/cpp/compiler_support/17
if("AppleClang" STREQUAL "${CMAKE_CXX_COMPILER_ID}")
set(ystdlib_CMAKE_CXX_COMPILER_MIN_VERSION "16")
set(ystdlib_CMAKE_CXX_COMPILER_MIN_VERSION "15")
elseif("Clang" STREQUAL "${CMAKE_CXX_COMPILER_ID}")
set(ystdlib_CMAKE_CXX_COMPILER_MIN_VERSION "16")
set(ystdlib_CMAKE_CXX_COMPILER_MIN_VERSION "15")
elseif("GNU" STREQUAL "${CMAKE_CXX_COMPILER_ID}")
set(ystdlib_CMAKE_CXX_COMPILER_MIN_VERSION "11")
else()
Expand Down Expand Up @@ -74,7 +75,7 @@ if(ystdlib_ENABLE_TESTS)
set(UNIFIED_UNIT_TEST_TARGET "unit-test-all")
add_executable(${UNIFIED_UNIT_TEST_TARGET})
target_link_libraries(${UNIFIED_UNIT_TEST_TARGET} PRIVATE Catch2::Catch2WithMain)
target_compile_features(${UNIFIED_UNIT_TEST_TARGET} PRIVATE cxx_std_20)
target_compile_features(${UNIFIED_UNIT_TEST_TARGET} PRIVATE cxx_std_17)
set_property(
TARGET
${UNIFIED_UNIT_TEST_TARGET}
Expand Down
10 changes: 5 additions & 5 deletions cmake/ystdlib-helpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function(check_if_header_only SOURCE_LIST IS_HEADER_ONLY NON_HEADER_FILE)
set(${NON_HEADER_FILE} "" PARENT_SCOPE)
endfunction()

# Adds a C++20 library in the subdirectory NAME with the target NAME and alias NAMESPACE::NAME.
# Adds a C++17 library in the subdirectory NAME with the target NAME and alias NAMESPACE::NAME.
# Libraries with multiple levels of namespace nesting are currently not supported.
#
# @param {string} NAME
Expand Down Expand Up @@ -87,7 +87,7 @@ function(add_cpp_library)
add_library(${ARG_NAME} INTERFACE)
target_link_libraries(${ARG_NAME} INTERFACE ${ARG_PUBLIC_LINK_LIBRARIES})

target_compile_features(${ARG_NAME} INTERFACE cxx_std_20)
target_compile_features(${ARG_NAME} INTERFACE cxx_std_17)
else()
add_library(${ARG_NAME})
target_sources(${ARG_NAME} PRIVATE ${ARG_PRIVATE_SOURCES})
Expand All @@ -98,7 +98,7 @@ function(add_cpp_library)
PRIVATE
${ARG_PRIVATE_LINK_LIBRARIES}
)
target_compile_features(${ARG_NAME} PUBLIC cxx_std_20)
target_compile_features(${ARG_NAME} PUBLIC cxx_std_17)
endif()

add_library(${ALIAS_TARGET_NAME} ALIAS ${ARG_NAME})
Expand All @@ -114,7 +114,7 @@ function(add_cpp_library)
)
endfunction()

# Adds a C++ 20 test executable named `unit-test-NAME` that will be built with `SOURCES` and linked
# Adds a C++ 17 test executable named `unit-test-NAME` that will be built with `SOURCES` and linked
Comment thread
Bill-hbrhbr marked this conversation as resolved.
Outdated
# with `LINK_LIBRARIES`, in addition to Catch2.
#
# @param {string} NAME
Expand Down Expand Up @@ -153,7 +153,7 @@ function(add_catch2_tests)
${ARG_LINK_LIBRARIES}
Catch2::Catch2WithMain
)
target_compile_features(${UNIT_TEST_TARGET} PRIVATE cxx_std_20)
target_compile_features(${UNIT_TEST_TARGET} PRIVATE cxx_std_17)
set_property(
TARGET
${UNIT_TEST_TARGET}
Expand Down
2 changes: 0 additions & 2 deletions src/ystdlib/error_handling/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ add_cpp_library(
NAMESPACE ystdlib
PUBLIC_HEADERS
ErrorCode.hpp
TraceableException.hpp
Result.hpp
utils.hpp
PUBLIC_LINK_LIBRARIES
Expand All @@ -30,7 +29,6 @@ if(ystdlib_ENABLE_TESTS)
SOURCES
test/test_ErrorCode.cpp
test/test_Result.cpp
test/test_TraceableException.cpp
test/types.cpp
UNIFIED_TEST_TARGET "${UNIFIED_UNIT_TEST_TARGET}"
)
Expand Down
78 changes: 0 additions & 78 deletions src/ystdlib/error_handling/TraceableException.hpp

This file was deleted.

67 changes: 0 additions & 67 deletions src/ystdlib/error_handling/test/test_TraceableException.cpp

This file was deleted.