config.h support removed as it causes issues with compiler-explorer

This commit is contained in:
Mateusz Pusz
2019-09-10 18:59:23 +02:00
parent dfba6e8f85
commit 70a90b4ae0
3 changed files with 0 additions and 46 deletions

View File

@ -1,30 +0,0 @@
# The MIT License (MIT)
#
# Copyright (c) 2018 Mateusz Pusz
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
set(CMAKE_REQUIRED_FLAGS -std=c++2a)
include(CheckTypeSize)
set(CMAKE_EXTRA_INCLUDE_FILES type_traits)
check_type_size("std::type_identity<int>" UNITS_HAS_STD_TYPE_IDENTITY LANGUAGE CXX)
configure_file(../cmake/config.h.in include/units/bits/config.h)

View File

@ -34,9 +34,6 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
# include common tools and workarounds
include(common/cmake/tools)
# check availability of C++20 features
include(check_features)
# library definition
add_library(units INTERFACE)
#target_sources(units INTERFACE
@ -62,7 +59,6 @@ target_link_libraries(units
target_include_directories(units
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include>
)
target_compile_options(units

View File

@ -22,22 +22,10 @@
#pragma once
#include <units/bits/config.h>
#include <experimental/ranges/concepts>
namespace std {
#ifndef UNITS_HAS_STD_TYPE_IDENTITY
// type_identity
template<typename T>
struct type_identity { using type = T; };
template<typename T>
using type_identity_t = typename type_identity<T>::type;
#endif // UNITS_HAS_STD_TYPE_IDENTITY
// concepts
using experimental::ranges::same_as;
using experimental::ranges::derived_from;