diff options
author | rhn <gihu.rhn@porcupinefactory.org> | 2018-01-26 19:25:23 +0100 |
---|---|---|
committer | Gaute Hope <eg@gaute.vetsj.com> | 2018-01-27 11:49:36 +0100 |
commit | 49830c1b01e890c6c9c1eae1c02b5e0ec53ffd28 (patch) | |
tree | e88f48e5c9deacdea384aa563a9aa650786b3d80 /CMakeLists.txt | |
parent | 3ce199d2e51d09469a5d142fd53ffcfd4784227d (diff) |
cmake: fix passing flags to compile tests
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c183fcd..15708d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -210,7 +210,9 @@ include(CheckCXXSourceRuns) unset ( CMAKE_REQUIRED_FLAGS ) unset ( CMAKE_REQUIRED_INCLUDES ) unset ( CMAKE_REQUIRED_LIBRARIES ) -list ( APPEND CMAKE_REQUIRED_FLAGS ${GMIME_CFLAGS} ) +# try_run will get confused and pass flags to cmake instead if they are connected with ";" +string ( REPLACE ";" "," NEW_CFLAGS "${GMIME_CFLAGS}" ) +list ( APPEND CMAKE_REQUIRED_FLAGS "${NEW_CFLAGS}" ) list ( APPEND CMAKE_REQUIRED_INCLUDES ${GMIME_INCLUDE_DIRS} ${NOTMUCH_INCLUDE_DIRS} ) list ( APPEND CMAKE_REQUIRED_LIBRARIES ${NOTMUCH_LIBRARIES} ${GMIME_LDFLAGS} ) |