[CMake] try_compile with multiple include directories

Isuru Fernando isuruf at gmail.com
Mon Sep 9 17:57:03 EDT 2019


Yes, semicolon worked.

Thanks Kyle and Jakub for the responses.

Isuru

On Mon, Sep 9, 2019 at 9:04 AM Kyle Edwards <kyle.edwards at kitware.com>
wrote:

> On Sun, 2019-09-08 at 14:07 -0500, Isuru Fernando wrote:
> > Hello,
> >
> > I can use the following to get try_compile to include one directory.
> >
> > CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=dir1"
> >
> > How do you use try_compile when I have multiple directories to pass
> > to it?
> >
> > Isuru
>
> Use a semicolon:
>
> CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=dir1;dir2"
>
> Kyle
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190909/ad60b3ac/attachment.html>


More information about the CMake mailing list