summaryrefslogtreecommitdiff
path: root/compiler/cpp/test
diff options
context:
space:
mode:
authorJames E. King III <jking@apache.org>2019-01-11 12:17:44 -0500
committerJames E. King III <jking@apache.org>2019-01-11 20:47:00 -0500
commit278528cf7b1dd5dd977bce882aa126fac8695697 (patch)
tree311f723983babe76272a4cedc3bdd2d1b6428413 /compiler/cpp/test
parent76ee393d20044f7bf930611cf8fc370acb8e9e1a (diff)
downloadthrift-278528cf7b1dd5dd977bce882aa126fac8695697.tar.gz
THRIFT-4732: windows cmake refinements and add windows docker build support
Diffstat (limited to 'compiler/cpp/test')
-rw-r--r--compiler/cpp/test/CMakeLists.txt30
1 files changed, 11 insertions, 19 deletions
diff --git a/compiler/cpp/test/CMakeLists.txt b/compiler/cpp/test/CMakeLists.txt
index 572b55890..373cb78f0 100644
--- a/compiler/cpp/test/CMakeLists.txt
+++ b/compiler/cpp/test/CMakeLists.txt
@@ -31,18 +31,10 @@ if(${WITH_PLUGIN})
plugin/conversion_test.cc
)
add_executable(plugintest ${plugintest_SOURCES})
- if(WITH_SHARED_LIB AND NOT MSVC)
- target_link_libraries(plugintest
- thriftc
- ${Boost_LIBRARIES}
- )
- else()
- target_link_libraries(plugintest
- thriftc_static
- thrift_static
- ${Boost_LIBRARIES}
- )
- endif()
+ target_link_libraries(plugintest
+ thriftc
+ ${Boost_LIBRARIES}
+ )
add_test(NAME PluginUnitTest COMMAND plugintest)
set(thrift-gen-mycpp_SOURCES
@@ -50,11 +42,7 @@ if(${WITH_PLUGIN})
plugin/cpp_plugin.cc
)
add_executable(thrift-gen-mycpp ${thrift-gen-mycpp_SOURCES})
- if(WITH_SHARED_LIB AND NOT MSVC)
- target_link_libraries(thrift-gen-mycpp thriftc)
- else()
- target_link_libraries(thrift-gen-mycpp thriftc_static thrift_static)
- endif()
+ target_link_libraries(thrift-gen-mycpp thriftc)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(BUILDTYPE "Debug")
@@ -91,5 +79,9 @@ foreach(LANG ${thrift_compiler_LANGS})
endforeach()
-find_package(PythonInterp REQUIRED)
-add_test(NAME StalenessCheckTest COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/compiler/staleness_check.py ${THRIFT_COMPILER})
+find_package(PythonInterp QUIET)
+if(PYTHONINTERP_FOUND)
+ add_test(NAME StalenessCheckTest COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/compiler/staleness_check.py ${THRIFT_COMPILER})
+else()
+ message(WARNING "Skipping StalenessCheckTest as there is no python interpreter available.")
+endif() \ No newline at end of file