mirror of
https://github.com/conan-io/conan-center-index.git
synced 2025-04-30 15:56:41 +00:00
Compare commits
3 Commits
bfdc0c3619
...
18e2962105
Author | SHA1 | Date | |
---|---|---|---|
18e2962105 | |||
7d9efb76c6 | |||
05f57366be |
@ -1,4 +1,7 @@
|
||||
sources:
|
||||
"2.17.1":
|
||||
url: "https://github.com/danmar/cppcheck/archive/2.17.1.tar.gz"
|
||||
sha256: "bfd681868248ec03855ca7c2aea7bcb1f39b8b18860d76aec805a92a967b966c"
|
||||
"2.17.0":
|
||||
url: "https://github.com/danmar/cppcheck/archive/2.17.0.tar.gz"
|
||||
sha256: "5a639adf8d5f2520a280eb0f0fc25605cd8a3d4336a27f4a3e3e0f0c0c9789da"
|
||||
|
@ -1,4 +1,6 @@
|
||||
versions:
|
||||
"2.17.1":
|
||||
folder: all
|
||||
"2.17.0":
|
||||
folder: all
|
||||
"2.16.2":
|
||||
|
File diff suppressed because it is too large
Load Diff
4
recipes/jtckdint/all/conandata.yml
Normal file
4
recipes/jtckdint/all/conandata.yml
Normal file
@ -0,0 +1,4 @@
|
||||
sources:
|
||||
"1.0":
|
||||
url: "https://github.com/jart/jtckdint/archive/refs/tags/1.0.tar.gz"
|
||||
sha256: "a117f12bfe41f17d947c8ccc122d18b162d634c5ae9059391a6d36cee83a000f"
|
37
recipes/jtckdint/all/conanfile.py
Normal file
37
recipes/jtckdint/all/conanfile.py
Normal file
@ -0,0 +1,37 @@
|
||||
from conan import ConanFile
|
||||
from conan.tools.build import check_min_cppstd
|
||||
from conan.tools.files import copy, get
|
||||
from conan.tools.layout import basic_layout
|
||||
import os
|
||||
|
||||
|
||||
required_conan_version = ">=2.0"
|
||||
|
||||
|
||||
class JtckdintConan(ConanFile):
|
||||
name = "jtckdint"
|
||||
description = "C23 Checked Arithmetic"
|
||||
license = "ISC"
|
||||
url = "https://github.com/conan-io/conan-center-index"
|
||||
homepage = "https://github.com/jart/jtckdint"
|
||||
topics = ("integer", "checked", "arithmetic", "header-only")
|
||||
package_type = "header-library"
|
||||
settings = "os", "arch", "compiler", "build_type"
|
||||
no_copy_source = True
|
||||
|
||||
def layout(self):
|
||||
basic_layout(self, src_folder="src")
|
||||
|
||||
def package_id(self):
|
||||
self.info.clear()
|
||||
|
||||
def source(self):
|
||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
||||
|
||||
def package(self):
|
||||
copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses"))
|
||||
copy(self, "*.h", self.source_folder, os.path.join(self.package_folder, "include"))
|
||||
|
||||
def package_info(self):
|
||||
self.cpp_info.bindirs = []
|
||||
self.cpp_info.libdirs = []
|
8
recipes/jtckdint/all/test_package/CMakeLists.txt
Normal file
8
recipes/jtckdint/all/test_package/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
project(test_package LANGUAGES C)
|
||||
|
||||
find_package(jtckdint REQUIRED CONFIG)
|
||||
|
||||
add_executable(${PROJECT_NAME} test_package.c)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE jtckdint::jtckdint)
|
||||
target_compile_features(${PROJECT_NAME} PRIVATE c_std_11)
|
25
recipes/jtckdint/all/test_package/conanfile.py
Normal file
25
recipes/jtckdint/all/test_package/conanfile.py
Normal file
@ -0,0 +1,25 @@
|
||||
from conan import ConanFile
|
||||
from conan.tools.build import can_run
|
||||
from conan.tools.cmake import cmake_layout, CMake
|
||||
import os
|
||||
|
||||
|
||||
class TestPackageConan(ConanFile):
|
||||
settings = "os", "arch", "compiler", "build_type"
|
||||
generators = "CMakeDeps", "CMakeToolchain"
|
||||
|
||||
def layout(self):
|
||||
cmake_layout(self)
|
||||
|
||||
def requirements(self):
|
||||
self.requires(self.tested_reference_str)
|
||||
|
||||
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.bindir, "test_package")
|
||||
self.run(bin_path, env="conanrun")
|
11
recipes/jtckdint/all/test_package/test_package.c
Normal file
11
recipes/jtckdint/all/test_package/test_package.c
Normal file
@ -0,0 +1,11 @@
|
||||
#include <stdint.h>
|
||||
#include "jtckdint.h"
|
||||
|
||||
int main(void) {
|
||||
uint32_t c;
|
||||
int32_t a = 0x7fffffff;
|
||||
int32_t b = 2;
|
||||
ckd_add(&c, a, b);
|
||||
|
||||
return 0;
|
||||
}
|
3
recipes/jtckdint/config.yml
Normal file
3
recipes/jtckdint/config.yml
Normal file
@ -0,0 +1,3 @@
|
||||
versions:
|
||||
"1.0":
|
||||
folder: all
|
Reference in New Issue
Block a user