-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake Config checks for system architecture causes problems on Conan #1368
Comments
There is an issue on the Kitware Gitlab open for this limitation: https://gitlab.kitware.com/cmake/cmake/issues/16184 |
So, if I understand this correctly, the problem is that CMake automatically encodes and checks what "bitness" a package is when using PackageConfig, and Conan generates the package on a 32bit machine, which means that 64bit machines cannot use the package? |
@horenmar That is correct. It's more of an upstream CMake issue than a Catch issue, but as it stands right now the version check for the config file makes the CMake package nonportable. |
Yeah, I am gonna say that either of the upstreams (CMake/conan) need to fix this. |
As it turns out, there is a fairly reasonable workaround. |
Description
While trying to build something with Conan (that uses Catch2), I encountered this diagnostic:
@mmha identified that the call to write_basic_package_version_file in the root CMakeLists.txt generates something that checks the system architecture. By commenting out the following lines in
/home/cjdb/.conan/data/catch2/2.3.0/bincrafters/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/lib/cmake/Catch2/Catch2ConfigVersion.cmake
, we were able to kill the error:I'm using a 64-bit machine, which is appears to be different to the bincrafters' machine (as it is expecting a 32-bit machine).
Steps to reproduce
Add this to your project's CMakeLists.txt
find_package(Catch2 2.3.0 REQUIRED)
Extra information
The text was updated successfully, but these errors were encountered: