-
Notifications
You must be signed in to change notification settings - Fork 254
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
Incorrect invocation of AppleClang compiler for detecting libcxx. #296
Comments
Patch for macOS and iOS: --- conan.cmake
+++ conan.cmake
@@ -264,6 +264,13 @@
endif()
endforeach()
+ if(${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL AppleClang)
+ set(compile_options -isysroot ${CMAKE_SYSROOT} ${compile_options})
+ if(${CMAKE_SYSTEM_NAME} STREQUAL iOS)
+ set(compile_options ${compile_options} -target arm64-apple-ios${CMAKE_OSX_DEPLOYMENT_TARGET})
+ endif()
+ endif()
+
execute_process(
COMMAND ${CMAKE_COMMAND} -E echo "#include <string>"
COMMAND ${CMAKE_CXX_COMPILER} -x c++ ${compile_options} -E -dM - |
Hi @DmitrySokolov, |
Nope. #226 fixes only macOS platform. iOS is still broken. Moreover,
|
Hmm... --- conan.cmake
+++ conan.cmake
@@ -264,6 +264,14 @@
endif()
endforeach()
+ if(${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL AppleClang)
+ if(${CMAKE_SYSTEM_NAME} STREQUAL iOS)
+ set(compile_options -isysroot ${CMAKE_SYSROOT} -target arm64-apple-ios${CMAKE_OSX_DEPLOYMENT_TARGET} ${compile_options})
+ else()
+ set(compile_options -isysroot ${CMAKE_OSX_SYSROOT} ${compile_options})
+ endif()
+ endif()
+
execute_process(
COMMAND ${CMAKE_COMMAND} -E echo "#include <string>"
COMMAND ${CMAKE_CXX_COMPILER} -x c++ ${compile_options} -E -dM - |
Hi, hasn't it been merged? |
The code
causes the following output
-isysroot
should be always specified for AppleClang, see also https://stackoverflow.com/a/63188875.Fix:
The text was updated successfully, but these errors were encountered: