diff options
| -rw-r--r-- | .conan/profiles/gnu | 4 | ||||
| -rw-r--r-- | .conan/profiles/std | 4 | ||||
| -rw-r--r-- | .github/FUNDING.yml | 1 | ||||
| -rw-r--r-- | .vscode/c_cpp_properties.json | 16 | ||||
| -rw-r--r-- | .vscode/settings.json | 8 | ||||
| -rw-r--r-- | CMakeLists.txt (renamed from source/CMakeLists.txt) | 2 | ||||
| -rw-r--r-- | CMakePresets.json | 30 | ||||
| -rw-r--r-- | conanfile.py | 65 | ||||
| -rw-r--r-- | doc/.gitignore (renamed from source/doc/.gitignore) | 0 | ||||
| -rw-r--r-- | doc/CMakeLists.txt (renamed from source/doc/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | doc/requirements.txt (renamed from source/doc/requirements.txt) | 0 | ||||
| -rw-r--r-- | doc/src/conf.py (renamed from source/doc/src/conf.py) | 0 | ||||
| -rw-r--r-- | doc/src/index.rst (renamed from source/doc/src/index.rst) | 0 | ||||
| -rw-r--r-- | examples/CMakeLists.txt (renamed from source/examples/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | examples/src/basic_usage.cpp (renamed from source/examples/src/basic_usage.cpp) | 0 | ||||
| -rw-r--r-- | examples/src/basic_usage_with_read.cpp (renamed from source/examples/src/basic_usage_with_read.cpp) | 0 | ||||
| -rw-r--r-- | examples/src/basic_usage_with_show.cpp (renamed from source/examples/src/basic_usage_with_show.cpp) | 0 | ||||
| -rw-r--r-- | lib/CMakeLists.txt (renamed from source/lib/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | lib/include/newtype/newtype.hpp (renamed from source/lib/include/newtype/newtype.hpp) | 0 | ||||
| -rw-r--r-- | test_package/.gitignore | 1 | ||||
| -rw-r--r-- | test_package/CMakeLists.txt | 13 | ||||
| -rw-r--r-- | test_package/conanfile.py | 21 | ||||
| -rw-r--r-- | test_package/main.cpp | 11 | ||||
| -rw-r--r-- | tests/CMakeLists.txt (renamed from source/tests/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | tests/src/arithmetic.cpp (renamed from source/tests/src/arithmetic.cpp) | 0 | ||||
| -rw-r--r-- | tests/src/constructors.cpp (renamed from source/tests/src/constructors.cpp) | 0 | ||||
| -rw-r--r-- | tests/src/conversion.cpp (renamed from source/tests/src/conversion.cpp) | 0 | ||||
| -rw-r--r-- | tests/src/derivation_clause.cpp (renamed from source/tests/src/derivation_clause.cpp) | 0 | ||||
| -rw-r--r-- | tests/src/equality_comparison.cpp (renamed from source/tests/src/equality_comparison.cpp) | 0 | ||||
| -rw-r--r-- | tests/src/hash.cpp (renamed from source/tests/src/hash.cpp) | 0 | ||||
| -rw-r--r-- | tests/src/io_operators.cpp (renamed from source/tests/src/io_operators.cpp) | 0 | ||||
| -rw-r--r-- | tests/src/iterable.cpp (renamed from source/tests/src/iterable.cpp) | 0 | ||||
| -rw-r--r-- | tests/src/relational_operators.cpp (renamed from source/tests/src/relational_operators.cpp) | 0 | ||||
| -rw-r--r-- | tests/src/threeway_comparison.cpp (renamed from source/tests/src/threeway_comparison.cpp) | 0 |
34 files changed, 34 insertions, 142 deletions
diff --git a/.conan/profiles/gnu b/.conan/profiles/gnu deleted file mode 100644 index eb91651..0000000 --- a/.conan/profiles/gnu +++ /dev/null @@ -1,4 +0,0 @@ -include(default) - -[settings] -compiler.cppstd=gnu20
\ No newline at end of file diff --git a/.conan/profiles/std b/.conan/profiles/std deleted file mode 100644 index dedc2a6..0000000 --- a/.conan/profiles/std +++ /dev/null @@ -1,4 +0,0 @@ -include(default) - -[settings] -compiler.cppstd=20
\ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 77f52dd..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: fmorgner diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json deleted file mode 100644 index 2091cd3..0000000 --- a/.vscode/c_cpp_properties.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "configurations": [ - { - "name": "Linux", - "includePath": [ - "${workspaceFolder}/source/lib/include" - ], - "defines": [], - "compilerPath": "/usr/bin/g++", - "cppStandard": "c++20", - "intelliSenseMode": "gcc-x64", - "configurationProvider": "ms-vscode.cmake-tools" - } - ], - "version": 4 -}
\ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 72ff434..f9b4fe7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,20 +2,18 @@ // CMake Configuration "cmake.configureOnOpen": true, "cmake.useCMakePresets": "always", - "cmake.sourceDirectory": "${workspaceFolder}/source", // C++ Configuration "[cpp]": { "editor.formatOnSave": true }, "C_Cpp.autoAddFileAssociations": false, - "C_Cpp.intelliSenseEngine": "default", - "C_Cpp.errorSquiggles": "enabled", - "C_Cpp.autocomplete": "default", + "C_Cpp.intelliSenseEngine": "disabled", + "C_Cpp.errorSquiggles": "disabled", + "C_Cpp.autocomplete": "disabled", // RST Configuration "[python]": { "editor.defaultFormatter": "ms-python.black-formatter" }, - "esbonio.sphinx.confDir": "${workspaceFolder}/doc/src" } diff --git a/source/CMakeLists.txt b/CMakeLists.txt index 984e085..36b5b62 100644 --- a/source/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,4 +16,4 @@ option(BUILD_EXAMPLES "Build the library examples" OFF) add_subdirectory("doc") add_subdirectory("examples") add_subdirectory("lib") -add_subdirectory("tests")
\ No newline at end of file +#add_subdirectory("tests")
\ No newline at end of file diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000..da73733 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,30 @@ +{ + "version": 6, + "cmakeMinimumRequired": { + "major": 3, + "minor": 25, + "patch": 0 + }, + "configurePresets": [ + { + "name": "default", + "generator": "Ninja Multi-Config", + "binaryDir": "${sourceDir}/build", + "cacheVariables": { + "CMAKE_CONFIGURATION_TYPES": "Debug;MinSizeRel" + } + } + ], + "buildPresets": [ + { + "name": "debug", + "configurePreset": "default", + "configuration": "Debug" + }, + { + "name": "release", + "configurePreset": "default", + "configuration": "MinSizeRel" + } + ] +}
\ No newline at end of file diff --git a/conanfile.py b/conanfile.py deleted file mode 100644 index 222ac72..0000000 --- a/conanfile.py +++ /dev/null @@ -1,65 +0,0 @@ -from conan import ConanFile -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.build import check_min_cppstd - - -class NewtypeConan(ConanFile): - name = "newtype" - version = "2.0.0" - license = "BSD-3-Clause" - description = "A library of types and functions to create strong type aliases" - url = "https://github.com/fmorgner/newtype" - - settings = ("os", "arch", "compiler", "build_type") - - scm = { - "type": "git", - "url": "auto", - "revision": "auto" - } - - generators = [ - "CMakeDeps" - ] - - exports_sources = [ - "source/*", - "test_package/*", - "LICENSE", - ] - - def build(self): - cmake = CMake(self) - cmake.configure() - if not self.conf.get("tools.build:skip_test", default=False): - cmake.build() - cmake.test() - - def build_requirements(self): - self.tool_requires("cmake/[>3.25]") - self.tool_requires("ninja/[>1.11]") - self.test_requires("catch2/[>3.3]") - - def generate(self): - toolchain = CMakeToolchain(self, generator="Ninja Multi-Config") - toolchain.variables["CMAKE_EXPORT_COMPILE_COMMANDS"] = True - toolchain.variables["PROJECT_VERSION"] = self.version - toolchain.variables["PROJECT_DESCRIPTION"] = self.description - toolchain.generate() - - def layout(self): - cmake_layout(self, generator="Ninja Multi-Config", src_folder="source") - - def package(self): - cmake = CMake(self) - cmake.install() - - def package_id(self): - self.info.clear() - - def package_info(self): - self.cpp_info.bindirs = [] - self.cpp_info.libdirs = [] - - def validate(self): - check_min_cppstd(self, 20) diff --git a/source/doc/.gitignore b/doc/.gitignore index ee826c1..ee826c1 100644 --- a/source/doc/.gitignore +++ b/doc/.gitignore diff --git a/source/doc/CMakeLists.txt b/doc/CMakeLists.txt index 7a9e27d..7a9e27d 100644 --- a/source/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt diff --git a/source/doc/requirements.txt b/doc/requirements.txt index 47b0805..47b0805 100644 --- a/source/doc/requirements.txt +++ b/doc/requirements.txt diff --git a/source/doc/src/conf.py b/doc/src/conf.py index a6e65de..a6e65de 100644 --- a/source/doc/src/conf.py +++ b/doc/src/conf.py diff --git a/source/doc/src/index.rst b/doc/src/index.rst index 88925aa..88925aa 100644 --- a/source/doc/src/index.rst +++ b/doc/src/index.rst diff --git a/source/examples/CMakeLists.txt b/examples/CMakeLists.txt index 73d961e..73d961e 100644 --- a/source/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt diff --git a/source/examples/src/basic_usage.cpp b/examples/src/basic_usage.cpp index 35d1d2c..35d1d2c 100644 --- a/source/examples/src/basic_usage.cpp +++ b/examples/src/basic_usage.cpp diff --git a/source/examples/src/basic_usage_with_read.cpp b/examples/src/basic_usage_with_read.cpp index 531a8e3..531a8e3 100644 --- a/source/examples/src/basic_usage_with_read.cpp +++ b/examples/src/basic_usage_with_read.cpp diff --git a/source/examples/src/basic_usage_with_show.cpp b/examples/src/basic_usage_with_show.cpp index 9e4d985..9e4d985 100644 --- a/source/examples/src/basic_usage_with_show.cpp +++ b/examples/src/basic_usage_with_show.cpp diff --git a/source/lib/CMakeLists.txt b/lib/CMakeLists.txt index 0219803..0219803 100644 --- a/source/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt diff --git a/source/lib/include/newtype/newtype.hpp b/lib/include/newtype/newtype.hpp index fecaf2c..fecaf2c 100644 --- a/source/lib/include/newtype/newtype.hpp +++ b/lib/include/newtype/newtype.hpp diff --git a/test_package/.gitignore b/test_package/.gitignore deleted file mode 100644 index 42afabf..0000000 --- a/test_package/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build
\ No newline at end of file diff --git a/test_package/CMakeLists.txt b/test_package/CMakeLists.txt deleted file mode 100644 index f511e49..0000000 --- a/test_package/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -cmake_minimum_required(VERSION "3.25") - -project("TestPackage" CXX) - -find_package("newtype") - -add_executable("${PROJECT_NAME}" - "main.cpp" -) - -target_link_libraries("${PROJECT_NAME}" PRIVATE - "newtype::newtype" -) diff --git a/test_package/conanfile.py b/test_package/conanfile.py deleted file mode 100644 index ae8c241..0000000 --- a/test_package/conanfile.py +++ /dev/null @@ -1,21 +0,0 @@ -import os -from conan import ConanFile -from conan.tools.cmake import CMake, cmake_layout - - -class NewtypeTestConan(ConanFile): - settings = ("os", "arch", "compiler", "build_type") - requires = "newtype/[~2.0]" - generators = "CMakeDeps", "CMakeToolchain" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - os.chdir(self.build_folder) - self.run(".%sTestPackage" % os.sep) - - def layout(self): - cmake_layout(self, generator="Ninja Multi-Config") diff --git a/test_package/main.cpp b/test_package/main.cpp deleted file mode 100644 index f0c2bea..0000000 --- a/test_package/main.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include <newtype/newtype.hpp> - -#include <iostream> - -using Integer = nt::new_type<int, struct IntegerTag, deriving(nt::Show)>; - -auto main() -> int -{ - auto n = Integer{42}; - std::cout << "n == " << n.decay() << '\n'; -}
\ No newline at end of file diff --git a/source/tests/CMakeLists.txt b/tests/CMakeLists.txt index 47b8331..47b8331 100644 --- a/source/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt diff --git a/source/tests/src/arithmetic.cpp b/tests/src/arithmetic.cpp index 30c243f..30c243f 100644 --- a/source/tests/src/arithmetic.cpp +++ b/tests/src/arithmetic.cpp diff --git a/source/tests/src/constructors.cpp b/tests/src/constructors.cpp index b866f2e..b866f2e 100644 --- a/source/tests/src/constructors.cpp +++ b/tests/src/constructors.cpp diff --git a/source/tests/src/conversion.cpp b/tests/src/conversion.cpp index e7ce51c..e7ce51c 100644 --- a/source/tests/src/conversion.cpp +++ b/tests/src/conversion.cpp diff --git a/source/tests/src/derivation_clause.cpp b/tests/src/derivation_clause.cpp index 78bd3d4..78bd3d4 100644 --- a/source/tests/src/derivation_clause.cpp +++ b/tests/src/derivation_clause.cpp diff --git a/source/tests/src/equality_comparison.cpp b/tests/src/equality_comparison.cpp index e0be7f9..e0be7f9 100644 --- a/source/tests/src/equality_comparison.cpp +++ b/tests/src/equality_comparison.cpp diff --git a/source/tests/src/hash.cpp b/tests/src/hash.cpp index 94f252f..94f252f 100644 --- a/source/tests/src/hash.cpp +++ b/tests/src/hash.cpp diff --git a/source/tests/src/io_operators.cpp b/tests/src/io_operators.cpp index f7f8f29..f7f8f29 100644 --- a/source/tests/src/io_operators.cpp +++ b/tests/src/io_operators.cpp diff --git a/source/tests/src/iterable.cpp b/tests/src/iterable.cpp index 85b7edc..85b7edc 100644 --- a/source/tests/src/iterable.cpp +++ b/tests/src/iterable.cpp diff --git a/source/tests/src/relational_operators.cpp b/tests/src/relational_operators.cpp index e852957..e852957 100644 --- a/source/tests/src/relational_operators.cpp +++ b/tests/src/relational_operators.cpp diff --git a/source/tests/src/threeway_comparison.cpp b/tests/src/threeway_comparison.cpp index 45a36af..45a36af 100644 --- a/source/tests/src/threeway_comparison.cpp +++ b/tests/src/threeway_comparison.cpp |
