[llvm] r329318 - Another fix for r329293: Unbreak the windows bots
Philip Pfaffe via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 5 10:20:45 PDT 2018
Author: pfaffe
Date: Thu Apr 5 10:20:45 2018
New Revision: 329318
URL: http://llvm.org/viewvc/llvm-project?rev=329318&view=rev
Log:
Another fix for r329293: Unbreak the windows bots
Only build the unittest if plugins are enabled. Link components into the
TestPlugin on windows and cygwin.
Modified:
llvm/trunk/unittests/Passes/CMakeLists.txt
Modified: llvm/trunk/unittests/Passes/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Passes/CMakeLists.txt?rev=329318&r1=329317&r2=329318&view=diff
==============================================================================
--- llvm/trunk/unittests/Passes/CMakeLists.txt (original)
+++ llvm/trunk/unittests/Passes/CMakeLists.txt Thu Apr 5 10:20:45 2018
@@ -1,19 +1,26 @@
set(LLVM_LINK_COMPONENTS Support Passes Core)
-add_llvm_unittest(PluginsTests PluginsTest.cpp)
-export_executable_symbols(PluginsTests)
+if (LLVM_ENABLE_PLUGINS)
+ add_llvm_unittest(PluginsTests PluginsTest.cpp)
+ export_executable_symbols(PluginsTests)
-add_library(TestPlugin MODULE TestPlugin.cxx)
+ add_library(TestPlugin MODULE TestPlugin.cxx)
-set_output_directory(TestPlugin
- BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
- LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
- )
-
-set_target_properties(TestPlugin
- PROPERTIES PREFIX ""
- SUFFIX ".so"
- )
+ set_output_directory(TestPlugin
+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
+ LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
+ )
-add_dependencies(TestPlugin intrinsics_gen)
-add_dependencies(PluginsTests TestPlugin)
+ set_target_properties(TestPlugin
+ PROPERTIES PREFIX ""
+ SUFFIX ".so"
+ )
+
+ if (WIN32 OR CYGWIN)
+ llvm_map_components_to_libnames(LLVM_DEPS ${LLVM_LINK_COMPONENTS})
+ target_link_libraries(TestPlugin ${LLVM_DEPS})
+ endif()
+
+ add_dependencies(TestPlugin intrinsics_gen)
+ add_dependencies(PluginsTests TestPlugin)
+endif()
More information about the llvm-commits
mailing list