diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt --- a/libclc/CMakeLists.txt +++ b/libclc/CMakeLists.txt @@ -58,9 +58,11 @@ execute_process( COMMAND ${LLVM_CONFIG} "--system-libs" OUTPUT_VARIABLE LLVM_SYSTEM_LIBS OUTPUT_STRIP_TRAILING_WHITESPACE ) +separate_arguments( LLVM_SYSTEM_LIBS ) execute_process( COMMAND ${LLVM_CONFIG} "--libs" "core" "bitreader" "bitwriter" OUTPUT_VARIABLE LLVM_LIBS OUTPUT_STRIP_TRAILING_WHITESPACE ) +separate_arguments( LLVM_LIBS ) execute_process( COMMAND ${LLVM_CONFIG} "--libdir" OUTPUT_VARIABLE LLVM_LIBDIR OUTPUT_STRIP_TRAILING_WHITESPACE ) @@ -76,7 +78,7 @@ OUTPUT_STRIP_TRAILING_WHITESPACE ) # These were not properly reported in early LLVM and we don't need them -set( LLVM_CXX_FLAGS ${LLVM_CXX_FLAGS} -fno-rtti -fno-exceptions ) +list( APPEND LLVM_CXX_FLAGS -fno-rtti -fno-exceptions ) # Print LLVM variables message( "LLVM system libs: ${LLVM_SYSTEM_LIBS}" )