I’m having an issue generating and using a XCode project using cmake -G. cmake —version cmake version 3.4.1
Xcode Version 7.2 (7C68) Mac OS 10.11. My CMakeLists.txt has a clang option that fails during the -G Xcode pass but fails when linking within XCode. The compiler / linker option is ‘-Wl,—as-needed’ The test compile/link step in ‘cmake -G Xcode' creates a long clang command with arguments ‘-Wl,—as-needed’ plus ‘—serialize-diagnostics <path to .dia file>’ The link step within Xcode after the project created has the ‘-Wl,—as-needed’ argument and does not have the ‘—serialize-diagnostics <path to .dia file>’ argument. The link fails because ‘-Wl,—as-needed’ isn’t supported. If copy and execute the long clang command from the ‘cmake -G Xcode’ command and remove the ‘—serialize-diagnostics <path to .dia file>’ then it successfully fails with ‘-Wl, —as-needed’ isn’t supported. Finally, when I use cmake to generate unix makefiles it works meaning cmake determines ‘-Wl—as-needed’ isn’t supported and doesn’t add it to the argument list. Questions: - Where is the ‘—serialized-diagnostics’ argument coming from when executing ‘cmake -G Xcode’? - What is a .dia file and how do I read it? - What’s the preferred / recommended way of detecting the non-supported ‘-Wl,—as-needed’ argument during the ‘cmake -G Xcode’ phase? One option might to be to remove the ‘—serialize-diagnostics’ argument during the generation phase. I can provide more details on request. David
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake