diff --git a/CMakeLists.txt b/CMakeLists.txt index 73334d502..87a46f2dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.20) project(domain VERSION 0 LANGUAGES CXX C) @@ -415,7 +415,7 @@ set(kth_headers add_library(${PROJECT_NAME} ${MODE} ${kth_sources} ${kth_headers}) add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) -set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX CXX_STANDARD 20 CXX_STANDARD_REQUIRED TRUE) +set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX CXX_STANDARD 23 CXX_STANDARD_REQUIRED TRUE) if (ENABLE_POSITION_INDEPENDENT_CODE) set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/conanfile.py b/conanfile.py index 3d17e9c7e..89b698abc 100644 --- a/conanfile.py +++ b/conanfile.py @@ -2,12 +2,9 @@ # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -import os -from conan import ConanFile from conan.tools.build.cppstd import check_min_cppstd -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import copy #, apply_conandata_patches, export_conandata_patches, get, rm, rmdir -from kthbuild import option_on_off, march_conan_manip, pass_march_to_compiler +from conan.tools.cmake import CMake, CMakeDeps, cmake_layout +from kthbuild import option_on_off from kthbuild import KnuthConanFileV2 required_conan_version = ">=2.0" @@ -18,6 +15,7 @@ class KnuthDomainConan(KnuthConanFileV2): url = "https://github.com/k-nuth/domain" description = "Crypto Cross-Platform C++ Development Toolkit" settings = "os", "compiler", "build_type", "arch" + package_type = "library" options = {"shared": [True, False], "fPIC": [True, False], @@ -72,7 +70,7 @@ def requirements(self): def validate(self): KnuthConanFileV2.validate(self) if self.info.settings.compiler.cppstd: - check_min_cppstd(self, "20") + check_min_cppstd(self, "23") def config_options(self): KnuthConanFileV2.config_options(self) @@ -115,16 +113,9 @@ def build(self): cmake.test() # cmake.test(target="tests") - # def imports(self): - # self.copy("*.h", "", "include") - def package(self): cmake = CMake(self) cmake.install() - # rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - # rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - # rmdir(self, os.path.join(self.package_folder, "res")) - # rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): self.cpp_info.includedirs = ['include']