[CMake] check_c_source_compiles question

Steven Wilson steven.wesley.wilson at gmail.com
Thu May 6 18:46:27 EDT 2010


The following variables exist for passing parameters to
check_c_source_compiles:

CMAKE_REQUIRED_FLAGS
CMAKE_REQUIRED_DEFINITIONS
CMAKE_REQUIRED_INCLUDES
CMAKE_REQUIRED_LIBRARIES

Why do we not have CMAKE_REQUIRED_LINK_DIRECTORIES or some such equivalent?


On Unix I can make the check_c_source_compiles work by appending
-L/path/to/library to the value of CMAKE_REQUIRED_FLAGS.   On Windows, this
trick doesn't (with the correct compiler flags) seem to work.   I end up
getting errors about missing source file names, etc when
check_c_source_compiles runs.

How can I reliably pass the list of library directories?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100506/5326717b/attachment.htm>


More information about the CMake mailing list