From 274b1d8542872861596701e69d2e6e211ac2814c Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Tue, 28 Mar 2023 10:06:08 -0400 Subject: [PATCH 01/29] Added v27.0.0, with Conan2 support --- .../ncbi-cxx-toolkit-public/all/conandata.yml | 4 + .../ncbi-cxx-toolkit-public/all/conanfile.py | 277 ++++++++++++++++++ .../all/dependencies/dependencies-27.0.yml | 229 +++++++++++++++ .../all/dependencies/requirements-27.0.yml | 28 ++ .../all/test_package/CMakeLists.txt | 7 + .../all/test_package/basic_sample.cpp | 100 +++++++ .../all/test_package/conanfile.py | 24 ++ .../all/test_v1_package/CMakeLists.txt | 8 + .../all/test_v1_package/conanfile.py | 19 ++ recipes/ncbi-cxx-toolkit-public/config.yml | 2 + 10 files changed, 698 insertions(+) create mode 100755 recipes/ncbi-cxx-toolkit-public/all/conandata.yml create mode 100755 recipes/ncbi-cxx-toolkit-public/all/conanfile.py create mode 100755 recipes/ncbi-cxx-toolkit-public/all/dependencies/dependencies-27.0.yml create mode 100755 recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml create mode 100755 recipes/ncbi-cxx-toolkit-public/all/test_package/CMakeLists.txt create mode 100755 recipes/ncbi-cxx-toolkit-public/all/test_package/basic_sample.cpp create mode 100755 recipes/ncbi-cxx-toolkit-public/all/test_package/conanfile.py create mode 100755 recipes/ncbi-cxx-toolkit-public/all/test_v1_package/CMakeLists.txt create mode 100755 recipes/ncbi-cxx-toolkit-public/all/test_v1_package/conanfile.py diff --git a/recipes/ncbi-cxx-toolkit-public/all/conandata.yml b/recipes/ncbi-cxx-toolkit-public/all/conandata.yml new file mode 100755 index 0000000000000..b3652db5f6a52 --- /dev/null +++ b/recipes/ncbi-cxx-toolkit-public/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "27.0.0": + url: "https://github.com/ncbi/ncbi-cxx-toolkit-public/archive/refs/tags/release-27.0.0.tar.gz" + sha256: "c8fb3f99c6fce4f170b381f3a7789c76a2ff1c23c094c9852e2e3de1fdc57277" diff --git a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py new file mode 100755 index 0000000000000..b6f8cf6216e26 --- /dev/null +++ b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py @@ -0,0 +1,277 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration, ConanException +from conan.tools.cmake import CMakeDeps, CMakeToolchain, CMake, cmake_layout +from conan import tools +import os +import yaml +required_conan_version = ">=1.53.0" + + +class NcbiCxxToolkit(ConanFile): + name = "ncbi-cxx-toolkit-public" + description = "NCBI C++ Toolkit -- a cross-platform application framework and a collection of libraries for working with biological data." + license = "CC0-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://ncbi.github.io/cxx-toolkit" + topics = ("ncbi", "biotechnology", "bioinformatics", "genbank", "gene", + "genome", "genetic", "sequence", "alignment", "blast", + "biological", "toolkit", "c++") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_projects": ["ANY"], + "with_targets": ["ANY"], + "with_components": ["ANY"] + } + default_options = { + "shared": False, + "fPIC": True, + "with_projects": "", + "with_targets": "", + "with_components": "" + } + short_paths = True + tk_dependencies = None + tk_requirements = None + tk_componenttargets = set() + + @property + def _min_cppstd(self): + return 17 + + @property + def _source_subfolder(self): + return "src" + + @property + def _dependencies_folder(self): + return "dependencies" + + @property + def _dependencies_filename(self): + return "dependencies-{}.{}.yml".format(tools.scm.Version(self.version).major, tools.scm.Version(self.version).minor) + + @property + def _requirements_filename(self): + return "requirements-{}.{}.yml".format(tools.scm.Version(self.version).major, tools.scm.Version(self.version).minor) + + @property + def _tk_dependencies(self): + if self.tk_dependencies is None: + dependencies_filepath = os.path.join(self.recipe_folder, self._dependencies_folder, self._dependencies_filename) + if not os.path.isfile(dependencies_filepath): + raise ConanException("Cannot find {}".format(dependencies_filepath)) + self.tk_dependencies = yaml.safe_load(open(dependencies_filepath)) + return self.tk_dependencies + + @property + def _tk_requirements(self): + if self.tk_requirements is None: + requirements_filepath = os.path.join(self.recipe_folder, self._dependencies_folder, self._requirements_filename) + if not os.path.isfile(requirements_filepath): + raise ConanException("Cannot find {}".format(requirements_filepath)) + self.tk_requirements = yaml.safe_load(open(requirements_filepath)) + return self.tk_requirements + + def _translate_req(self, key): + if "Boost" in key: + key = "Boost" + if key in self._tk_requirements["disabled"].keys(): + if self.settings.os in self._tk_requirements["disabled"][key]: + return None + if key in self._tk_requirements["requirements"].keys(): + return self._tk_requirements["requirements"][key] + return None + + def _parse_option(self, data): + _res = set() + if data != "": + _data = str(data) + _data = _data.replace(",", ";") + _data = _data.replace(" ", ";") + _res.update(_data.split(";")) + if "" in _res: + _res.remove("") + return _res + + def export(self): + tools.files.copy(self, self._dependencies_filename, + os.path.join(self.recipe_folder, self._dependencies_folder), + os.path.join(self.export_folder, self._dependencies_folder)) + tools.files.copy(self, self._requirements_filename, + os.path.join(self.recipe_folder, self._dependencies_folder), + os.path.join(self.export_folder, self._dependencies_folder)) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self) + self.folders.source = self._source_subfolder + + def requirements(self): + _alltargets = self._parse_option(self.options.with_targets) + _required_components = set() + for _t in _alltargets: + for _component in self._tk_dependencies["components"]: + _libraries = self._tk_dependencies["libraries"][_component] + if _t in _libraries: + _required_components.add(_component) + break + + _allcomponents = self._parse_option(self.options.with_components) + _required_components.update(_allcomponents) + + if len(_required_components) > 0: + _todo = _required_components.copy() + _required_components.clear() + _next = set() + while len(_todo) > 0: + for _component in _todo: + if not _component in _required_components: + _required_components.add(_component) + if _component in self._tk_dependencies["dependencies"].keys(): + for _n in self._tk_dependencies["dependencies"][_component]: + if not _n in _required_components: + _next.add(_n) + _todo = _next.copy() + _next.clear() + + if len(_required_components) == 0: + _required_components.update( self._tk_dependencies["components"]) + else: + for component in _required_components: + self.tk_componenttargets.update(self._tk_dependencies["libraries"][component]) + + requirements = set() + for component in _required_components: + libraries = self._tk_dependencies["libraries"][component] + for lib in libraries: + if lib in self._tk_dependencies["requirements"].keys(): + requirements.update(self._tk_dependencies["requirements"][lib]) + + for req in requirements: + pkgs = self._translate_req(req) + if pkgs is not None: + for pkg in pkgs: + print("Package requires ", pkg) + self.requires(pkg) + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + if self.settings.os not in ["Linux", "Macos", "Windows"]: + raise ConanInvalidConfiguration("This operating system is not supported") + if tools.microsoft.is_msvc(self): + tools.microsoft.check_min_vs(self, "190") + if self.options.shared and tools.microsoft.is_msvc_static_runtime(self): + raise ConanInvalidConfiguration("This configuration is not supported") + if self.settings.compiler == "gcc" and tools.scm.Version(self.settings.compiler.version) < "7": + raise ConanInvalidConfiguration("This version of GCC is not supported") + if tools.build.cross_building(self): + raise ConanInvalidConfiguration("Cross compilation is not supported") + + def source(self): + tools.files.get(self, **self.conan_data["sources"][self.version], strip_root=True) + root = os.path.join(os.getcwd(), "CMakeLists.txt") + with open(root, "w") as f: + f.write("cmake_minimum_required(VERSION 3.15)\n") + f.write("project(ncbi-cpp)\n") + f.write("include(src/build-system/cmake/CMake.NCBItoolkit.cmake)\n") + f.write("add_subdirectory(src)\n") + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["NCBI_PTBCFG_PACKAGING"] = True + if self.options.shared: + tc.variables["NCBI_PTBCFG_ALLOW_COMPOSITE"] = True + tc.variables["NCBI_PTBCFG_PROJECT_LIST"] = str(self.options.with_projects) + ";-app/netcache" + if self.options.with_targets != "": + tc.variables["NCBI_PTBCFG_PROJECT_TARGETS"] = self.options.with_targets + if len(self.tk_componenttargets) != 0: + tc.variables["NCBI_PTBCFG_PROJECT_COMPONENTTARGETS"] = ";".join(self.tk_componenttargets) + if tools.microsoft.is_msvc(self): + tc.variables["NCBI_PTBCFG_CONFIGURATION_TYPES"] = self.settings.build_type + tc.generate() + cmdep = CMakeDeps(self) + cmdep.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() +# Visual Studio sometimes runs "out of heap space" + if tools.microsoft.is_msvc(self): + cmake.parallel = False + cmake.build() + + def package(self): + cmake = CMake(self) + cmake.install() + + def package_info(self): + impfile = os.path.join(self.package_folder, "res", "ncbi-cpp-toolkit.imports") + allexports = set(open(impfile).read().split()) + absent = [] + for component in self._tk_dependencies["components"]: + c_libs = [] + libraries = self._tk_dependencies["libraries"][component] + for lib in libraries: + if lib in allexports: + c_libs.append(lib) + if len(c_libs) == 0 and not len(libraries) == 0: + absent.append(component) + for component in self._tk_dependencies["components"]: + c_libs = [] + c_reqs = [] + n_reqs = set() + c_deps = self._tk_dependencies["dependencies"][component] + for c in c_deps: + if c in absent: + c_deps.remove(c) + c_reqs.extend(c_deps) + libraries = self._tk_dependencies["libraries"][component] + for lib in libraries: + if lib in allexports: + c_libs.append(lib) + if lib in self._tk_dependencies["requirements"].keys(): + n_reqs.update(self._tk_dependencies["requirements"][lib]) + for req in n_reqs: + pkgs = self._translate_req(req) + if pkgs is not None: + for pkg in pkgs: + pkg = pkg[:pkg.find("/")] + ref = pkg + "::" + pkg + c_reqs.append(ref) + if not len(c_libs) == 0 or (len(libraries) == 0 and not len(c_reqs) == 0): + self.cpp_info.components[component].libs = c_libs + self.cpp_info.components[component].requires = c_reqs + + if self.settings.os == "Windows": + self.cpp_info.components["core"].defines.append("_UNICODE") + self.cpp_info.components["core"].defines.append("_CRT_SECURE_NO_WARNINGS=1") + else: + self.cpp_info.components["core"].defines.append("_MT") + self.cpp_info.components["core"].defines.append("_REENTRANT") + self.cpp_info.components["core"].defines.append("_THREAD_SAFE") + self.cpp_info.components["core"].defines.append("_FILE_OFFSET_BITS=64") + if self.options.shared: + self.cpp_info.components["core"].defines.append("NCBI_DLL_BUILD") + if self.settings.build_type == "Debug": + self.cpp_info.components["core"].defines.append("_DEBUG") + else: + self.cpp_info.components["core"].defines.append("NDEBUG") + if self.settings.os == "Windows": + self.cpp_info.components["core"].system_libs = ["ws2_32", "dbghelp"] + elif self.settings.os == "Linux": + self.cpp_info.components["core"].system_libs = ["dl", "rt", "m", "pthread", "resolv"] + elif self.settings.os == "Macos": + self.cpp_info.components["core"].system_libs = ["dl", "c", "m", "pthread", "resolv"] + self.cpp_info.components["core"].builddirs.append("res") + self.cpp_info.components["core"].build_modules = ["res/build-system/cmake/CMake.NCBIpkg.conan.cmake"] diff --git a/recipes/ncbi-cxx-toolkit-public/all/dependencies/dependencies-27.0.yml b/recipes/ncbi-cxx-toolkit-public/all/dependencies/dependencies-27.0.yml new file mode 100755 index 0000000000000..d90b228bb766d --- /dev/null +++ b/recipes/ncbi-cxx-toolkit-public/all/dependencies/dependencies-27.0.yml @@ -0,0 +1,229 @@ +version: 27.0 +#---------------------------------------------------------------------------- +components: + - algo + - algo-ms + - algo-structure + - align-format + - bamread + - blast + - core + - dbapi + - eutils + - grpc + - image + - loader-asncache + - loader-bam + - loader-blastdb + - loader-cdd + - loader-genbank + - loader-lds2 + - loader-snp + - loader-sra + - loader-wgs + - loaders + - objects + - psg-client + - seqext + - sqlitewrapp + - sraread + - xmlwrapp + - web +#---------------------------------------------------------------------------- +libraries: + algo: ["ncbi_algo", + "cobalt","phytree_format","prosplign","proteinkmer","xalgoalignsplign", + "xalgocontig_assembly","xprimer","xalgoalignnw","xalgoalignutil", + "xblastformat","xblast","xalgoblastdbindex","xalgodustmask", + "xalgoseqqa","xalgognomon","xalgophytree","xalgosegmask", + "xalgoseq","xalgotext","xalgowinmask","composition_adjustment", + "fastme","utrtprof" + ] + algo-ms: ["ncbi_algo_ms", + "xomssa","omssa","pepXML" + ] + algo-structure: + ["ncbi_algo_structure", + "xbma_refiner","xcd_utils","xstruct_util","xstruct_dp","xstruct_thread" + ] + align-format: + ["xalntool", + "ncbi_align_format", + "align_format" + ] + bamread: ["bamread"] + blast: ["xngalign", "igblast", + "vdb2blast", "blast_sra_input", + "ncbi_blastinput", + "blastinput", + "xmergetree", + "xalgoblastdbindex_search", + "gumbelparams" + ] + core: ["xconnext", + "ncbi_core", + "xconnserv","xcompress","xthrserv","sequtil","xconnect", + "xdiff","xqueryparse","xregexp","xser","xutil","tables","xncbi", + "xxconnect2" + ] + dbapi: ["sdbapi", + "ncbi_xdbapi_ftds","ncbi_xdbapi_ftds100", + "ct_ftds100","tds_ftds100", + "ncbi_dbapi", + "dbapi", + "dbapi_util_blobstore", + "ncbi_dbapi_driver", + "dbapi_driver" + ] + eutils: ["eutils_client", + "ncbi_eutils", + "eutils", "egquery", "ehistory", "einfo", "elink", + "epost", "esearch", "espell", "esummary", + "linkout", "uilist" + ] + grpc: ["grpc_integration"] + image: ["ncbi_image", + "ximage" + ] + loader-asncache: + [ + "ncbi_xloader_asn_cache", + "asn_cache", + "ncbi_xcache_bdb", + "ncbi_bdb", + "bdb" + ] + loader-bam: ["ncbi_xloader_bam"] + loader-blastdb: + ["ncbi_xloader_blastdb_rmt", + "ncbi_xloader_blastdb" + ] + loader-cdd: + ["ncbi_xloader_cdd", + "cdd_access" + ] + loader-genbank: + [ + "ncbi_xobjsimple", + "xobjsimple", + "ncbi_xloader_genbank", + "ncbi_xreader_cache", + "ncbi_xreader_gicache", + "ncbi_xreader_id1", + "ncbi_xreader_id2", + "ncbi_xreader_pubseqos", + "ncbi_xreader_pubseqos2", + "ncbi_xreader", + "eMyNCBI_result" + ] + loader-lds2: + ["ncbi_xloader_lds2", + "ncbi_lds2", + "lds2" + ] + loader-snp: ["ncbi_xloader_snp", "dbsnp_ptis"] + loader-sra: ["ncbi_xloader_sra", "ncbi_xloader_csra"] + loader-wgs: ["ncbi_xloader_vdbgraph", "ncbi_xloader_wgs"] + loaders: ["xflatfile", + "data_loaders_util", + "ncbi_xloader_patcher" + ] + objects: ["searchbyrsid", + "ncbi_trackmgr", + "gbproj","trackmgrcli","trackmgr", + "ncbi_mmdb", + "ncbimime","cdd","cn3d","mmdb", + "pcassay2", + "ncbi_misc", + "proj","pcassay","pcsubstance","entrez2cli","biotree", + "access","docsum","entrez2","entrezgene","featdef","gbseq", + "genesbyloc","insdseq","mim","objcoords","objprt","remapcli", + "remap","tinyseq", + "macro", + "gencoll_client", + "homologene", + "local_taxon", + "ncbi_seq", + "blastdb","genome_collection","xnetblastcli","xnetblast","scoremat", + "seqtest","taxon1","taxon3","variation","seqset","seq","seqedit","submit", + "blastxml","blastxml2","seqcode", + "ncbi_pub", + "mlacli","mla","medlars","pub","pubmed","medline","biblio", + "ncbi_general", + "generalasn", + "efetch" + ] + psg-client: ["psg_client", + "psg_protobuf" + ] + seqext: ["gene_info_writer", + "ncbi_validator", + "xvalidate", + "ncbi_xdiscrepancy", + "xdiscrepancy", + "ncbi_seqext", + "blast_services","blastdb_format","gene_info","id1cli","id1","id2cli","id2", + "id2_split","writedb","seqdb","seqmasks_io","seqsplit","snputil","uudutil", + "valerr","valid","variation_utils","xformat","xalnmgr","xcleanup", + "xobjedit","xobjreadex","xobjwrite","xobjread","xlogging","xobjimport", + "xobjmanip","xunittestutil","xobjutil","xobjmgr", + ] + sqlitewrapp: ["sqlitewrapp"] + sraread: ["sraread"] + xmlwrapp: ["xmlreaders", + "xmlwrapp" + ] + web: ["xsoap_server", "xsoap", + "ncbi_web", + "xcgi_redirect","xcgi","xhtml", "xfcgi" + ] +#---------------------------------------------------------------------------- +requirements: + bamread: ["VDB"] + bdb: ["BerkeleyDB"] + blast_sra_input: ["VDB"] + dbsnp_ptis: ["GRPC", "PROTOBUF"] + grpc_integration: ["GRPC", "PROTOBUF"] + psg_protobuf: ["GRPC", "PROTOBUF"] + seqdb: ["LMDB"] + sqlitewrapp: ["SQLITE3"] + sraread: ["VDB"] + vdb2blast: ["VDB"] + writedb: ["LMDB"] + xcompress: ["Z", "BZ2", "LZO", "ZSTD"] + xregexp: ["PCRE"] + ximage: ["Z", "JPEG", "PNG", "GIF", "TIFF"] + xmlwrapp: ["XML", "XSLT"] + xncbi: ["BACKWARD", "UNWIND"] + xxconnect2: ["UV", "NGHTTP2"] + xfcgi: ["FASTCGI"] +#---------------------------------------------------------------------------- +dependencies: + algo: ["align-format","sqlitewrapp"] + algo-ms: ["algo"] + algo-structure: ["algo","objects"] + align-format: ["loader-genbank", "web"] + bamread: ["objects"] + blast: ["loader-blastdb", "algo", "sraread"] + core: [] + dbapi: ["core"] + eutils: ["objects","xmlwrapp"] + grpc: ["core"] + image: ["core"] + loader-asncache: ["seqext"] + loader-bam: ["bamread", "seqext"] + loader-blastdb: ["seqext"] + loader-cdd: ["seqext"] + loader-genbank: ["psg-client", "dbapi"] + loader-lds2: ["seqext", "sqlitewrapp"] + loader-snp: ["sraread", "grpc"] + loader-sra: ["sraread"] + loader-wgs: ["sraread"] + loaders: ["loader-asncache", "loader-blastdb", "loader-genbank", "loader-lds2"] + objects: ["sqlitewrapp","core"] + psg-client: ["seqext"] + seqext: ["eutils", "objects"] + sqlitewrapp: ["core"] + sraread: ["seqext"] + xmlwrapp: ["core"] + web: ["core"] diff --git a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml new file mode 100755 index 0000000000000..9487c412c79ba --- /dev/null +++ b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml @@ -0,0 +1,28 @@ +version: 27.0 +#---------------------------------------------------------------------------- +requirements: + BACKWARD: ["backward-cpp/1.6"] + UNWIND: ["libunwind/1.6.2"] + BerkeleyDB: ["libdb/5.3.28"] + BZ2: ["bzip2/1.0.8"] + GIF: ["giflib/5.2.1"] + GRPC: ["grpc/1.50.1"] + JPEG: ["libjpeg/9e"] + LMDB: ["lmdb/0.9.29"] + LZO: ["lzo/2.10"] + NGHTTP2: ["libnghttp2/1.51.0"] + PCRE: ["pcre/8.45"] + PNG: ["libpng/1.6.39"] + PROTOBUF: ["protobuf/3.21.4"] + SQLITE3: ["sqlite3/3.41.1"] + TIFF: ["libtiff/4.4.0"] + XML: ["libxml2/2.10.3"] + XSLT: ["libxslt/1.1.34"] + UV: ["libuv/1.44.2"] + Z: ["zlib/1.2.13"] + ZSTD: ["zstd/1.5.4"] + +disabled: + BACKWARD: ["Windows", "Macos"] + UNWIND: ["Windows", "Macos"] + BerkeleyDB: ["Windows"] diff --git a/recipes/ncbi-cxx-toolkit-public/all/test_package/CMakeLists.txt b/recipes/ncbi-cxx-toolkit-public/all/test_package/CMakeLists.txt new file mode 100755 index 0000000000000..b7c4b1a0c89e4 --- /dev/null +++ b/recipes/ncbi-cxx-toolkit-public/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.16) +project(test_package) +set(PackageName ncbi-cxx-toolkit-public) + +find_package(${PackageName} REQUIRED CONFIG) +add_executable(${PROJECT_NAME} basic_sample.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE ${PackageName}::${PackageName}) diff --git a/recipes/ncbi-cxx-toolkit-public/all/test_package/basic_sample.cpp b/recipes/ncbi-cxx-toolkit-public/all/test_package/basic_sample.cpp new file mode 100755 index 0000000000000..9a54b227bac92 --- /dev/null +++ b/recipes/ncbi-cxx-toolkit-public/all/test_package/basic_sample.cpp @@ -0,0 +1,100 @@ +/* + * =========================================================================== + * + * PUBLIC DOMAIN NOTICE + * National Center for Biotechnology Information + * + * This software/database is a "United States Government Work" under the + * terms of the United States Copyright Act. It was written as part of + * the author's official duties as a United States Government employee and + * thus cannot be copyrighted. This software/database is freely available + * to the public for use. The National Library of Medicine and the U.S. + * Government have not placed any restriction on its use or reproduction. + * + * Although all reasonable efforts have been taken to ensure the accuracy + * and reliability of the software and data, the NLM and the U.S. + * Government do not and cannot warrant the performance or results that + * may be obtained by using this software or data. The NLM and the U.S. + * Government disclaim all warranties, express or implied, including + * warranties of performance, merchantability or fitness for any particular + * purpose. + * + * Please cite the author in any work or product based on this material. + * + * =========================================================================== + * + * File Description: + * Minimalistic application + * + */ + +#include +#include +#include +#include + +USING_NCBI_SCOPE; + + +///////////////////////////////////////////////////////////////////////////// +// CSampleBasicApplication:: + +class CSampleBasicApplication : public CNcbiApplication +{ +private: + virtual void Init(void); + virtual int Run(void); + virtual void Exit(void); +}; + + +///////////////////////////////////////////////////////////////////////////// +// Init test for all different types of arguments + +void CSampleBasicApplication::Init(void) +{ + // // Set error posting and tracing on maximum + // SetDiagTrace(eDT_Enable); + // SetDiagPostFlag(eDPF_All); + // SetDiagPostLevel(eDiag_Info); + + // Create command-line argument descriptions class + unique_ptr arg_desc(new CArgDescriptions); + + // Specify USAGE context + arg_desc->SetUsageContext(GetArguments().GetProgramBasename(), + "Basic sample demo program"); + // Setup arg.descriptions for this application + SetupArgDescriptions(arg_desc.release()); +} + + +///////////////////////////////////////////////////////////////////////////// +// Run test (printout arguments obtained from command-line) + +int CSampleBasicApplication::Run(void) +{ + cout << "NCBI C++ Toolkit ready" << endl; + return 0; +} + + +///////////////////////////////////////////////////////////////////////////// +// Cleanup + +void CSampleBasicApplication::Exit(void) +{ + // Do your after-Run() cleanup here +} + + +///////////////////////////////////////////////////////////////////////////// +// MAIN + +int NcbiSys_main(int argc, ncbi::TXChar* argv[]) +{ + // Execute main application function; change argument list to + // (argc, argv, 0, eDS_Default, 0) if there's no point in trying + // to look for an application-specific configuration file. + return CSampleBasicApplication().AppMain(argc, argv); +} diff --git a/recipes/ncbi-cxx-toolkit-public/all/test_package/conanfile.py b/recipes/ncbi-cxx-toolkit-public/all/test_package/conanfile.py new file mode 100755 index 0000000000000..244d28df911e8 --- /dev/null +++ b/recipes/ncbi-cxx-toolkit-public/all/test_package/conanfile.py @@ -0,0 +1,24 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + +class NcbiCxxToolkitTest(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/ncbi-cxx-toolkit-public/all/test_v1_package/CMakeLists.txt b/recipes/ncbi-cxx-toolkit-public/all/test_v1_package/CMakeLists.txt new file mode 100755 index 0000000000000..8aa4dc281a3a3 --- /dev/null +++ b/recipes/ncbi-cxx-toolkit-public/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.16) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/ncbi-cxx-toolkit-public/all/test_v1_package/conanfile.py b/recipes/ncbi-cxx-toolkit-public/all/test_v1_package/conanfile.py new file mode 100755 index 0000000000000..6d925d4043007 --- /dev/null +++ b/recipes/ncbi-cxx-toolkit-public/all/test_v1_package/conanfile.py @@ -0,0 +1,19 @@ +from conans import ConanFile, CMake +from conan.tools.build import cross_building +import os + + +class NcbiCxxToolkitTestV1Conan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) + diff --git a/recipes/ncbi-cxx-toolkit-public/config.yml b/recipes/ncbi-cxx-toolkit-public/config.yml index 25761214128f4..59c15151743f7 100644 --- a/recipes/ncbi-cxx-toolkit-public/config.yml +++ b/recipes/ncbi-cxx-toolkit-public/config.yml @@ -1,3 +1,5 @@ versions: "26.0.1": folder: "26" + "27.0.0": + folder: "all" From bcd09641f19222475ca405313bad1d7290e3a557 Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Tue, 28 Mar 2023 13:38:10 -0400 Subject: [PATCH 02/29] Modified per Conan center recommendations --- .../ncbi-cxx-toolkit-public/all/conanfile.py | 53 ++++++++++--------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py index b6f8cf6216e26..631250d912b66 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py +++ b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py @@ -1,7 +1,10 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration, ConanException +from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc +from conan.tools.files import get, copy +from conan.tools.build import check_min_cppstd, cross_building +from conan.tools.scm import Version from conan.tools.cmake import CMakeDeps, CMakeToolchain, CMake, cmake_layout -from conan import tools import os import yaml required_conan_version = ">=1.53.0" @@ -51,19 +54,20 @@ def _dependencies_folder(self): @property def _dependencies_filename(self): - return "dependencies-{}.{}.yml".format(tools.scm.Version(self.version).major, tools.scm.Version(self.version).minor) + return f"dependencies-{Version(self.version).major}.{Version(self.version).minor}.yml" @property def _requirements_filename(self): - return "requirements-{}.{}.yml".format(tools.scm.Version(self.version).major, tools.scm.Version(self.version).minor) + return f"requirements-{Version(self.version).major}.{Version(self.version).minor}.yml" @property def _tk_dependencies(self): if self.tk_dependencies is None: dependencies_filepath = os.path.join(self.recipe_folder, self._dependencies_folder, self._dependencies_filename) if not os.path.isfile(dependencies_filepath): - raise ConanException("Cannot find {}".format(dependencies_filepath)) - self.tk_dependencies = yaml.safe_load(open(dependencies_filepath)) + raise ConanException(f"Cannot find {dependencies_filepath}") + with open(dependencies_filepath, "r", encoding="utf-8") as f: + self.tk_dependencies = yaml.safe_load(f) return self.tk_dependencies @property @@ -71,8 +75,9 @@ def _tk_requirements(self): if self.tk_requirements is None: requirements_filepath = os.path.join(self.recipe_folder, self._dependencies_folder, self._requirements_filename) if not os.path.isfile(requirements_filepath): - raise ConanException("Cannot find {}".format(requirements_filepath)) - self.tk_requirements = yaml.safe_load(open(requirements_filepath)) + raise ConanException(f"Cannot find {requirements_filepath}") + with open(requirements_filepath, "r", encoding="utf-8") as f: + self.tk_requirements = yaml.safe_load(f) return self.tk_requirements def _translate_req(self, key): @@ -97,10 +102,10 @@ def _parse_option(self, data): return _res def export(self): - tools.files.copy(self, self._dependencies_filename, + copy(self, self._dependencies_filename, os.path.join(self.recipe_folder, self._dependencies_folder), os.path.join(self.export_folder, self._dependencies_folder)) - tools.files.copy(self, self._requirements_filename, + copy(self, self._requirements_filename, os.path.join(self.recipe_folder, self._dependencies_folder), os.path.join(self.export_folder, self._dependencies_folder)) @@ -113,8 +118,7 @@ def configure(self): self.options.rm_safe("fPIC") def layout(self): - cmake_layout(self) - self.folders.source = self._source_subfolder + cmake_layout(self, src_folder = self._source_subfolder) def requirements(self): _alltargets = self._parse_option(self.options.with_targets) @@ -167,21 +171,21 @@ def requirements(self): def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, self._min_cppstd) - if self.settings.os not in ["Linux", "Macos", "Windows"]: + if self.settings.os not in ["Linux", "Macos", "Windows"]: raise ConanInvalidConfiguration("This operating system is not supported") - if tools.microsoft.is_msvc(self): - tools.microsoft.check_min_vs(self, "190") - if self.options.shared and tools.microsoft.is_msvc_static_runtime(self): + if is_msvc(self): + check_min_vs(self, "190") + if self.options.shared and is_msvc_static_runtime(self): raise ConanInvalidConfiguration("This configuration is not supported") - if self.settings.compiler == "gcc" and tools.scm.Version(self.settings.compiler.version) < "7": + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "7": raise ConanInvalidConfiguration("This version of GCC is not supported") - if tools.build.cross_building(self): + if cross_building(self): raise ConanInvalidConfiguration("Cross compilation is not supported") def source(self): - tools.files.get(self, **self.conan_data["sources"][self.version], strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) root = os.path.join(os.getcwd(), "CMakeLists.txt") - with open(root, "w") as f: + with open(root, "w", encoding="utf-8") as f: f.write("cmake_minimum_required(VERSION 3.15)\n") f.write("project(ncbi-cpp)\n") f.write("include(src/build-system/cmake/CMake.NCBItoolkit.cmake)\n") @@ -197,7 +201,7 @@ def generate(self): tc.variables["NCBI_PTBCFG_PROJECT_TARGETS"] = self.options.with_targets if len(self.tk_componenttargets) != 0: tc.variables["NCBI_PTBCFG_PROJECT_COMPONENTTARGETS"] = ";".join(self.tk_componenttargets) - if tools.microsoft.is_msvc(self): + if is_msvc(self): tc.variables["NCBI_PTBCFG_CONFIGURATION_TYPES"] = self.settings.build_type tc.generate() cmdep = CMakeDeps(self) @@ -207,7 +211,7 @@ def build(self): cmake = CMake(self) cmake.configure() # Visual Studio sometimes runs "out of heap space" - if tools.microsoft.is_msvc(self): + if is_msvc(self): cmake.parallel = False cmake.build() @@ -217,7 +221,8 @@ def package(self): def package_info(self): impfile = os.path.join(self.package_folder, "res", "ncbi-cpp-toolkit.imports") - allexports = set(open(impfile).read().split()) + with open(impfile, "r", encoding="utf-8") as f: + allexports = set(f.read().split()) absent = [] for component in self._tk_dependencies["components"]: c_libs = [] @@ -225,7 +230,7 @@ def package_info(self): for lib in libraries: if lib in allexports: c_libs.append(lib) - if len(c_libs) == 0 and not len(libraries) == 0: + if len(c_libs) == 0 and len(libraries) != 0: absent.append(component) for component in self._tk_dependencies["components"]: c_libs = [] @@ -249,7 +254,7 @@ def package_info(self): pkg = pkg[:pkg.find("/")] ref = pkg + "::" + pkg c_reqs.append(ref) - if not len(c_libs) == 0 or (len(libraries) == 0 and not len(c_reqs) == 0): + if len(c_libs) != 0 or (len(libraries) == 0 and len(c_reqs) != 0): self.cpp_info.components[component].libs = c_libs self.cpp_info.components[component].requires = c_reqs From 223339aa2dead3df7f2ab8de898bbc8c88940eaa Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Tue, 28 Mar 2023 13:46:30 -0400 Subject: [PATCH 03/29] Modified per Conan center recommendations --- recipes/ncbi-cxx-toolkit-public/all/conanfile.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py index 631250d912b66..ae90d3820d665 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py +++ b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py @@ -44,10 +44,6 @@ class NcbiCxxToolkit(ConanFile): def _min_cppstd(self): return 17 - @property - def _source_subfolder(self): - return "src" - @property def _dependencies_folder(self): return "dependencies" @@ -118,7 +114,7 @@ def configure(self): self.options.rm_safe("fPIC") def layout(self): - cmake_layout(self, src_folder = self._source_subfolder) + cmake_layout(self, src_folder="src") def requirements(self): _alltargets = self._parse_option(self.options.with_targets) From ba65e3ac70a66c70e83735f6809a8791c86582c3 Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Fri, 31 Mar 2023 11:33:10 -0400 Subject: [PATCH 04/29] Added verbose output into build --- recipes/ncbi-cxx-toolkit-public/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py index ae90d3820d665..d5e78e6575028 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py +++ b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py @@ -209,7 +209,7 @@ def build(self): # Visual Studio sometimes runs "out of heap space" if is_msvc(self): cmake.parallel = False - cmake.build() + cmake.build(cli_args=["-v"]) def package(self): cmake = CMake(self) From fd27356f67565ee336aae41e687b93479edaa4aa Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Fri, 31 Mar 2023 13:51:59 -0400 Subject: [PATCH 05/29] Fixed compilation on GCC 7.2 --- recipes/ncbi-cxx-toolkit-public/all/conandata.yml | 4 ++++ recipes/ncbi-cxx-toolkit-public/all/conanfile.py | 8 ++++++-- .../all/patches/27.0.0-compiler.patch | 11 +++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100755 recipes/ncbi-cxx-toolkit-public/all/patches/27.0.0-compiler.patch diff --git a/recipes/ncbi-cxx-toolkit-public/all/conandata.yml b/recipes/ncbi-cxx-toolkit-public/all/conandata.yml index b3652db5f6a52..8300c1af049e4 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conandata.yml +++ b/recipes/ncbi-cxx-toolkit-public/all/conandata.yml @@ -2,3 +2,7 @@ sources: "27.0.0": url: "https://github.com/ncbi/ncbi-cxx-toolkit-public/archive/refs/tags/release-27.0.0.tar.gz" sha256: "c8fb3f99c6fce4f170b381f3a7789c76a2ff1c23c094c9852e2e3de1fdc57277" + +patches: + "27.0.0": + - patch_file: "patches/27.0.0-compiler.patch" diff --git a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py index d5e78e6575028..fe6c9f9ab69c0 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py +++ b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration, ConanException from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc -from conan.tools.files import get, copy +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy from conan.tools.build import check_min_cppstd, cross_building from conan.tools.scm import Version from conan.tools.cmake import CMakeDeps, CMakeToolchain, CMake, cmake_layout @@ -105,6 +105,9 @@ def export(self): os.path.join(self.recipe_folder, self._dependencies_folder), os.path.join(self.export_folder, self._dependencies_folder)) + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -180,6 +183,7 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + apply_conandata_patches(self) root = os.path.join(os.getcwd(), "CMakeLists.txt") with open(root, "w", encoding="utf-8") as f: f.write("cmake_minimum_required(VERSION 3.15)\n") @@ -209,7 +213,7 @@ def build(self): # Visual Studio sometimes runs "out of heap space" if is_msvc(self): cmake.parallel = False - cmake.build(cli_args=["-v"]) + cmake.build() def package(self): cmake = CMake(self) diff --git a/recipes/ncbi-cxx-toolkit-public/all/patches/27.0.0-compiler.patch b/recipes/ncbi-cxx-toolkit-public/all/patches/27.0.0-compiler.patch new file mode 100755 index 0000000000000..6208df24fc5d1 --- /dev/null +++ b/recipes/ncbi-cxx-toolkit-public/all/patches/27.0.0-compiler.patch @@ -0,0 +1,11 @@ +--- src/build-system/cmake/CMakeChecks.compiler.cmake ++++ src/build-system/cmake/CMakeChecks.compiler.cmake +@@ -477,7 +477,7 @@ set(_ggdb1 "-ggdb1") + set(_gdw4r "-gdwarf-4") + if(NCBI_COMPILER_GCC) + +- if("${NCBI_COMPILER_VERSION}" LESS "730") ++ if("${NCBI_COMPILER_VERSION}" LESS "700") + add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0) + endif() + if(BinRelease IN_LIST NCBI_PTBCFG_PROJECT_FEATURES) From eefdb7867fa304cda92ca03f334eeea5d0534b94 Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Mon, 3 Apr 2023 10:08:01 -0400 Subject: [PATCH 06/29] Corrected compiler version check --- recipes/ncbi-cxx-toolkit-public/all/conanfile.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py index fe6c9f9ab69c0..26a6202d86541 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py +++ b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py @@ -44,6 +44,14 @@ class NcbiCxxToolkit(ConanFile): def _min_cppstd(self): return 17 + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "7", + "apple-clang": "10", + } + @property def _dependencies_folder(self): return "dependencies" @@ -173,11 +181,13 @@ def validate(self): if self.settings.os not in ["Linux", "Macos", "Windows"]: raise ConanInvalidConfiguration("This operating system is not supported") if is_msvc(self): - check_min_vs(self, "190") + check_min_vs(self, 192) if self.options.shared and is_msvc_static_runtime(self): raise ConanInvalidConfiguration("This configuration is not supported") - if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "7": - raise ConanInvalidConfiguration("This version of GCC is not supported") + else: + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"This version of {self.settings.compiler} is not supported") if cross_building(self): raise ConanInvalidConfiguration("Cross compilation is not supported") From 592eeae0c659f73fc2db2f262d8502806cba1fc7 Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Tue, 4 Apr 2023 12:05:20 -0400 Subject: [PATCH 07/29] Fixed installation on Windows --- recipes/ncbi-cxx-toolkit-public/all/conandata.yml | 1 + .../all/patches/27.0.0-install.patch | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100755 recipes/ncbi-cxx-toolkit-public/all/patches/27.0.0-install.patch diff --git a/recipes/ncbi-cxx-toolkit-public/all/conandata.yml b/recipes/ncbi-cxx-toolkit-public/all/conandata.yml index 8300c1af049e4..d50bea2913b12 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conandata.yml +++ b/recipes/ncbi-cxx-toolkit-public/all/conandata.yml @@ -6,3 +6,4 @@ sources: patches: "27.0.0": - patch_file: "patches/27.0.0-compiler.patch" + - patch_file: "patches/27.0.0-install.patch" diff --git a/recipes/ncbi-cxx-toolkit-public/all/patches/27.0.0-install.patch b/recipes/ncbi-cxx-toolkit-public/all/patches/27.0.0-install.patch new file mode 100755 index 0000000000000..9379374856798 --- /dev/null +++ b/recipes/ncbi-cxx-toolkit-public/all/patches/27.0.0-install.patch @@ -0,0 +1,15 @@ +--- a/src/build-system/cmake/CMake.NCBIptb.install.cmake ++++ b/src/build-system/cmake/CMake.NCBIptb.install.cmake +@@ -312,11 +312,7 @@ function(NCBI_internal_install_root _variable _access) + + if(NCBI_PTBCFG_PACKAGING) + if (WIN32 OR XCODE) +- if(DEFINED CONAN_SETTINGS_BUILD_TYPE) +- install( DIRECTORY ${NCBI_CFGINC_ROOT}/${CONAN_SETTINGS_BUILD_TYPE}/ DESTINATION ${NCBI_DIRNAME_INCLUDE}) +- else() +- install( DIRECTORY ${NCBI_CFGINC_ROOT}/Release/ DESTINATION ${NCBI_DIRNAME_INCLUDE}) +- endif() ++ install( DIRECTORY ${NCBI_CFGINC_ROOT}/$/ DESTINATION ${NCBI_DIRNAME_INCLUDE}) + else() + install( DIRECTORY ${NCBI_CFGINC_ROOT}/ DESTINATION ${NCBI_DIRNAME_INCLUDE}) + endif() From 8cc3d36d6e89de8f37df914e0a35abac249cb38f Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Mon, 17 Apr 2023 09:54:16 -0400 Subject: [PATCH 08/29] trigger rebuild --- recipes/ncbi-cxx-toolkit-public/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py index 26a6202d86541..b2345f455c67f 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py +++ b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py @@ -7,6 +7,7 @@ from conan.tools.cmake import CMakeDeps, CMakeToolchain, CMake, cmake_layout import os import yaml + required_conan_version = ">=1.53.0" From 53dc735d234d58b5e4fde77d9e821f131901cf1a Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Mon, 17 Apr 2023 16:13:37 +0100 Subject: [PATCH 09/29] Update recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml --- .../all/dependencies/requirements-27.0.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml index 9487c412c79ba..75929d6e9105e 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml +++ b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml @@ -13,7 +13,7 @@ requirements: NGHTTP2: ["libnghttp2/1.51.0"] PCRE: ["pcre/8.45"] PNG: ["libpng/1.6.39"] - PROTOBUF: ["protobuf/3.21.4"] + PROTOBUF: ["protobuf/3.21.9"] SQLITE3: ["sqlite3/3.41.1"] TIFF: ["libtiff/4.4.0"] XML: ["libxml2/2.10.3"] From 99eda5abbc5f221adb8d76e4a65d40f76645be6d Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Mon, 17 Apr 2023 15:58:25 -0400 Subject: [PATCH 10/29] Rely on GRPC to install PROTOBUF --- .../all/dependencies/requirements-27.0.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml index 75929d6e9105e..4212109337b3e 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml +++ b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml @@ -13,7 +13,7 @@ requirements: NGHTTP2: ["libnghttp2/1.51.0"] PCRE: ["pcre/8.45"] PNG: ["libpng/1.6.39"] - PROTOBUF: ["protobuf/3.21.9"] + PROTOBUF: [] SQLITE3: ["sqlite3/3.41.1"] TIFF: ["libtiff/4.4.0"] XML: ["libxml2/2.10.3"] From 4de55e9e00a4799e4ae1c14f263839903eb253d2 Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Tue, 18 Apr 2023 14:08:17 +0100 Subject: [PATCH 11/29] Update recipes/ncbi-cxx-toolkit-public/all/test_package/CMakeLists.txt --- recipes/ncbi-cxx-toolkit-public/all/test_package/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/test_package/CMakeLists.txt b/recipes/ncbi-cxx-toolkit-public/all/test_package/CMakeLists.txt index b7c4b1a0c89e4..3c2845864bd6f 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/test_package/CMakeLists.txt +++ b/recipes/ncbi-cxx-toolkit-public/all/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.15) project(test_package) set(PackageName ncbi-cxx-toolkit-public) From fb711b99bc448fdef6656efd7c4eac5c69941f37 Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Tue, 18 Apr 2023 14:08:33 +0100 Subject: [PATCH 12/29] Update recipes/ncbi-cxx-toolkit-public/all/test_v1_package/CMakeLists.txt --- .../ncbi-cxx-toolkit-public/all/test_v1_package/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/test_v1_package/CMakeLists.txt b/recipes/ncbi-cxx-toolkit-public/all/test_v1_package/CMakeLists.txt index 8aa4dc281a3a3..91630d79f4abb 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/test_v1_package/CMakeLists.txt +++ b/recipes/ncbi-cxx-toolkit-public/all/test_v1_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.15) project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) From d262d4286be85953be5700d42bcc4590f7f3724f Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Tue, 18 Apr 2023 10:38:22 -0400 Subject: [PATCH 13/29] Added patch type and description --- recipes/ncbi-cxx-toolkit-public/all/conandata.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/ncbi-cxx-toolkit-public/all/conandata.yml b/recipes/ncbi-cxx-toolkit-public/all/conandata.yml index d50bea2913b12..72a73c11bb803 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conandata.yml +++ b/recipes/ncbi-cxx-toolkit-public/all/conandata.yml @@ -6,4 +6,8 @@ sources: patches: "27.0.0": - patch_file: "patches/27.0.0-compiler.patch" + patch_description: "Corrected version check of GCC compiler" + patch_type: "bugfix" - patch_file: "patches/27.0.0-install.patch" + patch_description: "Replaced hard-coded configuration with cmake generator expression" + patch_type: "bugfix" From ad7aacc6282850d2941e60a38dbb421e61b09ee6 Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Tue, 18 Apr 2023 10:39:27 -0400 Subject: [PATCH 14/29] Change variable names to start with underscore --- .../ncbi-cxx-toolkit-public/all/conanfile.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py index b2345f455c67f..80b149b592283 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py +++ b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py @@ -37,9 +37,9 @@ class NcbiCxxToolkit(ConanFile): "with_components": "" } short_paths = True - tk_dependencies = None - tk_requirements = None - tk_componenttargets = set() + _dependencies = None + _requirements = None + _componenttargets = set() @property def _min_cppstd(self): @@ -67,23 +67,23 @@ def _requirements_filename(self): @property def _tk_dependencies(self): - if self.tk_dependencies is None: + if self._dependencies is None: dependencies_filepath = os.path.join(self.recipe_folder, self._dependencies_folder, self._dependencies_filename) if not os.path.isfile(dependencies_filepath): raise ConanException(f"Cannot find {dependencies_filepath}") with open(dependencies_filepath, "r", encoding="utf-8") as f: - self.tk_dependencies = yaml.safe_load(f) - return self.tk_dependencies + self._dependencies = yaml.safe_load(f) + return self._dependencies @property def _tk_requirements(self): - if self.tk_requirements is None: + if self._requirements is None: requirements_filepath = os.path.join(self.recipe_folder, self._dependencies_folder, self._requirements_filename) if not os.path.isfile(requirements_filepath): raise ConanException(f"Cannot find {requirements_filepath}") with open(requirements_filepath, "r", encoding="utf-8") as f: - self.tk_requirements = yaml.safe_load(f) - return self.tk_requirements + self._requirements = yaml.safe_load(f) + return self._requirements def _translate_req(self, key): if "Boost" in key: @@ -160,7 +160,7 @@ def requirements(self): _required_components.update( self._tk_dependencies["components"]) else: for component in _required_components: - self.tk_componenttargets.update(self._tk_dependencies["libraries"][component]) + self._componenttargets.update(self._tk_dependencies["libraries"][component]) requirements = set() for component in _required_components: @@ -210,8 +210,8 @@ def generate(self): tc.variables["NCBI_PTBCFG_PROJECT_LIST"] = str(self.options.with_projects) + ";-app/netcache" if self.options.with_targets != "": tc.variables["NCBI_PTBCFG_PROJECT_TARGETS"] = self.options.with_targets - if len(self.tk_componenttargets) != 0: - tc.variables["NCBI_PTBCFG_PROJECT_COMPONENTTARGETS"] = ";".join(self.tk_componenttargets) + if len(self._componenttargets) != 0: + tc.variables["NCBI_PTBCFG_PROJECT_COMPONENTTARGETS"] = ";".join(self._componenttargets) if is_msvc(self): tc.variables["NCBI_PTBCFG_CONFIGURATION_TYPES"] = self.settings.build_type tc.generate() From 643e8fb7f22a464708e2f838b15b6bde40432971 Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Wed, 19 Apr 2023 12:58:55 -0400 Subject: [PATCH 15/29] Added ApplicationServices framework on Mac --- recipes/ncbi-cxx-toolkit-public/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py index 80b149b592283..9967c24950af2 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py +++ b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py @@ -289,5 +289,6 @@ def package_info(self): self.cpp_info.components["core"].system_libs = ["dl", "rt", "m", "pthread", "resolv"] elif self.settings.os == "Macos": self.cpp_info.components["core"].system_libs = ["dl", "c", "m", "pthread", "resolv"] + self.cpp_info.components["core"].frameworks = ["ApplicationServices"] self.cpp_info.components["core"].builddirs.append("res") self.cpp_info.components["core"].build_modules = ["res/build-system/cmake/CMake.NCBIpkg.conan.cmake"] From 03b12765cc144bceaeab6caa166391394e7145b6 Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Wed, 3 May 2023 09:22:34 -0400 Subject: [PATCH 16/29] Changed patch types --- recipes/ncbi-cxx-toolkit-public/all/conandata.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/conandata.yml b/recipes/ncbi-cxx-toolkit-public/all/conandata.yml index 72a73c11bb803..e13ff3ab11ab9 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conandata.yml +++ b/recipes/ncbi-cxx-toolkit-public/all/conandata.yml @@ -7,7 +7,7 @@ patches: "27.0.0": - patch_file: "patches/27.0.0-compiler.patch" patch_description: "Corrected version check of GCC compiler" - patch_type: "bugfix" + patch_type: "portability" - patch_file: "patches/27.0.0-install.patch" patch_description: "Replaced hard-coded configuration with cmake generator expression" - patch_type: "bugfix" + patch_type: "conan" From 5b93304acd5bbb1ed3ed6114429583520c171251 Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Thu, 4 May 2023 15:09:14 -0400 Subject: [PATCH 17/29] Corrected requirements to fix conflicts. --- .../all/dependencies/requirements-27.0.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml index 4212109337b3e..0eac835f0e836 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml +++ b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml @@ -2,7 +2,7 @@ version: 27.0 #---------------------------------------------------------------------------- requirements: BACKWARD: ["backward-cpp/1.6"] - UNWIND: ["libunwind/1.6.2"] + UNWIND: ["libunwind/1.6.2", "xz_utils/5.4.2"] BerkeleyDB: ["libdb/5.3.28"] BZ2: ["bzip2/1.0.8"] GIF: ["giflib/5.2.1"] From 05ff3c19180567704e05a299e66e68434f262ed7 Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Mon, 18 Sep 2023 09:26:23 -0400 Subject: [PATCH 18/29] Require zstd/1.5.5 --- .../all/dependencies/requirements-27.0.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml index 0eac835f0e836..17e87c90b0ca0 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml +++ b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml @@ -20,7 +20,7 @@ requirements: XSLT: ["libxslt/1.1.34"] UV: ["libuv/1.44.2"] Z: ["zlib/1.2.13"] - ZSTD: ["zstd/1.5.4"] + ZSTD: ["zstd/1.5.5"] disabled: BACKWARD: ["Windows", "Macos"] From 07300408bab7f7c9032fff01ae6e91b1aa1e95fa Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Tue, 19 Sep 2023 08:09:40 -0400 Subject: [PATCH 19/29] Disable BerkeleyDB --- .../all/dependencies/requirements-27.0.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml index 17e87c90b0ca0..453e85aa083d6 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml +++ b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml @@ -3,7 +3,6 @@ version: 27.0 requirements: BACKWARD: ["backward-cpp/1.6"] UNWIND: ["libunwind/1.6.2", "xz_utils/5.4.2"] - BerkeleyDB: ["libdb/5.3.28"] BZ2: ["bzip2/1.0.8"] GIF: ["giflib/5.2.1"] GRPC: ["grpc/1.50.1"] From ddb42910c3676559f45f167be8bbb5bbc77a5302 Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Tue, 19 Sep 2023 15:34:53 -0400 Subject: [PATCH 20/29] Reenabled BerkeleyDB on Conan1 --- recipes/ncbi-cxx-toolkit-public/all/conanfile.py | 4 +++- .../all/dependencies/requirements-27.0.yml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py index 9967c24950af2..fa8f305c59397 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py +++ b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py @@ -1,4 +1,4 @@ -from conan import ConanFile +from conan import ConanFile, conan_version from conan.errors import ConanInvalidConfiguration, ConanException from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy @@ -88,6 +88,8 @@ def _tk_requirements(self): def _translate_req(self, key): if "Boost" in key: key = "Boost" + if key == "BerkeleyDB" and conan_version.major > "1": + return None if key in self._tk_requirements["disabled"].keys(): if self.settings.os in self._tk_requirements["disabled"][key]: return None diff --git a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml index 453e85aa083d6..17e87c90b0ca0 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml +++ b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml @@ -3,6 +3,7 @@ version: 27.0 requirements: BACKWARD: ["backward-cpp/1.6"] UNWIND: ["libunwind/1.6.2", "xz_utils/5.4.2"] + BerkeleyDB: ["libdb/5.3.28"] BZ2: ["bzip2/1.0.8"] GIF: ["giflib/5.2.1"] GRPC: ["grpc/1.50.1"] From 6e81261ea448a55ede02f06d15771289de4a5cc1 Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Tue, 31 Oct 2023 11:58:35 -0400 Subject: [PATCH 21/29] require xz_utils/5.4.4 --- .../all/dependencies/requirements-27.0.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml index 17e87c90b0ca0..94b819f3e5d24 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml +++ b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml @@ -2,7 +2,7 @@ version: 27.0 #---------------------------------------------------------------------------- requirements: BACKWARD: ["backward-cpp/1.6"] - UNWIND: ["libunwind/1.6.2", "xz_utils/5.4.2"] + UNWIND: ["libunwind/1.6.2", "xz_utils/5.4.4"] BerkeleyDB: ["libdb/5.3.28"] BZ2: ["bzip2/1.0.8"] GIF: ["giflib/5.2.1"] From 57f713bcafe7a1ea622f3a506c04ba93afcd7126 Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Wed, 1 Nov 2023 14:42:47 -0400 Subject: [PATCH 22/29] Require libxml2/2.11.4 --- .../all/dependencies/requirements-27.0.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml index 94b819f3e5d24..c06217f9bb1dc 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml +++ b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml @@ -16,7 +16,7 @@ requirements: PROTOBUF: [] SQLITE3: ["sqlite3/3.41.1"] TIFF: ["libtiff/4.4.0"] - XML: ["libxml2/2.10.3"] + XML: ["libxml2/2.11.4"] XSLT: ["libxslt/1.1.34"] UV: ["libuv/1.44.2"] Z: ["zlib/1.2.13"] From ccb7ba0a5ec6bc56500a27a8905cfbcda906c06a Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Mon, 6 Nov 2023 09:08:50 -0500 Subject: [PATCH 23/29] Removed print command. --- recipes/ncbi-cxx-toolkit-public/all/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py index fa8f305c59397..bacca676ec0cf 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py +++ b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py @@ -175,7 +175,6 @@ def requirements(self): pkgs = self._translate_req(req) if pkgs is not None: for pkg in pkgs: - print("Package requires ", pkg) self.requires(pkg) def validate(self): From 4237d6eb838401997678a74ed1e3e408ddb0b345 Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Fri, 2 Feb 2024 12:48:08 -0500 Subject: [PATCH 24/29] Updated conanfile and requirements --- .../ncbi-cxx-toolkit-public/all/conanfile.py | 72 ++++++++++++------- .../all/dependencies/dependencies-27.0.yml | 2 +- .../all/dependencies/requirements-27.0.yml | 4 +- 3 files changed, 48 insertions(+), 30 deletions(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py index bacca676ec0cf..00b4320e781c3 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py +++ b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py @@ -1,12 +1,14 @@ from conan import ConanFile, conan_version from conan.errors import ConanInvalidConfiguration, ConanException from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy -from conan.tools.build import check_min_cppstd, cross_building +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, replace_in_file +from conan.tools.build import check_min_cppstd, cross_building, can_run from conan.tools.scm import Version from conan.tools.cmake import CMakeDeps, CMakeToolchain, CMake, cmake_layout +from conan.tools.env import VirtualRunEnv, VirtualBuildEnv import os import yaml +import re required_conan_version = ">=1.53.0" @@ -25,14 +27,12 @@ class NcbiCxxToolkit(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], - "with_projects": ["ANY"], "with_targets": ["ANY"], "with_components": ["ANY"] } default_options = { "shared": False, "fPIC": True, - "with_projects": "", "with_targets": "", "with_components": "" } @@ -134,11 +134,13 @@ def requirements(self): _alltargets = self._parse_option(self.options.with_targets) _required_components = set() for _t in _alltargets: + _re = re.compile(_t) for _component in self._tk_dependencies["components"]: _libraries = self._tk_dependencies["libraries"][_component] - if _t in _libraries: - _required_components.add(_component) - break + for _lib in _libraries: + if _re.match(_lib) != None: + _required_components.add(_component) + break _allcomponents = self._parse_option(self.options.with_components) _required_components.update(_allcomponents) @@ -160,9 +162,8 @@ def requirements(self): if len(_required_components) == 0: _required_components.update( self._tk_dependencies["components"]) - else: - for component in _required_components: - self._componenttargets.update(self._tk_dependencies["libraries"][component]) + for component in _required_components: + self._componenttargets.update(self._tk_dependencies["libraries"][component]) requirements = set() for component in _required_components: @@ -173,7 +174,7 @@ def requirements(self): for req in requirements: pkgs = self._translate_req(req) - if pkgs is not None: + if pkgs != None: for pkg in pkgs: self.requires(pkg) @@ -184,7 +185,7 @@ def validate(self): raise ConanInvalidConfiguration("This operating system is not supported") if is_msvc(self): check_min_vs(self, 192) - if self.options.shared and is_msvc_static_runtime(self): + if self.options.shared and is_msvc_static_runtime(self) and Version(self.version) < "28": raise ConanInvalidConfiguration("This configuration is not supported") else: minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) @@ -195,46 +196,61 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - apply_conandata_patches(self) - root = os.path.join(os.getcwd(), "CMakeLists.txt") - with open(root, "w", encoding="utf-8") as f: - f.write("cmake_minimum_required(VERSION 3.15)\n") - f.write("project(ncbi-cpp)\n") - f.write("include(src/build-system/cmake/CMake.NCBItoolkit.cmake)\n") - f.write("add_subdirectory(src)\n") def generate(self): tc = CMakeToolchain(self) tc.variables["NCBI_PTBCFG_PACKAGING"] = True if self.options.shared: tc.variables["NCBI_PTBCFG_ALLOW_COMPOSITE"] = True - tc.variables["NCBI_PTBCFG_PROJECT_LIST"] = str(self.options.with_projects) + ";-app/netcache" + tc.variables["NCBI_PTBCFG_PROJECT_LIST"] = "-app/netcache" if self.options.with_targets != "": tc.variables["NCBI_PTBCFG_PROJECT_TARGETS"] = self.options.with_targets if len(self._componenttargets) != 0: tc.variables["NCBI_PTBCFG_PROJECT_COMPONENTTARGETS"] = ";".join(self._componenttargets) if is_msvc(self): tc.variables["NCBI_PTBCFG_CONFIGURATION_TYPES"] = self.settings.build_type + tc.variables["NCBI_PTBCFG_PROJECT_TAGS"] = "-demo;-sample" tc.generate() - cmdep = CMakeDeps(self) - cmdep.generate() + CMakeDeps(self).generate() + VirtualBuildEnv(self).generate() + if can_run(self): + VirtualRunEnv(self).generate(scope="build") + + def _patch_sources(self): + apply_conandata_patches(self) + if self.settings.os == "Macos": + grpc = os.path.join(self.source_folder, "src", "build-system", "cmake", "CMake.NCBIptb.grpc.cmake") + replace_in_file(self, grpc, + "COMMAND ${_cmd}", + "COMMAND ${CMAKE_COMMAND} -E env \"DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}\" ${_cmd}") + root = os.path.join(self.source_folder, "CMakeLists.txt") + with open(root, "w", encoding="utf-8") as f: + f.write("cmake_minimum_required(VERSION 3.15)\n") + f.write("project(ncbi-cpp)\n") + f.write("include(src/build-system/cmake/CMake.NCBItoolkit.cmake)\n") + f.write("add_subdirectory(src)\n") def build(self): + self._patch_sources() cmake = CMake(self) cmake.configure() # Visual Studio sometimes runs "out of heap space" - if is_msvc(self): - cmake.parallel = False +# if is_msvc(self): +# cmake.parallel = False cmake.build() def package(self): cmake = CMake(self) cmake.install() + @property + def _module_file_rel_path(self): + return os.path.join("res", "build-system", "cmake", "CMake.NCBIpkg.conan.cmake") + def package_info(self): impfile = os.path.join(self.package_folder, "res", "ncbi-cpp-toolkit.imports") with open(impfile, "r", encoding="utf-8") as f: - allexports = set(f.read().split()) + allexports = set(f.read().split()).intersection(self._componenttargets) absent = [] for component in self._tk_dependencies["components"]: c_libs = [] @@ -261,7 +277,7 @@ def package_info(self): n_reqs.update(self._tk_dependencies["requirements"][lib]) for req in n_reqs: pkgs = self._translate_req(req) - if pkgs is not None: + if pkgs != None: for pkg in pkgs: pkg = pkg[:pkg.find("/")] ref = pkg + "::" + pkg @@ -292,4 +308,6 @@ def package_info(self): self.cpp_info.components["core"].system_libs = ["dl", "c", "m", "pthread", "resolv"] self.cpp_info.components["core"].frameworks = ["ApplicationServices"] self.cpp_info.components["core"].builddirs.append("res") - self.cpp_info.components["core"].build_modules = ["res/build-system/cmake/CMake.NCBIpkg.conan.cmake"] + build_modules = [self._module_file_rel_path] + self.cpp_info.components["core"].build_modules = build_modules + self.cpp_info.set_property("cmake_build_modules", build_modules) diff --git a/recipes/ncbi-cxx-toolkit-public/all/dependencies/dependencies-27.0.yml b/recipes/ncbi-cxx-toolkit-public/all/dependencies/dependencies-27.0.yml index d90b228bb766d..1b21b391dc7fd 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/dependencies/dependencies-27.0.yml +++ b/recipes/ncbi-cxx-toolkit-public/all/dependencies/dependencies-27.0.yml @@ -175,7 +175,7 @@ libraries: ] web: ["xsoap_server", "xsoap", "ncbi_web", - "xcgi_redirect","xcgi","xhtml", "xfcgi" + "xcgi_redirect","xcgi","xhtml" ] #---------------------------------------------------------------------------- requirements: diff --git a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml index c06217f9bb1dc..540b64e19d665 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml +++ b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-27.0.yml @@ -2,7 +2,7 @@ version: 27.0 #---------------------------------------------------------------------------- requirements: BACKWARD: ["backward-cpp/1.6"] - UNWIND: ["libunwind/1.6.2", "xz_utils/5.4.4"] + UNWIND: ["libunwind/1.6.2"] BerkeleyDB: ["libdb/5.3.28"] BZ2: ["bzip2/1.0.8"] GIF: ["giflib/5.2.1"] @@ -16,7 +16,7 @@ requirements: PROTOBUF: [] SQLITE3: ["sqlite3/3.41.1"] TIFF: ["libtiff/4.4.0"] - XML: ["libxml2/2.11.4"] + XML: ["libxml2/2.11.6"] XSLT: ["libxslt/1.1.34"] UV: ["libuv/1.44.2"] Z: ["zlib/1.2.13"] From dbea166e332af982274694cf5a52a7b194b5a691 Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Fri, 5 Apr 2024 14:45:32 -0400 Subject: [PATCH 25/29] Added v28.0.0 --- .../ncbi-cxx-toolkit-public/all/conandata.yml | 3 + .../all/dependencies/dependencies-28.0.yml | 230 ++++++++++++++++++ .../all/dependencies/requirements-28.0.yml | 27 ++ recipes/ncbi-cxx-toolkit-public/config.yml | 2 + 4 files changed, 262 insertions(+) create mode 100755 recipes/ncbi-cxx-toolkit-public/all/dependencies/dependencies-28.0.yml create mode 100755 recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-28.0.yml diff --git a/recipes/ncbi-cxx-toolkit-public/all/conandata.yml b/recipes/ncbi-cxx-toolkit-public/all/conandata.yml index e13ff3ab11ab9..c4cc028da9683 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conandata.yml +++ b/recipes/ncbi-cxx-toolkit-public/all/conandata.yml @@ -2,6 +2,9 @@ sources: "27.0.0": url: "https://github.com/ncbi/ncbi-cxx-toolkit-public/archive/refs/tags/release-27.0.0.tar.gz" sha256: "c8fb3f99c6fce4f170b381f3a7789c76a2ff1c23c094c9852e2e3de1fdc57277" + "28.0.0": + url: "https://github.com/ncbi/ncbi-cxx-toolkit-public/archive/refs/tags/release-28.0.0.tar.gz" + sha256: "f0300db41849bbaf690c1dfb9080f3e441fc617a004283acfb2b7b25b32ff885" patches: "27.0.0": diff --git a/recipes/ncbi-cxx-toolkit-public/all/dependencies/dependencies-28.0.yml b/recipes/ncbi-cxx-toolkit-public/all/dependencies/dependencies-28.0.yml new file mode 100755 index 0000000000000..1ead5169d86b4 --- /dev/null +++ b/recipes/ncbi-cxx-toolkit-public/all/dependencies/dependencies-28.0.yml @@ -0,0 +1,230 @@ +version: 28.0 +#---------------------------------------------------------------------------- +components: + - algo + - algo-ms + - algo-structure + - align-format + - bamread + - blast + - core + - dbapi + - eutils + - grpc + - image + - loader-asncache + - loader-bam + - loader-blastdb + - loader-cdd + - loader-genbank + - loader-lds2 + - loader-snp + - loader-sra + - loader-wgs + - loaders + - objects + - psg-client + - seqext + - sqlitewrapp + - sraread + - xmlwrapp + - web +#---------------------------------------------------------------------------- +libraries: + algo: ["ncbi_algo", + "cobalt","phytree_format","prosplign","proteinkmer","xalgoalignsplign", + "xalgocontig_assembly","xprimer","xalgoalignnw","xalgoalignutil", + "xblastformat","xblast","xalgoblastdbindex","xalgodustmask", + "xalgoseqqa","xalgognomon","xalgophytree","xalgosegmask", + "xalgoseq","xalgotext","xalgowinmask","composition_adjustment", + "fastme","utrtprof" + ] + algo-ms: ["ncbi_algo_ms", + "xomssa","omssa","pepXML" + ] + algo-structure: + ["ncbi_algo_structure", + "xbma_refiner","xcd_utils","xstruct_util","xstruct_dp","xstruct_thread" + ] + align-format: + ["xalntool", + "ncbi_align_format", + "align_format" + ] + bamread: ["bamread"] + blast: ["xngalign", "igblast", + "vdb2blast", "blast_sra_input", + "ncbi_blastinput", + "blastinput", + "xmergetree", + "xalgoblastdbindex_search", + "gumbelparams" + ] + core: ["xconnext", + "ncbi_core", + "xconnserv","xcompress","xthrserv","sequtil","xconnect", + "xdiff","xqueryparse","xregexp","xser","xutil","tables","xncbi", + "xxconnect2" + ] + dbapi: ["sdbapi", + "ncbi_xdbapi_ftds","ncbi_xdbapi_ftds100", + "ct_ftds100","tds_ftds100", + "ncbi_dbapi", + "dbapi", + "dbapi_util_blobstore", + "ncbi_dbapi_driver", + "dbapi_driver" + ] + eutils: ["eutils_client", + "ncbi_eutils", + "eutils", "egquery", "ehistory", "einfo", "elink", + "epost", "esearch", "espell", "esummary", + "linkout", "uilist" + ] + grpc: ["grpc_integration"] + image: ["ncbi_image", + "ximage" + ] + loader-asncache: + [ + "ncbi_xloader_asn_cache", + "asn_cache", + "ncbi_xcache_bdb", + "ncbi_bdb", + "bdb" + ] + loader-bam: ["ncbi_xloader_bam"] + loader-blastdb: + ["ncbi_xloader_blastdb_rmt", + "ncbi_xloader_blastdb" + ] + loader-cdd: + ["ncbi_xloader_cdd", + "cdd_access" + ] + loader-genbank: + [ + "ncbi_xobjsimple", + "xobjsimple", + "ncbi_xloader_genbank", + "ncbi_xreader_cache", + "ncbi_xreader_gicache", + "ncbi_xreader_id1", + "ncbi_xreader_id2", + "ncbi_xreader_pubseqos", + "ncbi_xreader_pubseqos2", + "ncbi_xreader", + "eMyNCBI_result" + ] + loader-lds2: + ["ncbi_xloader_lds2", + "ncbi_lds2", + "lds2" + ] + loader-snp: ["ncbi_xloader_snp", "dbsnp_ptis"] + loader-sra: ["ncbi_xloader_sra", "ncbi_xloader_csra"] + loader-wgs: ["ncbi_xloader_vdbgraph", "ncbi_xloader_wgs"] + loaders: ["xflatfile", + "data_loaders_util", + "ncbi_xloader_patcher" + ] + objects: ["searchbyrsid", + "ncbi_trackmgr", + "gbproj","trackmgrcli","trackmgr", + "ncbi_mmdb", + "ncbimime","cdd","cn3d","mmdb", + "pcassay2", + "ncbi_misc", + "proj","pcassay","pcsubstance","entrez2cli","biotree", + "access","docsum","entrez2","entrezgene","featdef","gbseq", + "genesbyloc","insdseq","mim","objcoords","objprt","remapcli", + "remap","tinyseq", + "macro", + "gencoll_client", + "homologene", + "local_taxon", + "ncbi_seq", + "blastdb","genome_collection","xnetblastcli","xnetblast","scoremat", + "seqtest","taxon1","taxon3","variation","seqset","seq","seqedit","submit", + "blastxml","blastxml2","seqcode", + "ncbi_pub", + "mlacli","mla","medlars","pub","pubmed","medline","biblio", + "ncbi_general", + "generalasn", + "efetch" + ] + psg-client: ["psg_client", + "psg_protobuf" + ] + seqext: ["gene_info_writer", + "ncbi_validator", + "xvalidate", + "ncbi_xdiscrepancy", + "xdiscrepancy", + "ncbi_seqext", + "blast_services","blastdb_format","gene_info","id1cli","id1","id2cli","id2", + "id2_split","writedb","seqdb","seqmasks_io","seqsplit","snputil","uudutil", + "valerr","valid","variation_utils","xformat","xalnmgr","xcleanup", + "xobjedit","xobjreadex","xobjwrite","xobjread","xlogging","xobjimport", + "xobjmanip","xunittestutil","xobjutil","xobjmgr", + ] + sqlitewrapp: ["sqlitewrapp"] + sraread: ["sraread"] + xmlwrapp: ["xmlreaders", + "xmlwrapp" + ] + web: ["xsoap_server", "xsoap", + "ncbi_web", + "xcgi_redirect","xcgi","xhtml" + ] +#---------------------------------------------------------------------------- +requirements: + bamread: ["VDB"] + bdb: ["BerkeleyDB"] + blast_sra_input: ["VDB"] + dbsnp_ptis: ["GRPC"] + grpc_integration: ["GRPC"] + psg_protobuf: ["GRPC"] + seqdb: ["LMDB"] + sqlitewrapp: ["SQLITE3"] + sraread: ["VDB"] + vdb2blast: ["VDB"] + writedb: ["LMDB"] + xcompress: ["Z", "BZ2", "LZO", "ZSTD"] + xregexp: ["PCRE"] + ximage: ["Z", "JPEG", "PNG", "GIF", "TIFF"] + xmlwrapp: ["XML", "XSLT"] + xncbi: ["BACKWARD", "UNWIND"] + xconnext: ["NCBICRYPT"] + xxconnect2: ["UV", "NGHTTP2"] + xfcgi: ["FASTCGI"] +#---------------------------------------------------------------------------- +dependencies: + algo: ["align-format","sqlitewrapp"] + algo-ms: ["algo"] + algo-structure: ["algo","objects"] + align-format: ["loader-genbank", "web"] + bamread: ["objects"] + blast: ["loader-blastdb", "algo", "sraread"] + core: [] + dbapi: ["core"] + eutils: ["objects","xmlwrapp"] + grpc: ["core"] + image: ["core"] + loader-asncache: ["seqext"] + loader-bam: ["bamread", "seqext"] + loader-blastdb: ["seqext"] + loader-cdd: ["seqext"] + loader-genbank: ["psg-client", "dbapi"] + loader-lds2: ["seqext", "sqlitewrapp"] + loader-snp: ["sraread", "grpc"] + loader-sra: ["sraread"] + loader-wgs: ["sraread"] + loaders: ["loader-asncache", "loader-blastdb", "loader-genbank", "loader-lds2"] + objects: ["sqlitewrapp","core"] + psg-client: ["seqext"] + seqext: ["eutils", "objects"] + sqlitewrapp: ["core"] + sraread: ["seqext"] + xmlwrapp: ["core"] + web: ["core"] diff --git a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-28.0.yml b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-28.0.yml new file mode 100755 index 0000000000000..2a58ce90ed9ad --- /dev/null +++ b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-28.0.yml @@ -0,0 +1,27 @@ +version: 28.0 +#---------------------------------------------------------------------------- +requirements: + BACKWARD: ["backward-cpp/1.6"] + UNWIND: ["libunwind/[>=1.6.2 <=1.8.0]"] + BerkeleyDB: ["libdb/5.3.28"] + BZ2: ["bzip2/1.0.8"] + GIF: ["giflib/5.2.1"] + GRPC: ["grpc/[>=1.50.1 <=1.54.3]"] + JPEG: ["libjpeg/9e"] + LMDB: ["lmdb/[>=0.9.29 <=0.9.31]"] + LZO: ["lzo/2.10"] + NGHTTP2: ["libnghttp2/[>=1.51.0 <=1.59.0]"] + PCRE: ["pcre/8.45"] + PNG: ["libpng/[>=1.6.37 <=1.6.43]"] + SQLITE3: ["sqlite3/[>=3.40.0 <=3.45.2]"] + TIFF: ["libtiff/[>=4.3.0 <=4.5.0]"] + XML: ["libxml2/[>=2.11.4 <=2.11.6]"] + XSLT: ["libxslt/[>1.1.34 <=1.1.37]"] + UV: ["libuv/[>=1.45.0 <=1.48.0]"] + Z: ["zlib/[>=1.2.11 <2]"] + ZSTD: ["zstd/[>=1.5.2 <=1.5.5]"] + +disabled: + BACKWARD: ["Windows", "Macos"] + UNWIND: ["Windows", "Macos"] + BerkeleyDB: ["Windows"] diff --git a/recipes/ncbi-cxx-toolkit-public/config.yml b/recipes/ncbi-cxx-toolkit-public/config.yml index 59c15151743f7..2c6dac5310324 100644 --- a/recipes/ncbi-cxx-toolkit-public/config.yml +++ b/recipes/ncbi-cxx-toolkit-public/config.yml @@ -3,3 +3,5 @@ versions: folder: "26" "27.0.0": folder: "all" + "28.0.0": + folder: "all" From fecf6a0591f569f138dc3a6b15a921dcc92f88a3 Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Mon, 8 Apr 2024 10:45:50 -0400 Subject: [PATCH 26/29] Removed v27 and unused folders --- recipes/ncbi-cxx-toolkit-public/all/conandata.yml | 12 ------------ recipes/ncbi-cxx-toolkit-public/all/conanfile.py | 4 +++- recipes/ncbi-cxx-toolkit-public/config.yml | 2 -- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/conandata.yml b/recipes/ncbi-cxx-toolkit-public/all/conandata.yml index c4cc028da9683..f2aed2102e233 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conandata.yml +++ b/recipes/ncbi-cxx-toolkit-public/all/conandata.yml @@ -1,16 +1,4 @@ sources: - "27.0.0": - url: "https://github.com/ncbi/ncbi-cxx-toolkit-public/archive/refs/tags/release-27.0.0.tar.gz" - sha256: "c8fb3f99c6fce4f170b381f3a7789c76a2ff1c23c094c9852e2e3de1fdc57277" "28.0.0": url: "https://github.com/ncbi/ncbi-cxx-toolkit-public/archive/refs/tags/release-28.0.0.tar.gz" sha256: "f0300db41849bbaf690c1dfb9080f3e441fc617a004283acfb2b7b25b32ff885" - -patches: - "27.0.0": - - patch_file: "patches/27.0.0-compiler.patch" - patch_description: "Corrected version check of GCC compiler" - patch_type: "portability" - - patch_file: "patches/27.0.0-install.patch" - patch_description: "Replaced hard-coded configuration with cmake generator expression" - patch_type: "conan" diff --git a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py index 00b4320e781c3..a9c673ec7ffd1 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py +++ b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile, conan_version from conan.errors import ConanInvalidConfiguration, ConanException from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, replace_in_file +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, replace_in_file, rmdir from conan.tools.build import check_min_cppstd, cross_building, can_run from conan.tools.scm import Version from conan.tools.cmake import CMakeDeps, CMakeToolchain, CMake, cmake_layout @@ -218,6 +218,8 @@ def generate(self): def _patch_sources(self): apply_conandata_patches(self) + rmdir(self, os.path.join(self.source_folder, "src", "build-system", "cmake", "unused")) + rmdir(self, os.path.join(self.source_folder, "src", "build-system", "cmake", "modules")) if self.settings.os == "Macos": grpc = os.path.join(self.source_folder, "src", "build-system", "cmake", "CMake.NCBIptb.grpc.cmake") replace_in_file(self, grpc, diff --git a/recipes/ncbi-cxx-toolkit-public/config.yml b/recipes/ncbi-cxx-toolkit-public/config.yml index 2c6dac5310324..76e66ab0457ed 100644 --- a/recipes/ncbi-cxx-toolkit-public/config.yml +++ b/recipes/ncbi-cxx-toolkit-public/config.yml @@ -1,7 +1,5 @@ versions: "26.0.1": folder: "26" - "27.0.0": - folder: "all" "28.0.0": folder: "all" From 946539d06481cce57cceb8050491a3f508879a1f Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Fri, 30 Aug 2024 11:49:08 -0400 Subject: [PATCH 27/29] Added GRPC dependencies --- .../all/dependencies/requirements-28.0.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-28.0.yml b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-28.0.yml index 2a58ce90ed9ad..cccb548e62989 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-28.0.yml +++ b/recipes/ncbi-cxx-toolkit-public/all/dependencies/requirements-28.0.yml @@ -6,7 +6,7 @@ requirements: BerkeleyDB: ["libdb/5.3.28"] BZ2: ["bzip2/1.0.8"] GIF: ["giflib/5.2.1"] - GRPC: ["grpc/[>=1.50.1 <=1.54.3]"] + GRPC: ["grpc/[>=1.50.1 <=1.54.3]", "abseil/20230802.1", "protobuf/3.21.12"] JPEG: ["libjpeg/9e"] LMDB: ["lmdb/[>=0.9.29 <=0.9.31]"] LZO: ["lzo/2.10"] From 15284ba8dbc309a10494e7460cc8b6bd8740812c Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Fri, 30 Aug 2024 11:49:58 -0400 Subject: [PATCH 28/29] Correct code generation on Linux --- recipes/ncbi-cxx-toolkit-public/all/conanfile.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py index a9c673ec7ffd1..da1e727902c80 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py +++ b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py @@ -220,11 +220,15 @@ def _patch_sources(self): apply_conandata_patches(self) rmdir(self, os.path.join(self.source_folder, "src", "build-system", "cmake", "unused")) rmdir(self, os.path.join(self.source_folder, "src", "build-system", "cmake", "modules")) + grpc = os.path.join(self.source_folder, "src", "build-system", "cmake", "CMake.NCBIptb.grpc.cmake") if self.settings.os == "Macos": - grpc = os.path.join(self.source_folder, "src", "build-system", "cmake", "CMake.NCBIptb.grpc.cmake") replace_in_file(self, grpc, "COMMAND ${_cmd}", "COMMAND ${CMAKE_COMMAND} -E env \"DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}\" ${_cmd}") + elif self.settings.os == "Linux": + replace_in_file(self, grpc, + "COMMAND ${_cmd}", + "COMMAND ${CMAKE_COMMAND} -E env \"LD_LIBRARY_PATH=$:$ENV{LD_LIBRARY_PATH}\" ${_cmd}") root = os.path.join(self.source_folder, "CMakeLists.txt") with open(root, "w", encoding="utf-8") as f: f.write("cmake_minimum_required(VERSION 3.15)\n") From 47c18d2fc8eb5c1709b4b4bea7683d0ec98f0f4b Mon Sep 17 00:00:00 2001 From: "Gourianov, Andrei" Date: Tue, 3 Sep 2024 13:17:23 -0400 Subject: [PATCH 29/29] Corrected settings --- recipes/ncbi-cxx-toolkit-public/all/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py index da1e727902c80..0f7fb8a843688 100755 --- a/recipes/ncbi-cxx-toolkit-public/all/conanfile.py +++ b/recipes/ncbi-cxx-toolkit-public/all/conanfile.py @@ -315,5 +315,6 @@ def package_info(self): self.cpp_info.components["core"].frameworks = ["ApplicationServices"] self.cpp_info.components["core"].builddirs.append("res") build_modules = [self._module_file_rel_path] - self.cpp_info.components["core"].build_modules = build_modules + self.cpp_info.components["core"].build_modules["cmake_find_package"] = build_modules + self.cpp_info.components["core"].build_modules["cmake_find_package_multi"] = build_modules self.cpp_info.set_property("cmake_build_modules", build_modules)