conan: [bug] Macos build with generator Xcode throw error
Environment Details (include every applicable attribute)
- Operating System+version: macos catalina
- Compiler+version: 12
- Conan version: 1.33.1
- Python version: 3.7
Steps to reproduce (Include if Applicable)
Calling build()
Re-run cmake no build system arguments
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
CMake Error at CMakeLists.txt:20 (project):
No CMAKE_C_COMPILER could be found.
CMake Error at CMakeLists.txt:20 (project):
No CMAKE_CXX_COMPILER could be found.
-- Configuring incomplete, errors occurred!
See also "/Users/paulo/Developer/workspaces/cpp/ubook-sdk-mobile/build/macos_app/Debug/x86_64/target/CMakeFiles/CMakeOutput.log".
ERROR: conanfile.py (macos_app/1.0.0): Error in build() method, line 61
cmake.configure()
ConanException: Error 1 while executing cd '/Users/paulo/Developer/workspaces/cpp/ubook-sdk-mobile/build/macos_app/Debug/x86_64/target' && cmake -G "Xcode" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk" -DCMAKE_SYSTEM_VERSION="10.9" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.9" -DCONAN_IN_LOCAL_CACHE="OFF" -DCONAN_COMPILER="apple-clang" -DCONAN_COMPILER_VERSION="12.0" -DCONAN_CXX_FLAGS="-m64" -DCONAN_SHARED_LINKER_FLAGS="-m64" -DCONAN_C_FLAGS="-m64" -DCONAN_LIBCXX="libc++" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_INSTALL_PREFIX="/Users/paulo/Developer/workspaces/cpp/ubook-sdk-mobile/build/macos_app/Debug/x86_64/target/package" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCONAN_CMAKE_POSITION_INDEPENDENT_CODE="ON" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -DCMAKE_BUILD_TYPE="Debug" -DPROJECT_CONFIG_NAME="ubook" -DPROJECT_CONFIG_VERSION="2.0.7" -DPROJECT_CONFIG_ARCH="x86_64" -Wno-dev '/Users/paulo/Developer/workspaces/cpp/ubook-sdk-mobile/files/targets/macos_app/cmake'
COMMAND: conan build /Users/paulo/Developer/workspaces/cpp/ubook-sdk-mobile/files/targets/macos_app/conan/recipe/conanfile.py --source-folder /Users/paulo/Developer/workspaces/cpp/ubook-sdk-mobile/files/targets/macos_app/cmake --build-folder /Users/paulo/Developer/workspaces/cpp/ubook-sdk-mobile/build/macos_app/Debug/x86_64/target --install-folder /Users/paulo/Developer/workspaces/cpp/ubook-sdk-mobile/build/macos_app/Debug/x86_64/conan
WORKING DIR: /Users/paulo/Developer/workspaces/cpp/ubook-sdk-mobile/build/macos_app/Debug/x86_64/target
[ERROR] Command execution has failed
My conanfile:
def build(self):
cmake = CMake(self, generator='Xcode')
cmake.configure()
cmake.build()
If i removed “, generator=‘Xcode’” it works.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (13 by maintainers)
Hi,
I have installed cmake exactly 3.19.0:
Set the minimum to 3.19.
And it work:
But what the problem?