Commit Graph

44 Commits

Author SHA1 Message Date
Vincent Saulue-Laborde df04df94db conanfile: fix cmake_target_name of Catch2::Catch2.
The "Catch2 without default main" target is currently unspecified in
Conan, and defaults to catch2::catch2base. This commit switches it back
to Catch2::Catch2, as specified in the docs.
2024-04-20 14:31:04 +02:00
Vincent Saulue-Laborde 8e80b8f22c conanfile: set compatibility_cppstr = False.
The Catch libraries have different API/ABI depending on the c++
standard they are compiled with. For example, the following function
isn't in the binary when compiled with C++14, only with C++17 or later:

StringMaker<std::string_view>::convert(std::string_view str);

By default, Conan is allowed to serve Catch libraries compiled in C++14
into a project using C++17/20, potentially causing linker errors
because of missing symbols. This PR overrides this default behaviour:
the C++ standard of the Catch library will exactly match the one of
the requiring project (building Catch from source if necessary).
2024-04-18 21:47:12 +02:00
Uilian Ries a2a3c55058
Improve Conan recipe support (#2831)
* Improve Conan recipe support
* export files
* supports c++14
* update Conan client in the CI
* Better compatibility with Conan 1.x
* Manage options and cppstd for Conan 1.x
* copy eveything from extra


Signed-off-by: Uilian Ries <uilianries@gmail.com>
2024-03-12 22:59:28 +01:00
Martin Hořeňovský 562f31029a
Use the same Conan CMake target setup for Conan v1 and v2.
This requires Conan v1 in version 1.53.0 or greater, but that
should not pose a problem in practice.
2024-02-17 23:04:04 +01:00
Devon Adair 62d4aecb8c
Conan v2 (#2805)
* Removed Conan1 build.py file using conan package tools that are no longer supported

* Working conan 1 and 2 build with the test package. 

updated the test_package to be updated to conan 2 and fixed missing cmake. Still need to check that the license file is packaged up and that the packages look identical before the changes

* Removing debug prints and the license check that isn't working yet

* Working license file copied over as it was before

* Migrated the properties of cpp_info to conan 2. Keeping conan 1 support by checking the version of conan

https://docs.conan.io/1/migrating_to_2.0/properties.html

* Revert "Removed Conan1 build.py file using conan package tools that are no longer supported"

This reverts commit a606d1dfe6.

* Need to add a set_version to parse the version from CMakeLists.txt

Adding a package build yaml to ensure conan keeps building on 1 and 2

* Setting lowercase catch2 for pkg_config and cmake_target_name

* Fixing the namespace for conan file cmake_target_name
2024-02-17 16:42:44 +01:00
Murray Johnson 8110ee9206 Add lib/cmake/Catch2 to conan builddirs in package recipe so extras/*.cmake files are packaged 2022-06-15 10:50:24 +02:00
Guillaume Egles 190f71792a proper support for lib suffix in conan 2022-02-05 20:53:43 +01:00
Martin Hořeňovský 39d3de17f3
Fix mentions of CATCH_INSTALL_HELPERS
Fixes #2347
2022-01-06 23:37:44 +01:00
Alexandr Timofeev 3a15433d52 Add support for Components 2020-11-02 15:37:35 +01:00
Alexandr Timofeev 67a9561fb5 Fix slashes for Windows builds 2020-11-02 15:37:35 +01:00
Alexandr Timofeev 2f31f9037d Inject conan_basic_setup to properly set MD/MT flags 2020-11-02 15:37:35 +01:00
Martin Hořeňovský 26622f1620
Fix Conan recipe
Apparently cpp_info.libs is a list of _filenames_ and not _targets_.
Oh well.
2020-05-03 19:34:37 +02:00
Martin Hořeňovský 19ecad6f68
Rename CMake/pkg-config target Catch2Main to Catch2WithMain
This describes the reality better, as it also links in the rest
of Catch2.

The on-disk name of the static library remains just `Catch2Main`,
as that is what it is -- single main function -- and on-disk artifacts
cannot describe link dependencies.
2020-05-03 18:54:38 +02:00
Alexandr Timofeev 49e000b505
[conan] Fix the Conan package for multiple static library use 2020-01-25 22:39:50 +01:00
offa c770a9c8b5 Conan topic cleanup. 2020-01-24 15:10:43 +01:00
offa 21868deeab Conanfile updated to build the static libraries. 2020-01-19 14:59:33 +01:00
Martin Hořeňovský 90378f4a59
Have conan test-build the package in a separate subdirectory 2019-05-25 19:58:49 +02:00
Uilian Ries ac0a83a35d Update Conan recipe
- Apply new conventions introduced on Conan 1.8
- Removed outdated settings
- Update license to follow SPDX format

Closes #926
Closes #943
2018-11-19 15:27:47 +01:00
Martin Hořeňovský 03d122a35c v2.4.2 2018-10-26 21:14:16 +02:00
Martin Hořeňovský 9e1bdca466 v2.4.1 2018-09-28 15:52:51 +02:00
Martin Hořeňovský 60b05b2041 v2.4.0 2018-09-04 11:59:15 +02:00
Martin Hořeňovský 15cf3caace v2.3.0 2018-07-23 10:12:15 +02:00
Martin Hořeňovský 7be8ba36c1 Install contrib when installing Catch using conan
Closes #1322
2018-07-01 19:04:50 +02:00
Martin Hořeňovský 3743295ca8 Stop conan package from installing Catch's helpers 2018-06-24 12:32:22 +02:00
Paul le Roux b957eb4172 Improve conan integration by using cmake install 2018-06-24 12:32:22 +02:00
Martin Hořeňovský 44722f9ed3 Integrate CMake with `<catch2/catch.hpp>` include paths
This also goes for pkg-config installed by our CMake installation.

This includes

* Updating CMake version on Travis
* Adding a `Catch2` subfolder to the `single_include/` folder to
provide this include path both _inside_ the repository, and _outside_.
* Updated examples to build with the new paths
* Other general CMake cleanup
2018-06-24 12:32:22 +02:00
Martin Hořeňovský d2a130f243 v2.2.3 2018-06-06 23:19:06 +02:00
Martin Hořeňovský d2d8455b57 v2.2.2 2018-04-06 12:11:22 +02:00
Martin Hořeňovský 0a34cc201e v2.2.1 2018-03-11 12:04:28 +01:00
Martin Hořeňovský d14b7563c2 v2.2.0 2018-03-07 11:06:15 +01:00
Martin Hořeňovský 7cbd0b587a v2.1.2 2018-02-09 17:10:27 +01:00
Martin Hořeňovský 62dae592c3 v2.1.1 2018-01-26 16:06:07 +01:00
Martin Hořeňovský cd76f5730c v2.1.0 2018-01-10 13:53:04 +01:00
Phil Nash b119ebdde1 v2.0.1 release 2017-11-03 12:01:52 +00:00
Martin Hořeňovský ae21020640 dev build 6 2017-10-31 15:17:21 +01:00
solvingj eea9e1efd7 Minor - added header-only flag in conan
See header-only guidelines: 
http://conanio.readthedocs.io/en/latest/howtos/header_only.html?highlight=header%20only
Its borderline cosmetic, but it does have a purpose.
2017-10-31 14:09:44 +01:00
Phil Nash 355ab78f4a dev build 5 2017-10-12 13:06:41 +01:00
Phil Nash bd46f66754 dev build 4 2017-09-19 17:42:20 +01:00
Martin Hořeňovský fc495ba0cb Dev build 3 2017-08-30 12:20:21 +02:00
Phil Nash 5d6c1f4dd0 Dev build 2 2017-08-18 15:58:00 +01:00
Phil Nash e6ffbb732a Updated conan files to use version number 2017-08-17 08:40:58 +01:00
Phil Nash 0270afb21b Updated license 2017-06-28 16:44:46 +01:00
Uilian Ries 3491804598 #926 Update Conan version by release
- Update release scripts to increment Conan version

Signed-off-by: Uilian Ries <uilianries@gmail.com>
2017-06-23 16:03:36 -03:00
Uilian Ries 6234e3d54d #926 Conan recipe for Catch single header
- Insert catch.hpp (single header) to package
- Copy BDDTests and TrickyTest to validate Catch package

Signed-off-by: Uilian Ries <uilianries@gmail.com>
2017-06-23 10:34:56 -03:00