try_compile with multiple include directories

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

try_compile with multiple include directories

Isuru Fernando
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

--

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:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: try_compile with multiple include directories

CMake mailing list
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
--

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:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: try_compile with multiple include directories

Isuru Fernando
Yes, semicolon worked.

Thanks Kyle and Jakub for the responses.

Isuru

On Mon, Sep 9, 2019 at 9:04 AM Kyle Edwards <[hidden email]> 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

--

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:
https://cmake.org/mailman/listinfo/cmake