[Lldb-commits] [lldb] r358604 - [CMake] Remove Apple-specific version logic.

Frederic Riss via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 17 11:23:23 PDT 2019


Author: friss
Date: Wed Apr 17 11:23:22 2019
New Revision: 358604

URL: http://llvm.org/viewvc/llvm-project?rev=358604&view=rev
Log:
[CMake] Remove Apple-specific version logic.

We were using the LLDB-Info.plist as the canonical holder of the
version number, but there is really no good reason to do this. If
anything the plist should be generated using the information provided
to CMake.

For now just remove the logic extracting the version from the plist
and rely on LLDB_VERSION_STRING.

Removed:
    lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
Modified:
    lldb/trunk/source/CMakeLists.txt
    lldb/trunk/source/lldb.cpp

Removed: lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/EmbedAppleVersion.cmake?rev=358603&view=auto
==============================================================================
--- lldb/trunk/cmake/modules/EmbedAppleVersion.cmake (original)
+++ lldb/trunk/cmake/modules/EmbedAppleVersion.cmake (removed)
@@ -1,11 +0,0 @@
-execute_process(COMMAND /usr/libexec/PlistBuddy -c "Print:CFBundleVersion" ${LLDB_INFO_PLIST}
-                OUTPUT_VARIABLE BundleVersion
-                OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-file(APPEND "${HEADER_FILE}.tmp"
-    "#define LLDB_VERSION_STRING lldb-${BundleVersion}\n")
-
-execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
-  "${HEADER_FILE}.tmp" "${HEADER_FILE}")
-
-file(REMOVE "${HEADER_FILE}.tmp")

Modified: lldb/trunk/source/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/CMakeLists.txt?rev=358604&r1=358603&r2=358604&view=diff
==============================================================================
--- lldb/trunk/source/CMakeLists.txt (original)
+++ lldb/trunk/source/CMakeLists.txt Wed Apr 17 11:23:22 2019
@@ -39,29 +39,7 @@ set_property(SOURCE lldb.cpp APPEND PROP
 
 list(APPEND lldbBase_SOURCES ${version_inc})
 
-if(APPLE)
-  set(apple_version_inc "${CMAKE_CURRENT_BINARY_DIR}/AppleVersion.inc")
-  set(apple_version_script "${LLDB_SOURCE_DIR}/cmake/modules/EmbedAppleVersion.cmake")
-  set(info_plist ${LLDB_SOURCE_DIR}/resources/LLDB-Info.plist)
-
-  # Create custom target to generate the VC revision include.
-  add_custom_command(OUTPUT "${apple_version_inc}"
-    DEPENDS "${apple_version_script}" "${info_plist}"
-    COMMAND
-    ${CMAKE_COMMAND} "-DLLDB_INFO_PLIST=${info_plist}"
-                     "-DHEADER_FILE=${apple_version_inc}"
-                     -P "${apple_version_script}")
-
-  # Mark the generated header as being generated.
-  set_source_files_properties("${apple_version_inc}"
-    PROPERTIES GENERATED TRUE
-               HEADER_FILE_ONLY TRUE)
-
-  # Tell Version.cpp that it needs to build with -DHAVE_SVN_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)
+if(LLDB_VERSION_STRING)
   set_property(SOURCE lldb.cpp APPEND PROPERTY
                COMPILE_DEFINITIONS "LLDB_VERSION_STRING=${LLDB_VERSION_STRING}")
 endif()

Modified: lldb/trunk/source/lldb.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/lldb.cpp?rev=358604&r1=358603&r2=358604&view=diff
==============================================================================
--- lldb/trunk/source/lldb.cpp (original)
+++ lldb/trunk/source/lldb.cpp Wed Apr 17 11:23:22 2019
@@ -17,10 +17,6 @@ using namespace lldb_private;
 #include "VCSVersion.inc"
 #endif
 
-#ifdef HAVE_APPLE_VERSION_INC
-#include "AppleVersion.inc"
-#endif
-
 static const char *GetLLDBRevision() {
 #ifdef LLDB_REVISION
   return LLDB_REVISION;




More information about the lldb-commits mailing list