aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerw7 <erw7.github@gmail.com>2020-02-14 17:45:41 +0900
committerGitHub <noreply@github.com>2020-02-14 00:45:41 -0800
commit146598efcce48cfae13a6d15f5c5e7574c7c0384 (patch)
tree75e8c0944eaf92a315e174d64513677e793df6f0
parent1b200d99360c1a4737f1d36206f3385a77d7d93e (diff)
downloadrneovim-146598efcce48cfae13a6d15f5c5e7574c7c0384.tar.gz
rneovim-146598efcce48cfae13a6d15f5c5e7574c7c0384.tar.bz2
rneovim-146598efcce48cfae13a6d15f5c5e7574c7c0384.zip
build: Fix MSVC build failure on CI #11865
clean-shared-libraries does nothing useful in MSVC build. Nevertheless, it deletes ${DEPS_INSTALL_DIR}/lib/nvim/parser/c.dll and causes build failure in CI.
-rw-r--r--third-party/CMakeLists.txt22
1 files changed, 15 insertions, 7 deletions
diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt
index cff063e894..a321840fef 100644
--- a/third-party/CMakeLists.txt
+++ b/third-party/CMakeLists.txt
@@ -295,13 +295,21 @@ if(WIN32)
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CopyFilesGlob.cmake)
endif()
-add_custom_target(clean-shared-libraries
- COMMAND ${CMAKE_COMMAND}
- -DREMOVE_FILE_GLOB=${DEPS_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}*${CMAKE_SHARED_LIBRARY_SUFFIX}*
- -P ${PROJECT_SOURCE_DIR}/cmake/RemoveFiles.cmake
- DEPENDS ${THIRD_PARTY_DEPS}
-)
+# clean-shared-libraries removes ${DEPS_INSTALL_DIR}/lib/nvim/parser/c.dll,
+# resulting in MSVC build failure in CI.
+if (MSVC)
+ set(ALL_DEPS ${THIRD_PARTY_DEPS})
+else()
+ add_custom_target(clean-shared-libraries
+ COMMAND ${CMAKE_COMMAND}
+ -DREMOVE_FILE_GLOB=${DEPS_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}*${CMAKE_SHARED_LIBRARY_SUFFIX}*
+ -P ${PROJECT_SOURCE_DIR}/cmake/RemoveFiles.cmake
+ DEPENDS ${THIRD_PARTY_DEPS}
+ )
+ set(ALL_DEPS clean-shared-libraries)
+endif()
add_custom_target(third-party ALL
COMMAND ${CMAKE_COMMAND} -E touch .third-party
- DEPENDS clean-shared-libraries)
+ DEPENDS ${ALL_DEPS}
+)