Skip to content

Commit 8e80b8f

Browse files
vsauluehorenmar
authored andcommitted
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).
1 parent 53ddf37 commit 8e80b8f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

conanfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class CatchConan(ConanFile):
1919
license = "BSL-1.0"
2020
version = "latest"
2121
settings = "os", "compiler", "build_type", "arch"
22+
extension_properties = {"compatibility_cppstd": False}
2223

2324
options = {
2425
"shared": [True, False],

0 commit comments

Comments
 (0)