Skip to content

Commit

Permalink
Merge branch 'master' into migrate/qt-advanced-docking-system
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur authored Nov 7, 2023
2 parents 6dd5614 + 0077d76 commit 637e7e9
Show file tree
Hide file tree
Showing 451 changed files with 8,989 additions and 3,169 deletions.
7 changes: 7 additions & 0 deletions .c3i/authorized_users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1252,3 +1252,10 @@ authorized_users:
- Subash-Lamichhane
- rezvee6
- SpiffGreen
- hegyizs
- kkloberdanz
- martin-olivier
- lucaskdc
- fnadeau
- '0x5ea1ed'
- Kischy
13 changes: 13 additions & 0 deletions .c3i/conan_v2_ready_references.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ required_for_references:
- aaplus
- abseil
- absent
- acado
- access_private
- acl
- ada
Expand Down Expand Up @@ -259,6 +260,7 @@ required_for_references:
- deco
- di
- dice-template-library
- directx-headers
- dirent
- discount
- djinni-generator
Expand Down Expand Up @@ -305,13 +307,15 @@ required_for_references:
- enhex-generic_serialization
- enhex-strong_type
- enkits
- ensmallen
- entityx
- entt
- enum-flags
- erikzenker-hsm
- erkir
- etc2comp
- eternal
- ethash
- etl
- evmc
- exiv2
Expand Down Expand Up @@ -873,6 +877,7 @@ required_for_references:
- ode
- ogdf
- ogg
- ohnet
- ois
- onedpl
- onetbb
Expand Down Expand Up @@ -912,6 +917,7 @@ required_for_references:
- opentelemetry-cpp
- opentelemetry-proto
- opentracing-cpp
- openvino
- openxlsx
- optional-lite
- opus
Expand All @@ -920,6 +926,7 @@ required_for_references:
- osqp
- out_ptr
- outcome
- ozz-animation
- p-ranav-glob
- paho-mqtt-c
- paho-mqtt-cpp
Expand Down Expand Up @@ -1007,6 +1014,7 @@ required_for_references:
- qpoases
- qr-code-generator
- qt
- qtawesome
- quantlib
- quaternions
- quazip
Expand Down Expand Up @@ -1091,11 +1099,13 @@ required_for_references:
- seqan3
- serd
- serdepp
- serf
- serial
- sfml
- shapelib
- shield
- si
- signals-light
- sigslot
- simde
- simdjson
Expand Down Expand Up @@ -1140,6 +1150,7 @@ required_for_references:
- status-value-lite
- stb
- stc
- stdgpu
- stduuid
- stlab
- strawberryperl
Expand Down Expand Up @@ -1297,6 +1308,7 @@ required_for_references:
- wglext
- whereami
- whisper-cpp
- wide-integer
- wil
- wildmidi
- winflexbison
Expand Down Expand Up @@ -1363,4 +1375,5 @@ required_for_references:
- zug
- zulu-openjdk
- zxing-cpp
- zyre
- zziplib
29 changes: 25 additions & 4 deletions docs/package_templates/autotools_package/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
from conan.tools.build import check_min_cppstd, cross_building
from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir
from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps, PkgConfigDeps
from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain, PkgConfigDeps
from conan.tools.layout import basic_layout
from conan.tools.microsoft import is_msvc, unix_path
from conan.tools.scm import Version
import os


Expand Down Expand Up @@ -41,6 +42,21 @@ class PackageConan(ConanFile):
"with_foobar": True,
}

@property
def _min_cppstd(self):
return 14

# in case the project requires C++14/17/20/... the minimum compiler version should be listed
@property
def _compilers_minimum_version(self):
return {
"apple-clang": "10",
"clang": "7",
"gcc": "7",
"msvc": "191",
"Visual Studio": "15",
}

@property
def _settings_build(self):
return getattr(self, "settings_build", self.settings)
Expand All @@ -58,8 +74,8 @@ def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")
# for plain C projects only
self.settings.rm_safe("compiler.libcxx")
self.settings.rm_safe("compiler.cppstd")
self.settings.rm_safe("compiler.libcxx")

def layout(self):
# src_folder must use the same source folder name the project
Expand All @@ -74,7 +90,12 @@ def requirements(self):
def validate(self):
# validate the minimum cpp standard supported. Only for C++ projects
if self.settings.compiler.get_safe("cppstd"):
check_min_cppstd(self, 11)
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."
)
if self.settings.os not in ["Linux", "FreeBSD", "Macos"]:
raise ConanInvalidConfiguration(f"{self.ref} is not supported on {self.settings.os}.")

Expand Down Expand Up @@ -155,7 +176,7 @@ def build(self):
autotools.make()

def package(self):
copy(self, pattern="LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses"))
autotools = Autotools(self)
autotools.install()

Expand Down
30 changes: 15 additions & 15 deletions docs/package_templates/cmake_package/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
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, rm, rmdir, replace_in_file
from conan.tools.build import check_min_cppstd
from conan.tools.scm import Version
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.env import VirtualBuildEnv
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir
from conan.tools.microsoft import check_min_vs, is_msvc, is_msvc_static_runtime
from conan.tools.scm import Version
import os


Expand Down Expand Up @@ -40,15 +40,17 @@ class PackageConan(ConanFile):

@property
def _min_cppstd(self):
return 17
return 14

# in case the project requires C++14/17/20/... the minimum compiler version should be listed
@property
def _compilers_minimum_version(self):
return {
"gcc": "7",
"clang": "7",
"apple-clang": "10",
"clang": "7",
"gcc": "7",
"msvc": "191",
"Visual Studio": "15",
}

# no exports_sources attribute, but export_sources(self) method instead
Expand All @@ -64,8 +66,8 @@ def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")
# for plain C projects only
self.settings.rm_safe("compiler.libcxx")
self.settings.rm_safe("compiler.cppstd")
self.settings.rm_safe("compiler.libcxx")

def layout(self):
# src_folder must use the same source folder name the project
Expand All @@ -79,13 +81,11 @@ def validate(self):
# validate the minimum cpp standard supported. For C++ projects only
if self.settings.compiler.cppstd:
check_min_cppstd(self, self._min_cppstd)
check_min_vs(self, 191)
if not is_msvc(self):
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."
)
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."
)
# in case it does not work in another configuration, it should validated here too
if is_msvc(self) and self.options.shared:
raise ConanInvalidConfiguration(f"{self.ref} can not be built as shared on Visual Studio and msvc.")
Expand Down Expand Up @@ -131,7 +131,7 @@ def build(self):
cmake.build()

def package(self):
copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses"))
cmake = CMake(self)
cmake.install()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.15)

project(test_package C) # if the project is pure C
# project(test_package CXX) # if the project uses c++
project(test_package LANGUAGES C) # if the project is pure C
# project(test_package LANGUAGES CXX) # if the project uses c++

find_package(package REQUIRED CONFIG)

Expand Down
18 changes: 9 additions & 9 deletions docs/package_templates/header_only/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get
from conan.tools.layout import basic_layout
from conan.tools.scm import Version
import os
Expand Down Expand Up @@ -35,11 +35,11 @@ def _min_cppstd(self):
@property
def _compilers_minimum_version(self):
return {
"Visual Studio": "15",
"apple-clang": "10",
"clang": "7",
"gcc": "7",
"msvc": "191",
"gcc": "5",
"clang": "5",
"apple-clang": "5.1",
"Visual Studio": "15",
}

# Use the export_sources(self) method instead of the exports_sources attribute.
Expand Down Expand Up @@ -85,12 +85,12 @@ def build(self):

# Copy all files to the package folder
def package(self):
copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses"))
copy(
self,
pattern="*.h",
dst=os.path.join(self.package_folder, "include"),
src=os.path.join(self.source_folder, "include"),
"*.h",
os.path.join(self.source_folder, "include"),
os.path.join(self.package_folder, "include"),
)

def package_info(self):
Expand Down
4 changes: 2 additions & 2 deletions docs/package_templates/meson_package/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class PackageConan(ConanFile):

@property
def _min_cppstd(self):
return 17
return 14

# in case the project requires C++14/17/20/... the minimum compiler version should be listed
@property
Expand Down Expand Up @@ -98,7 +98,7 @@ def validate(self):
# if another tool than the compiler or Meson is required to build the project (pkgconf, bison, flex etc)
def build_requirements(self):
# CCI policy assumes that Meson may not be installed on consumers machine
self.tool_requires("meson/1.2.2")
self.tool_requires("meson/1.2.3")
# pkgconf is largely used by Meson, it should be added in build requirement when there are dependencies
if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str):
self.tool_requires("pkgconf/2.0.3")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def requirements(self):
self.requires(self.tested_reference_str)

def build_requirements(self):
self.tool_requires("meson/1.2.2")
self.tool_requires("meson/1.2.3")
if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str):
self.tool_requires("pkgconf/2.0.3")

Expand Down
12 changes: 6 additions & 6 deletions docs/package_templates/msbuild_package/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from conan.errors import ConanInvalidConfiguration
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm
from conan.tools.layout import basic_layout
from conan.tools.microsoft import is_msvc, MSBuild, MSBuildDeps, MSBuildToolchain
from conan.tools.microsoft import MSBuild, MSBuildDeps, MSBuildToolchain, is_msvc
import os


Expand Down Expand Up @@ -44,8 +44,8 @@ def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")
# for plain C projects only
self.settings.rm_safe("compiler.libcxx")
self.settings.rm_safe("compiler.cppstd")
self.settings.rm_safe("compiler.libcxx")

def layout(self):
basic_layout(self, src_folder="src")
Expand Down Expand Up @@ -125,10 +125,10 @@ def build(self):
msbuild.build(sln="project_2017.sln")

def package(self):
copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
copy(self, "*.lib", src=self.source_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False)
copy(self, "*.dll", src=self.source_folder, dst=os.path.join(self.package_folder, "bin"), keep_path=False)
copy(self, "*.h", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include"))
copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses"))
copy(self, "*.lib", self.source_folder, os.path.join(self.package_folder, "lib"), keep_path=False)
copy(self, "*.dll", self.source_folder, os.path.join(self.package_folder, "bin"), keep_path=False)
copy(self, "*.h", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder, "include"))

def package_info(self):
self.cpp_info.libs = ["package_lib"]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.15)

project(test_package C) # if the project is pure C
project(test_package CXX) # if the project uses c++
project(test_package LANGUAGES C) # if the project is pure C
# project(test_package LANGUAGES CXX) # if the project uses C++

find_package(package REQUIRED CONFIG)

Expand Down
10 changes: 5 additions & 5 deletions docs/package_templates/prebuilt_tool_package/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from conan import ConanFile
from conan.tools.files import get, copy
from conan.tools.scm import Version
from conan.errors import ConanInvalidConfiguration
from conan.tools.files import copy, get
from conan.tools.scm import Version
import os


Expand Down Expand Up @@ -48,9 +48,9 @@ def build(self):
# copy all needed files to the package folder
def package(self):
# a license file is always mandatory
copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
copy(self, pattern="*.exe", dst=os.path.join(self.package_folder, "bin"), src=self.source_folder)
copy(self, pattern="foo", dst=os.path.join(self.package_folder, "bin"), src=self.source_folder)
copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses"))
copy(self, "*.exe", self.source_folder, os.path.join(self.package_folder, "bin"))
copy(self, "foo", self.source_folder, os.path.join(self.package_folder, "bin"))

def package_info(self):
# folders not used for pre-built binaries
Expand Down
Loading

0 comments on commit 637e7e9

Please sign in to comment.