cmake: fix build when LLVM_INCLUDE_DIRS includes multiple directories (#709)
authorMarco Leogrande <dark.knight.ita@gmail.com>
Wed, 28 Sep 2016 02:17:02 +0000 (19:17 -0700)
committer4ast <alexei.starovoitov@gmail.com>
Wed, 28 Sep 2016 02:17:02 +0000 (19:17 -0700)
commit396ecd7925cad0f5dff5d36b56fce829cee9d269
tree3387f7101e64bfaf614b66dd617295a893daf77e
parentd19e0cb06390c552c09085caebddbb0d1ef19f6e
cmake: fix build when LLVM_INCLUDE_DIRS includes multiple directories (#709)

If LLVM_INCLUDE_DIRS includes multiple directories, separated by
semicolon, the string would be incorrectly propagated all the way down
to the shell, that would interpret such semicolon as a command
separator. E.g. we would have:

 c++ ... -isystem /w/llvm/include;/w/llvm/bld/include ...

Instead, we need to parse the string as a CMake list (that are defined
as strings composed by semicolon-separated tokens) and build a string
in the form:

 c++ ... -isystem /w/llvm/include -isystem /w/llvm/bld/include ...

This bug was introduced in d19e0cb.
This commit fixes #707.

Signed-off-by: Marco Leogrande <marcol@plumgrid.com>
CMakeLists.txt