-
Notifications
You must be signed in to change notification settings - Fork 261
Fix: remove the CMAKE_OSX_DEPLOYMENT_TARGET auto detect by CMake #628
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
base: develop2
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,7 +50,7 @@ function(detect_os OS OS_API_LEVEL OS_SDK OS_SUBSYSTEM OS_VERSION) | |
| message(STATUS "CMake-Conan: cmake_osx_sysroot=${CMAKE_OSX_SYSROOT}") | ||
| set(${OS_SDK} ${_OS_SDK} PARENT_SCOPE) | ||
| endif() | ||
| if(DEFINED CMAKE_OSX_DEPLOYMENT_TARGET) | ||
| if(DEFINED CONAN_CUSTOM_CMAKE_OSX_DEPLOYMENT_TARGET) | ||
| message(STATUS "CMake-Conan: cmake_osx_deployment_target=${CMAKE_OSX_DEPLOYMENT_TARGET}") | ||
| set(${OS_VERSION} ${CMAKE_OSX_DEPLOYMENT_TARGET} PARENT_SCOPE) | ||
| endif() | ||
|
|
@@ -620,6 +620,10 @@ set(CONAN_HOST_PROFILE "default;auto-cmake" CACHE STRING "Conan host profile") | |
| set(CONAN_BUILD_PROFILE "default" CACHE STRING "Conan build profile") | ||
| set(CONAN_INSTALL_ARGS "--build=missing" CACHE STRING "Command line arguments for conan install") | ||
|
|
||
| if(DEFINED CMAKE_OSX_DEPLOYMENT_TARGET) | ||
|
||
| set(CONAN_CUSTOM_CMAKE_OSX_DEPLOYMENT_TARGET CMAKE_OSX_DEPLOYMENT_TARGET) | ||
| endif () | ||
|
|
||
| find_program(_cmake_program NAMES cmake NO_PACKAGE_ROOT_PATH NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) | ||
| if(NOT _cmake_program) | ||
| get_filename_component(PATH_TO_CMAKE_BIN "${CMAKE_COMMAND}" DIRECTORY) | ||
|
|
||
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.
It is a bit weird that the variable is given the value of the original content, but then it is not used. If it is intended to be used as a boolean toggle, then maybe when it is assigned below, assign it directly to True/On?
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.
Agreed! I would either:
CONAN_CMAKE_OSX_DEPLOYMENT_AUTODETECTED)set(CMAKE_OSX_DEPLOYMENT_TARGET ...)after project (i know, too many cases) - then we can compare. Although we don't have to cover this case, if the documentation says it should be cache variable, then it should!