]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake/modules: replace ";" with " " in compile flags
authorKefu Chai <kchai@redhat.com>
Fri, 31 May 2019 08:17:48 +0000 (16:17 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 31 May 2019 08:19:08 +0000 (16:19 +0800)
as the flags should be a string, not a list

tested using

cmake -DCMAKE_LINKER=gold -DWITH_ASAN=ON -DWITH_ASAN_LEAK=ON \
-DCMAKE_BUILD_TYPE=Debug

on ubuntu xenial

without this change, cmake will fail with following warning:

CMake Error at src/CMakeLists.txt:112 (message):
  The compiler /usr/bin/c++ has no C++17 support.

-- Configuring incomplete, errors occurred!

Signed-off-by: Kefu Chai <kchai@redhat.com>
cmake/modules/FindSanitizers.cmake

index fbf8ed9e711fcdf1f6b2eee1fafcb5b609ec2b87..4c77c14d1645f90b6e33ca86395b5679f3b4f2f5 100644 (file)
@@ -44,6 +44,8 @@ if(Sanitizers_COMPILE_OPTIONS)
     "-fno-omit-frame-pointer")
 endif()
 
+string (REPLACE ";" " " Sanitizers_COMPILE_OPTIONS "${Sanitizers_COMPILE_OPTIONS}")
+
 include(CheckCXXSourceCompiles)
 set(CMAKE_REQUIRED_FLAGS ${Sanitizers_COMPILE_OPTIONS})
 set(CMAKE_REQUIRED_LIBRARIES ${Sanitizers_COMPILE_OPTIONS})