[Lldb-commits] [lldb] r249684 - [cmake] Fix cmake build on OSX after r249434.

Dawn Perchik via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 8 05:35:21 PDT 2015


Author: dperchik
Date: Thu Oct  8 07:35:21 2015
New Revision: 249684

URL: http://llvm.org/viewvc/llvm-project?rev=249684&view=rev
Log:
[cmake] Fix cmake build on OSX after r249434.

Reviewed by: zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13535

Modified:
    lldb/trunk/cmake/LLDBDependencies.cmake
    lldb/trunk/source/CMakeLists.txt
    lldb/trunk/tools/lldb-server/CMakeLists.txt

Modified: lldb/trunk/cmake/LLDBDependencies.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/LLDBDependencies.cmake?rev=249684&r1=249683&r2=249684&view=diff
==============================================================================
--- lldb/trunk/cmake/LLDBDependencies.cmake (original)
+++ lldb/trunk/cmake/LLDBDependencies.cmake Thu Oct  8 07:35:21 2015
@@ -104,6 +104,13 @@ endif ()
 
 # Darwin-only libraries
 if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
+  set(LLDB_VERS_GENERATED_FILE ${LLDB_BINARY_DIR}/source/LLDB_vers.c)
+  add_custom_command(OUTPUT ${LLDB_VERS_GENERATED_FILE}
+    COMMAND ${LLDB_SOURCE_DIR}/scripts/generate-vers.pl
+            ${LLDB_SOURCE_DIR}/lldb.xcodeproj/project.pbxproj liblldb_core
+            > ${LLDB_VERS_GENERATED_FILE})
+
+  set_source_files_properties(${LLDB_VERS_GENERATED_FILE} PROPERTIES GENERATED 1)
   list(APPEND LLDB_USED_LIBS
     lldbPluginDynamicLoaderDarwinKernel
     lldbPluginObjectFileMachO

Modified: lldb/trunk/source/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/CMakeLists.txt?rev=249684&r1=249683&r2=249684&view=diff
==============================================================================
--- lldb/trunk/source/CMakeLists.txt (original)
+++ lldb/trunk/source/CMakeLists.txt Thu Oct  8 07:35:21 2015
@@ -14,19 +14,8 @@ include_directories(
   )
 endif ()
 
-if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
-  set(LLDB_VERS_GENERATED_FILE ${LLDB_BINARY_DIR}/source/LLDB_vers.c)
-  add_custom_command(OUTPUT ${LLDB_VERS_GENERATED_FILE}
-    COMMAND ${LLDB_SOURCE_DIR}/scripts/generate-vers.pl
-            ${LLDB_SOURCE_DIR}/lldb.xcodeproj/project.pbxproj liblldb_core
-            > ${LLDB_VERS_GENERATED_FILE})
-
-  set_source_files_properties(${LLDB_VERS_GENERATED_FILE} PROPERTIES GENERATED 1)
-endif ()
-
 add_lldb_library(lldbBase
   lldb.cpp
-   ${LLDB_VERS_GENERATED_FILE}
   )
 
 add_subdirectory(Breakpoint)

Modified: lldb/trunk/tools/lldb-server/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/CMakeLists.txt?rev=249684&r1=249683&r2=249684&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-server/CMakeLists.txt (original)
+++ lldb/trunk/tools/lldb-server/CMakeLists.txt Thu Oct  8 07:35:21 2015
@@ -35,8 +35,13 @@ else()
     lldb-server.cpp
     LLDBServerUtilities.cpp
     ../../source/lldb.cpp
+    ${LLDB_VERS_GENERATED_FILE}
     )
 
+  if (LLDB_VERS_GENERATED_FILE)
+    add_dependencies(lldb-server swig_wrapper)
+  endif()
+
   # The Darwin linker doesn't understand --start-group/--end-group.
   if (LLDB_LINKER_SUPPORTS_GROUPS)
     target_link_libraries(lldb-server




More information about the lldb-commits mailing list