-
Notifications
You must be signed in to change notification settings - Fork 252
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
Added [buildenv] Field Generation #554
base: develop2
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution @skjsnb
We need to check what would be the best, most general approach to this, but I think it is worth to pursue this improvement.
string(APPEND PROFILE "[buildenv]\n") | ||
string(APPEND PROFILE "CC=${CMAKE_C_COMPILER}\n") | ||
string(APPEND PROFILE "CXX=${CMAKE_CXX_COMPILER}\n") | ||
string(APPEND PROFILE "LD=${CMAKE_LINKER}\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now Conan provides a compiler_executables
configuration that might be a better mechanism to define this (it can work even with build systems that will not listen to CC/CXX env-vars). Setting the env-vars might not be necessarily bad, but we need to discuss the best approach.
Please note that as of #566 - the The linker is more tricky - since in a lot of scenarios CMake performs linking via the compiler, and |
Modified the
detect_host_profile
function inconan_provider.cmake
to support the generation of the [buildenv] field. This enhancement allows for a closer integration with the compilers configured in CMake, thereby improving usability for cross-compilation and cross-platform scenarios.