diff --git a/llvm/docs/CMake.rst b/llvm/docs/CMake.rst index 589b09f28281..c1d1cd0c7c71 100644 --- a/llvm/docs/CMake.rst +++ b/llvm/docs/CMake.rst @@ -770,7 +770,8 @@ and uses them to build a simple application ``simple-tool``. # for your compiler. include_directories(${LLVM_INCLUDE_DIRS}) - add_definitions(${LLVM_DEFINITIONS}) + separate_arguments(LLVM_DEFINITIONS_LIST NATIVE_COMMAND ${LLVM_DEFINITIONS}) + add_definitions(${LLVM_DEFINITIONS_LIST}) # Now build our tools add_executable(simple-tool tool.cpp) @@ -870,7 +871,8 @@ Contents of ``/CMakeLists.txt``: find_package(LLVM REQUIRED CONFIG) - add_definitions(${LLVM_DEFINITIONS}) + separate_arguments(LLVM_DEFINITIONS_LIST NATIVE_COMMAND ${LLVM_DEFINITIONS}) + add_definitions(${LLVM_DEFINITIONS_LIST}) include_directories(${LLVM_INCLUDE_DIRS}) add_subdirectory()