Conversation
memsharded
left a comment
There was a problem hiding this comment.
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.
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_profilefunction inconan_provider.cmaketo 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.