Thomas Nilsson skrev:
I'm trying to build a CMake project using clang instead of gcc. The
project is cross-platform and builds cleanly on Cygwin with gcc. With
Clang it says:

[ 33%] Built target X
make[4]: *** No rule to make target 'X.dll.a', needed by 'X.exe'. Stop.
CMakeFiles/Makefile2:1140: recipe for target 'tools/CMakeFiles/X/all' failed

I don't know how to fix this, but I'm not completely sure that it's not
my project that instructs CMake to do this (how would I know?).

If not, is there a way to make CMake link directly against the .dll?

/Thomas
Cygwin64 on Windows 10 with CMake 3.3.2



This seems to be caused by the fact that clang command line for building shared libraries does not receive the "-Wl,--enable-auto-import" option, which gcc does.

For GCC this seems to happen in Modules/Platform/CYGWIN-GNU.cmake:53, but I can't figure out where this should be placed to fix it for clang.

Any pointers?

/Thomas
--

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

Reply via email to