You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm using the following generators in the conanfile.py : generators = "CMakeToolchain", "CMakeDeps", "XcodeDeps", "XcodeToolchain"
which generate the following file I include into my cmake project:
include("conan_toolchain.cmake")
with the following contents (the relevant part).
########## 'apple_system' block #############
# Define Apple architectures, sysroot, deployment target, bitcode, etc
# Set the architectures for which to build.
set(CMAKE_OSX_ARCHITECTURES arm64 CACHE STRING "" FORCE)
# Setting CMAKE_OSX_SYSROOT SDK, when using Xcode generator the name is enough
# but full path is necessary for others
set(CMAKE_OSX_SYSROOT macosx CACHE STRING "" FORCE)
However, when I compile my project I get compilation errors for not being able to find some basic headers since the isysroot is invalid (equal 'macos' instead of the framework Path) :
c++: warning: no such sysroot directory: 'macosx' [-Wmissing-sysroot]
this is expected since the toolchain file overrides my CMAKE_OSX_SYSROOT. in the comments you can see that if I use Xcode generator, the name should be good, but it affects my project.
Is it intentional ? I can have workaround, but perhaps I'm doing something wrong.
Thanks !
Have you read the CONTRIBUTING guide?
I've read the CONTRIBUTING guide
The text was updated successfully, but these errors were encountered:
CMake toolchains shouldn't be included in CMakeLists.txt. This can be from a bad practice (if done before project() call), to don't work at all (if done after the project() call). The toolchains have to be passed in command line like -DCMAKE_TOOLCHAIN_FILE=. It is recommended to use the Conan generated presets with cmake --preset ... this is very convenient.
It is not fully clear what is the issue with the set(CMAKE_OSX_SYSROOT macosx CACHE STRING "" FORCE), and what did you mean with since the isysroot is invalid (equal 'macos' instead of the framework Path).
If it means that you have some special custom path, the code that determines the value for that variable is:
What is your question?
Hi, I'm using the following generators in the conanfile.py :
generators = "CMakeToolchain", "CMakeDeps", "XcodeDeps", "XcodeToolchain"
which generate the following file I include into my cmake project:
with the following contents (the relevant part).
However, when I compile my project I get compilation errors for not being able to find some basic headers since the isysroot is invalid (equal 'macos' instead of the framework Path) :
this is expected since the toolchain file overrides my CMAKE_OSX_SYSROOT. in the comments you can see that if I use Xcode generator, the name should be good, but it affects my project.
Is it intentional ? I can have workaround, but perhaps I'm doing something wrong.
Thanks !
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: