[CMake] [RFC] cmake analog to AC_SEARCH_LIBS
Stewart, Robert
Robert.Stewart at sig.com
Mon Sep 9 06:55:07 EDT 2013
Игорь Пашев wrote:
>
> Hi, all. I'm using this macro to get AC_SEARCH_LIBS (from GNU
> autoconf) functionality with CMake.
>
> First of all, this macro searhes the function on libc, then,
> if not found, in the given libraries. It sets two variables:
> 1) boolean if function found
> 2) string - in which library (may be empty).
>
> I'd like this macro to be in standard cmake set.
Regardless of anything else in your proposal, why the two result
variables? It seems to me that setting the string when found,
and clearing it when not, serves both purposes. When the string
is empty, the function wasn't found.
> MACRO (CMAKE_SEARCH_LIBS v_func v_lib func)
(I don't know what the "v_" prefix means, but I presume that those
arguments are the outputs, so perhaps "v_" means "supply the name
of a variable to set.") With my variation, the interface would
work like the following:
CMAKE_SEARCH_LIBS(library my_function)
IF(library)
# found my_function's library
ENDIF()
_____
Rob Stewart
Software Engineer
Dev Tools & Components
Susquehanna International Group, LLP
________________________________
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
More information about the CMake
mailing list