-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into migrate/libid3tag
- Loading branch information
Showing
129 changed files
with
2,657 additions
and
788 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
versions: | ||
"4.3.0": | ||
folder: all | ||
"4.2.0": | ||
folder: all | ||
"4.1.0": | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
sources: | ||
"2.4.6.4": | ||
url: "https://proj-clhep.web.cern.ch/proj-clhep/dist1/clhep-2.4.6.4.tgz" | ||
sha256: "49c89330f1903ef707d3c5d79c16a7c5a6f2c90fc290e2034ee3834809489e57" | ||
"2.4.1.3": | ||
url: "https://proj-clhep.web.cern.ch/proj-clhep/dist1/clhep-2.4.1.3.tgz" | ||
sha256: "27c257934929f4cb1643aa60aeaad6519025d8f0a1c199bc3137ad7368245913" | ||
patches: | ||
"2.4.6.4": | ||
- patch_file: "patches/fix-cmake-2_4_6_4.patch" | ||
patch_description: The CLHEP build system builds BOTH shared and static by default, change that behaviour | ||
patch_type: conan | ||
- patch_file: "patches/msvc-2015-no-SFINAE.patch" | ||
patch_description: work around a compiler bug in MSVC 2015 | ||
patch_type: portability | ||
"2.4.1.3": | ||
- patch_file: "patches/fix-cmake.patch" | ||
patch_description: The CLHEP build system builds BOTH shared and static by default, change that behaviour | ||
patch_type: conan | ||
- patch_file: "patches/mingw-support.patch" | ||
patch_description: allow CLHEP to build and link properly under mingw environments | ||
patch_type: portability | ||
- patch_file: "patches/msvc-2015-no-SFINAE.patch" | ||
patch_description: work around a compiler bug in MSVC 2015 | ||
patch_type: portability |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- a/CLHEP/CMakeLists.txt | ||
+++ b/CLHEP/CMakeLists.txt | ||
@@ -121,10 +121,8 @@ add_subdirectory(RefCount) | ||
add_subdirectory(Exceptions) | ||
|
||
# libCLHEP.a and libCLHEP.so | ||
-clhep_build_libclhep( ${CLHEP_libraries} ) | ||
|
||
# provide tools for other packages to include CLHEP easily | ||
-clhep_toolchain() | ||
|
||
# - Build docucumentation if required | ||
if(CLHEP_BUILD_DOCS) | ||
@@ -151,4 +149,3 @@ if(CLHEP_BUILD_DOCS) | ||
endif() | ||
|
||
# Custom Packaging | ||
-include(ClhepPackaging) | ||
--- a/CLHEP/cmake/Modules/ClhepBuildTest.cmake | ||
+++ b/CLHEP/cmake/Modules/ClhepBuildTest.cmake | ||
@@ -17,6 +17,8 @@ include(ClhepParseArgs) | ||
|
||
|
||
macro( clhep_test testname ) | ||
+# disable tests | ||
+if(FALSE) | ||
clhep_parse_args( CTST "LIBS;DEPENDS" "SIMPLE;FAIL;NOLIB" ${ARGN}) | ||
|
||
# automake/autoconf variables for ${testname}.sh.in | ||
@@ -68,4 +70,5 @@ macro( clhep_test testname ) | ||
endif() | ||
endif() | ||
|
||
+endif() | ||
endmacro( clhep_test ) | ||
--- a/CLHEP/cmake/Modules/ClhepBuildLibrary.cmake | ||
+++ b/CLHEP/cmake/Modules/ClhepBuildLibrary.cmake | ||
@@ -30,29 +30,24 @@ macro(clhep_build_library package) | ||
endif() | ||
|
||
# Add the libraries and set properties | ||
- ADD_LIBRARY(${package} SHARED ${CLHEP_${package}_SOURCES}) | ||
- ADD_LIBRARY(${package}S STATIC ${CLHEP_${package}_SOURCES}) | ||
+ # Build shared or static, not both, because: | ||
+ # - slower build | ||
+ # - lot of issues because output names are the same + msvc shared is broken | ||
+ ADD_LIBRARY(${package} ${CLHEP_${package}_SOURCES}) | ||
SET_TARGET_PROPERTIES (${package} | ||
PROPERTIES | ||
OUTPUT_NAME CLHEP-${package}-${VERSION} | ||
) | ||
- SET_TARGET_PROPERTIES(${package}S | ||
- PROPERTIES | ||
- OUTPUT_NAME CLHEP-${package}-${VERSION} | ||
- ) | ||
|
||
# Do not add -Dname_EXPORTS to the command-line when building files in this | ||
# target. Doing so is actively harmful for the modules build because it | ||
# creates extra module variants, and not useful because we don't use these | ||
# macros. | ||
SET_TARGET_PROPERTIES(${package} PROPERTIES DEFINE_SYMBOL "") | ||
- SET_TARGET_PROPERTIES(${package}S PROPERTIES DEFINE_SYMBOL "") | ||
- | ||
target_link_libraries(${package} ${package_library_list} ) | ||
- target_link_libraries(${package}S ${package_library_list_static} ) | ||
|
||
# Install the libraries | ||
- INSTALL (TARGETS ${package} ${package}S | ||
+ INSTALL (TARGETS ${package} | ||
EXPORT CLHEPLibraryDepends | ||
RUNTIME DESTINATION bin | ||
LIBRARY DESTINATION lib${LIB_SUFFIX} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
versions: | ||
"2.4.6.4": | ||
folder: all | ||
"2.4.1.3": | ||
folder: all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
versions: | ||
"0.60.7": | ||
folder: "all" | ||
"0.60.6": | ||
folder: "all" | ||
"0.60.3": | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
versions: | ||
"cci.20231017": | ||
folder: all | ||
"cci.20230103": | ||
folder: all | ||
"cci.20221024": | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
sources: | ||
"cci.20231025": | ||
url: "https://github.com/hanickadot/cthash/archive/21d581e0a6bd7040c282af1e43faab9d44f47744.tar.gz" | ||
sha256: "03bf073f0c8a362d26186dab39482418aaf59a1bc17d92ec6b49053147c0fba0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
from conan import ConanFile | ||
from conan.errors import ConanInvalidConfiguration | ||
from conan.tools.build import check_min_cppstd | ||
from conan.tools.files import get, copy | ||
from conan.tools.layout import basic_layout | ||
from conan.tools.scm import Version | ||
from conan.tools.microsoft import is_msvc | ||
import os | ||
|
||
|
||
required_conan_version = ">=1.53.0" | ||
|
||
|
||
class CtHashConan(ConanFile): | ||
name = "cthash" | ||
description = "constexpr implementation of SHA-2 and SHA-3 family of hashes" | ||
license = "Apache-2.0" | ||
url = "https://github.com/conan-io/conan-center-index" | ||
homepage = "https://github.com/hanickadot/cthash/" | ||
topics = ("constexpr", "xxhash", "sha", "header-only") | ||
package_type = "header-library" | ||
settings = "os", "arch", "compiler", "build_type" | ||
no_copy_source = True | ||
|
||
@property | ||
def _min_cppstd(self): | ||
return 20 | ||
|
||
@property | ||
def _compilers_minimum_version(self): | ||
return { | ||
"Visual Studio": "16", | ||
"msvc": "193", | ||
"gcc": "12.2", | ||
"clang": "15.0.7", | ||
"apple-clang": "14", | ||
} | ||
|
||
def layout(self): | ||
basic_layout(self, src_folder="src") | ||
|
||
def package_id(self): | ||
self.info.clear() | ||
|
||
def validate(self): | ||
if is_msvc(self): | ||
raise ConanInvalidConfiguration(f"{self.ref} doesn't support MSVC.") | ||
|
||
if self.settings.compiler.get_safe("cppstd"): | ||
check_min_cppstd(self, self._min_cppstd) | ||
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"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." | ||
) | ||
|
||
def source(self): | ||
get(self, **self.conan_data["sources"][self.version], strip_root=True) | ||
|
||
def package(self): | ||
copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) | ||
copy( | ||
self, | ||
pattern="*.hpp", | ||
dst=os.path.join(self.package_folder, "include"), | ||
src=os.path.join(self.source_folder, "include"), | ||
) | ||
|
||
def package_info(self): | ||
self.cpp_info.bindirs = [] | ||
self.cpp_info.libdirs = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
project(test_package LANGUAGES CXX) | ||
|
||
find_package(cthash REQUIRED CONFIG) | ||
|
||
add_executable(${PROJECT_NAME} test_package.cpp) | ||
target_link_libraries(${PROJECT_NAME} PRIVATE cthash::cthash) | ||
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
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", "VirtualRunEnv" | ||
test_type = "explicit" | ||
|
||
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.bindirs[0], "test_package") | ||
self.run(bin_path, env="conanrun") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include <iostream> | ||
#include "cthash/cthash.hpp" | ||
|
||
using namespace cthash::literals; | ||
|
||
int main(void) { | ||
constexpr auto my_hash = cthash::sha3_256{}.update("hello there!").final(); | ||
|
||
std::cout << my_hash << std::endl; | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
versions: | ||
"cci.20231025": | ||
folder: all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
cmake_minimum_required(VERSION 3.0) | ||
cmake_minimum_required(VERSION 3.12) | ||
project(conan_detours CXX) | ||
|
||
include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") | ||
conan_basic_setup(TARGETS) | ||
set(SOURCES_DIR ${CMAKE_CURRENT_LIST_DIR}/src) | ||
|
||
file(GLOB DETOURS_SOURCES source_subfolder/src/*.cpp) | ||
file(GLOB DETOURS_SOURCES ${SOURCES_DIR}/src/*.cpp) | ||
list(REMOVE_ITEM DETOURS_SOURCES | ||
"${CMAKE_CURRENT_SOURCE_DIR}/source_subfolder/src/uimports.cpp" | ||
"${SOURCES_DIR}/src/uimports.cpp" | ||
) | ||
file(GLOB DETOURS_HEADERS source_subfolder/src/*.h) | ||
file(GLOB DETOURS_HEADERS ${SOURCES_DIR}/src/*.h) | ||
add_library(detours STATIC ${DETOURS_SOURCES} ${DETOURS_HEADERS}) | ||
|
||
include(GNUInstallDirs) | ||
install(TARGETS detours | ||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
) | ||
install(TARGETS detours) | ||
install(FILES ${DETOURS_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") |
Oops, something went wrong.