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

Fix for cmake-conan issue #225 - Compile error on configuration on MacOS #226

Merged
merged 4 commits into from
Sep 3, 2020

Conversation

dforsten
Copy link
Contributor

@dforsten dforsten commented Apr 26, 2020

The sysroot option is not set when using /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++, needs to be added explicitly.

Closes: #159
Closes: #225

@CLAassistant
Copy link

CLAassistant commented Apr 26, 2020

CLA assistant check
All committers have signed the CLA.

…on on MacOS

The sysroot option is not set when using `/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++`, needs to be added explicitly.
@@ -264,9 +264,13 @@ function(conan_cmake_detect_unix_libcxx result)
endif()
endforeach()

if(APPLE)
set(xcode_sysroot_option "--sysroot=${CMAKE_OSX_SYSROOT}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible that CMAKE_OSX_SYSROOT is not defined? For example in iOS? I would say it is possible, and this would break for some users not in OSX. Does it make sense to test for CMAKE_OSX_SYSROOT existence instead?

(sorry this took a while to review, Conan amazing growth keeps the team very busy)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also would suggest to check CMAKE_OSX_SYSROOT instead of APPLE.
Also @dforsten I have added a test for this issue.

@czoido
Copy link
Contributor

czoido commented Sep 3, 2020

Hi @dforsten,
Sorry for the late response.
Have you tried to set: export SDKROOT=$(xcodebuild -version -sdk macosx Path) (See: #159 (comment))
Please check if that solves your issue.

@czoido
Copy link
Contributor

czoido commented Sep 3, 2020

Related to: #159

conan.cmake Outdated Show resolved Hide resolved
@czoido czoido added this to the 0.16 milestone Sep 3, 2020
@czoido czoido mentioned this pull request Sep 3, 2020
@czoido czoido merged commit 7c35072 into conan-io:develop Sep 3, 2020
@dforsten
Copy link
Contributor Author

dforsten commented Sep 3, 2020

Cool!

Trying to get Conan/Artifactory used more and more here at vizrt,
thanks for writing such a great tool! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compile error on configuration on MacOS Detects AppleClang as Clang
4 participants