ted created this revision.
ted added a reviewer: zturner.
ted added a subscriber: lldb-commits.

On Windows we require both debug and release python executable/libraries; this 
change requires debug for a debug build and release for other builds.

If CMAKE_BUILD_TYPE is not specified, the llvm CMakeLists.txt defaults to 
"Debug".

http://reviews.llvm.org/D18484

Files:
  cmake/modules/LLDBConfig.cmake

Index: cmake/modules/LLDBConfig.cmake
===================================================================
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -122,10 +122,18 @@
     unset(PYTHON_RELEASE_DLL)
   endif()
 
-  if (NOT (PYTHON_DEBUG_EXE AND PYTHON_RELEASE_EXE AND PYTHON_DEBUG_LIB AND 
PYTHON_RELEASE_LIB AND PYTHON_DEBUG_DLL AND PYTHON_RELEASE_DLL))
-    message("Python installation is corrupt. Python support will be disabled 
for this build.")
-    set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
-    return()
+  if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+    if (NOT (PYTHON_DEBUG_EXE AND PYTHON_DEBUG_LIB AND PYTHON_DEBUG_DLL))
+      message("Python installation is corrupt. Python support will be disabled 
for this build.")
+      set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
+      return()
+    endif()
+  else()
+    if (NOT (PYTHON_RELEASE_EXE AND PYTHON_RELEASE_LIB AND PYTHON_RELEASE_DLL))
+      message("Python installation is corrupt. Python support will be disabled 
for this build.")
+      set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
+      return()
+    endif()
   endif()
 
   # Generator expressions are evaluated in the context of each build 
configuration generated


Index: cmake/modules/LLDBConfig.cmake
===================================================================
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -122,10 +122,18 @@
     unset(PYTHON_RELEASE_DLL)
   endif()
 
-  if (NOT (PYTHON_DEBUG_EXE AND PYTHON_RELEASE_EXE AND PYTHON_DEBUG_LIB AND PYTHON_RELEASE_LIB AND PYTHON_DEBUG_DLL AND PYTHON_RELEASE_DLL))
-    message("Python installation is corrupt. Python support will be disabled for this build.")
-    set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
-    return()
+  if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+    if (NOT (PYTHON_DEBUG_EXE AND PYTHON_DEBUG_LIB AND PYTHON_DEBUG_DLL))
+      message("Python installation is corrupt. Python support will be disabled for this build.")
+      set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
+      return()
+    endif()
+  else()
+    if (NOT (PYTHON_RELEASE_EXE AND PYTHON_RELEASE_LIB AND PYTHON_RELEASE_DLL))
+      message("Python installation is corrupt. Python support will be disabled for this build.")
+      set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
+      return()
+    endif()
   endif()
 
   # Generator expressions are evaluated in the context of each build configuration generated
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to