[CMake] try_compile with multiple include directories

Kyle Edwards kyle.edwards at kitware.com
Mon Sep 9 10:04:36 EDT 2019


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


More information about the CMake mailing list