Skip to content
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

Open
wants to merge 1 commit into
base: develop2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions conan_provider.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ function(detect_host_profile output_file)
string(APPEND PROFILE "tools.android:ndk_path=${CMAKE_ANDROID_NDK}\n")
endif()

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")
Comment on lines +206 to +209
Copy link
Member

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.


message(STATUS "CMake-Conan: Creating profile ${_FN}")
file(WRITE ${_FN} ${PROFILE})
message(STATUS "CMake-Conan: Profile: \n${PROFILE}")
Expand Down