[llvm] r250025 - cmake: Avoid leading space in LLVM_DEFINITIONS.
Pawel Bylica via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 12 03:42:04 PDT 2015
Author: chfast
Date: Mon Oct 12 05:42:03 2015
New Revision: 250025
URL: http://llvm.org/viewvc/llvm-project?rev=250025&view=rev
Log:
cmake: Avoid leading space in LLVM_DEFINITIONS.
Summary: Unnecessary space at the beginning of LLVM_DEFINITIONS in cmake shared files can break projects that use the variable.
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D13432
Modified:
llvm/trunk/cmake/modules/AddLLVMDefinitions.cmake
Modified: llvm/trunk/cmake/modules/AddLLVMDefinitions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVMDefinitions.cmake?rev=250025&r1=250024&r2=250025&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVMDefinitions.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVMDefinitions.cmake Mon Oct 12 05:42:03 2015
@@ -7,7 +7,11 @@
macro(add_llvm_definitions)
# We don't want no semicolons on LLVM_DEFINITIONS:
foreach(arg ${ARGN})
- set(LLVM_DEFINITIONS "${LLVM_DEFINITIONS} ${arg}")
+ if(DEFINED LLVM_DEFINITIONS)
+ set(LLVM_DEFINITIONS "${LLVM_DEFINITIONS} ${arg}")
+ else()
+ set(LLVM_DEFINITIONS ${arg})
+ endif()
endforeach(arg)
add_definitions( ${ARGN} )
endmacro(add_llvm_definitions)
More information about the llvm-commits
mailing list