[CMake] Fixing CMake to append source properties instead of overwrite them.
authorChris Bieneman <beanz@apple.com>
Thu, 10 Nov 2016 23:56:32 +0000 (23:56 +0000)
committerChris Bieneman <beanz@apple.com>
Thu, 10 Nov 2016 23:56:32 +0000 (23:56 +0000)
This is a small fix to the version output.

llvm-svn: 286528

lldb/source/CMakeLists.txt

index d3d3c8b..d031be9 100644 (file)
@@ -55,8 +55,8 @@ if(DEFINED lldb_vc)
                HEADER_FILE_ONLY TRUE)
 
   # Tell Version.cpp that it needs to build with -DHAVE_SVN_VERSION_INC.
-  set_source_files_properties(lldb.cpp
-    PROPERTIES COMPILE_DEFINITIONS "HAVE_SVN_VERSION_INC")
+  set_property(SOURCE lldb.cpp APPEND PROPERTY 
+               COMPILE_DEFINITIONS "HAVE_SVN_VERSION_INC")
   list(APPEND lldbBase_SOURCES ${version_inc})
 endif()
 
@@ -79,12 +79,12 @@ if(APPLE)
                HEADER_FILE_ONLY TRUE)
 
   # Tell Version.cpp that it needs to build with -DHAVE_SVN_VERSION_INC.
-  set_source_files_properties(lldb.cpp
-    PROPERTIES COMPILE_DEFINITIONS "HAVE_APPLE_VERSION_INC")
+  set_property(SOURCE lldb.cpp APPEND PROPERTY 
+               COMPILE_DEFINITIONS "HAVE_APPLE_VERSION_INC")
   list(APPEND lldbBase_SOURCES ${apple_version_inc})
 elseif(LLDB_VERSION_STRING)
-  set_source_files_properties(lldb.cpp
-    PROPERTIES COMPILE_DEFINITIONS "LLDB_VERSION_STRING=${LLDB_VERSION_STRING}")
+  set_property(SOURCE lldb.cpp APPEND PROPERTY
+               COMPILE_DEFINITIONS "LLDB_VERSION_STRING=${LLDB_VERSION_STRING}")
 endif()
 
 add_lldb_library(lldbBase