Skip to content
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
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ option(
)

configure_file(
"${PROJECT_SOURCE_DIR}/include/beman/inplace_vector/config.hpp.in"
"${PROJECT_BINARY_DIR}/include/beman/inplace_vector/config.hpp"
"${PROJECT_SOURCE_DIR}/include/beman/inplace_vector/config_generated.hpp.in"
"${PROJECT_BINARY_DIR}/include/beman/inplace_vector/config_generated.hpp"
@ONLY
)

Expand Down
5 changes: 4 additions & 1 deletion include/beman/inplace_vector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ target_sources(
beman.inplace_vector
PUBLIC
FILE_SET HEADERS
FILES inplace_vector.hpp "${CMAKE_CURRENT_BINARY_DIR}/config.hpp"
FILES
inplace_vector.hpp
config.hpp
"${CMAKE_CURRENT_BINARY_DIR}/config_generated.hpp"
)
11 changes: 11 additions & 0 deletions include/beman/inplace_vector/config.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#ifndef BEMAN_INPLACE_VECTOR_CONFIG_HPP
#define BEMAN_INPLACE_VECTOR_CONFIG_HPP

#if !defined(__has_include) || \
__has_include(<beman/inplace_vector/config_generated.hpp>)
#include <beman/inplace_vector/config_generated.hpp>
#else
#define BEMAN_INPLACE_VECTOR_NO_EXCEPTIONS() 0
#endif

#endif
6 changes: 0 additions & 6 deletions include/beman/inplace_vector/config.hpp.in

This file was deleted.

6 changes: 6 additions & 0 deletions include/beman/inplace_vector/config_generated.hpp.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef BEMAN_INPLACE_VECTOR_CONFIG_GENERATED_HPP
#define BEMAN_INPLACE_VECTOR_CONFIG_GENERATED_HPP

#cmakedefine01 BEMAN_INPLACE_VECTOR_NO_EXCEPTIONS()

#endif
6 changes: 0 additions & 6 deletions include/beman/inplace_vector/inplace_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
#ifndef BEMAN_INPLACE_VECTOR_INPLACE_VECTOR_HPP
#define BEMAN_INPLACE_VECTOR_INPLACE_VECTOR_HPP

#if !defined(__has_include) || __has_include(<beman/inplace_vector/config.hpp>)
#include <beman/inplace_vector/config.hpp>
#endif

#include <algorithm> // for rotate...
#include <array>
Expand All @@ -24,10 +22,6 @@

#ifndef BEMAN_IV_THROW_OR_ABORT

#ifndef BEMAN_INPLACE_VECTOR_NO_EXCEPTIONS
#define BEMAN_INPLACE_VECTOR_NO_EXCEPTIONS() 0
#endif

#if BEMAN_INPLACE_VECTOR_NO_EXCEPTIONS()
#include <cstdlib> // for abort
#define BEMAN_IV_THROW_OR_ABORT(x) abort()
Expand Down