mati865 created this revision.
mati865 added a reviewer: LLVM.
mati865 added projects: LLVM, clang, LLDB.
Herald added subscribers: llvm-commits, lldb-commits, cfe-commits,
JDevlieghere, mgorny.
mati865 requested review of this revision.
In MinGW world, UNIX like `lib` prefix is preferred. This patch adjusts CMake
files to do that.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D87517
Files:
clang/tools/libclang/CMakeLists.txt
lldb/source/API/CMakeLists.txt
llvm/cmake/modules/AddLLVM.cmake
Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -567,7 +567,7 @@
endif()
if(ARG_SHARED)
- if(WIN32)
+ if(MSVC)
set_target_properties(${name} PROPERTIES
PREFIX ""
)
Index: lldb/source/API/CMakeLists.txt
===================================================================
--- lldb/source/API/CMakeLists.txt
+++ lldb/source/API/CMakeLists.txt
@@ -182,10 +182,10 @@
set_target_properties(liblldb_exports PROPERTIES FOLDER "lldb misc")
endif()
-if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
+if (MSVC)
# Only MSVC has the ABI compatibility problem and avoids using
FindPythonLibs,
# so only it needs to explicitly link against ${Python3_LIBRARIES}
- if (MSVC AND LLDB_ENABLE_PYTHON)
+ if (LLDB_ENABLE_PYTHON)
target_link_libraries(liblldb PRIVATE ${Python3_LIBRARIES})
endif()
else()
Index: clang/tools/libclang/CMakeLists.txt
===================================================================
--- clang/tools/libclang/CMakeLists.txt
+++ clang/tools/libclang/CMakeLists.txt
@@ -101,7 +101,7 @@
unset(ENABLE_STATIC)
endif()
-if(WIN32)
+if(MSVC)
set(output_name "libclang")
else()
set(output_name "clang")
@@ -205,4 +205,3 @@
COMPONENT
libclang-python-bindings)
endif()
-
Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -567,7 +567,7 @@
endif()
if(ARG_SHARED)
- if(WIN32)
+ if(MSVC)
set_target_properties(${name} PROPERTIES
PREFIX ""
)
Index: lldb/source/API/CMakeLists.txt
===================================================================
--- lldb/source/API/CMakeLists.txt
+++ lldb/source/API/CMakeLists.txt
@@ -182,10 +182,10 @@
set_target_properties(liblldb_exports PROPERTIES FOLDER "lldb misc")
endif()
-if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
+if (MSVC)
# Only MSVC has the ABI compatibility problem and avoids using FindPythonLibs,
# so only it needs to explicitly link against ${Python3_LIBRARIES}
- if (MSVC AND LLDB_ENABLE_PYTHON)
+ if (LLDB_ENABLE_PYTHON)
target_link_libraries(liblldb PRIVATE ${Python3_LIBRARIES})
endif()
else()
Index: clang/tools/libclang/CMakeLists.txt
===================================================================
--- clang/tools/libclang/CMakeLists.txt
+++ clang/tools/libclang/CMakeLists.txt
@@ -101,7 +101,7 @@
unset(ENABLE_STATIC)
endif()
-if(WIN32)
+if(MSVC)
set(output_name "libclang")
else()
set(output_name "clang")
@@ -205,4 +205,3 @@
COMPONENT
libclang-python-bindings)
endif()
-
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits