From: Kefu Chai Date: Fri, 31 May 2019 08:17:48 +0000 (+0800) Subject: cmake/modules: replace ";" with " " in compile flags X-Git-Tag: v15.1.0~2591^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=714fbf64aedfe0e0b821155e32f07575d53c078c;p=ceph.git cmake/modules: replace ";" with " " in compile flags 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 --- diff --git a/cmake/modules/FindSanitizers.cmake b/cmake/modules/FindSanitizers.cmake index fbf8ed9e711f..4c77c14d1645 100644 --- a/cmake/modules/FindSanitizers.cmake +++ b/cmake/modules/FindSanitizers.cmake @@ -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})