summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/CMakeLists.txt3
-rw-r--r--Source/cmUVHandlePtr.cxx10
-rw-r--r--Tests/CMakeLib/CMakeLists.txt4
-rw-r--r--Tests/CMakeLib/testUVRAII.cxx (renamed from Tests/CMakeServerLib/testUVRAII.cxx)0
-rw-r--r--Tests/CMakeServerLib/CMakeLists.txt1
-rwxr-xr-xbootstrap1
6 files changed, 15 insertions, 4 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 88c63e1..5611e55 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -348,6 +348,8 @@ set(SRCS
cmTestGenerator.cxx
cmTestGenerator.h
cmUuid.cxx
+ cmUVHandlePtr.cxx
+ cmUVHandlePtr.h
cmVariableWatch.cxx
cmVariableWatch.h
cmVersion.cxx
@@ -1029,7 +1031,6 @@ list(APPEND _tools cmake)
target_link_libraries(cmake CMakeLib)
add_library(CMakeServerLib
- cmUVHandlePtr.h cmUVHandlePtr.cxx
cmConnection.h cmConnection.cxx
cmFileMonitor.cxx cmFileMonitor.h
cmPipeConnection.cxx cmPipeConnection.h
diff --git a/Source/cmUVHandlePtr.cxx b/Source/cmUVHandlePtr.cxx
index 214c7b2..8ba93e5 100644
--- a/Source/cmUVHandlePtr.cxx
+++ b/Source/cmUVHandlePtr.cxx
@@ -82,6 +82,7 @@ uv_handle_ptr_<T>::operator T*() const
return this->handle.get();
}
+#ifdef CMAKE_BUILD_WITH_CMAKE
template <>
struct uv_handle_deleter<uv_async_t>
{
@@ -126,6 +127,7 @@ int uv_async_ptr::init(uv_loop_t& loop, uv_async_cb async_cb, void* data)
allocate(data);
return uv_async_init(&loop, handle.get(), async_cb);
}
+#endif
template <>
struct uv_handle_deleter<uv_signal_t>
@@ -169,6 +171,7 @@ uv_pipe_ptr::operator uv_stream_t*() const
return reinterpret_cast<uv_stream_t*>(handle.get());
}
+#ifdef CMAKE_BUILD_WITH_CMAKE
uv_tty_ptr::operator uv_stream_t*() const
{
return reinterpret_cast<uv_stream_t*>(handle.get());
@@ -179,6 +182,7 @@ int uv_tty_ptr::init(uv_loop_t& loop, int fd, int readable, void* data)
allocate(data);
return uv_tty_init(&loop, *this, fd, readable);
}
+#endif
template class uv_handle_ptr_base_<uv_handle_t>;
@@ -186,13 +190,15 @@ template class uv_handle_ptr_base_<uv_handle_t>;
template class uv_handle_ptr_base_<uv_##NAME##_t>; \
template class uv_handle_ptr_<uv_##NAME##_t>;
-UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(async)
-
UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(signal)
UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(pipe)
UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(stream)
+#ifdef CMAKE_BUILD_WITH_CMAKE
+UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(async)
+
UV_HANDLE_PTR_INSTANTIATE_EXPLICIT(tty)
+#endif
}
diff --git a/Tests/CMakeLib/CMakeLists.txt b/Tests/CMakeLib/CMakeLists.txt
index d1a1df5..9f09185 100644
--- a/Tests/CMakeLib/CMakeLists.txt
+++ b/Tests/CMakeLib/CMakeLists.txt
@@ -12,6 +12,7 @@ set(CMakeLib_TESTS
testXMLParser
testXMLSafe
testFindPackageCommand
+ testUVRAII
)
set(testRST_ARGS ${CMAKE_CURRENT_SOURCE_DIR})
@@ -31,6 +32,9 @@ create_test_sourcelist(CMakeLib_TEST_SRCS CMakeLibTests.cxx ${CMakeLib_TESTS})
add_executable(CMakeLibTests ${CMakeLib_TEST_SRCS})
target_link_libraries(CMakeLibTests CMakeLib)
+set_property(TARGET CMakeLibTests PROPERTY C_CLANG_TIDY "")
+set_property(TARGET CMakeLibTests PROPERTY CXX_CLANG_TIDY "")
+
add_executable(testEncoding testEncoding.cxx)
target_link_libraries(testEncoding cmsys)
diff --git a/Tests/CMakeServerLib/testUVRAII.cxx b/Tests/CMakeLib/testUVRAII.cxx
index 7ecef39..7ecef39 100644
--- a/Tests/CMakeServerLib/testUVRAII.cxx
+++ b/Tests/CMakeLib/testUVRAII.cxx
diff --git a/Tests/CMakeServerLib/CMakeLists.txt b/Tests/CMakeServerLib/CMakeLists.txt
index f1ca2a4..5e1ad0c 100644
--- a/Tests/CMakeServerLib/CMakeLists.txt
+++ b/Tests/CMakeServerLib/CMakeLists.txt
@@ -6,7 +6,6 @@ include_directories(
set(CMakeServerLib_TESTS
testServerBuffering
- testUVRAII
)
create_test_sourcelist(CMakeLib_TEST_SRCS CMakeServerLibTests.cxx ${CMakeServerLib_TESTS})
diff --git a/bootstrap b/bootstrap
index ab087e9..45f9c2d 100755
--- a/bootstrap
+++ b/bootstrap
@@ -418,6 +418,7 @@ CMAKE_CXX_SOURCES="\
cmTryRunCommand \
cmUnexpectedCommand \
cmUnsetCommand \
+ cmUVHandlePtr \
cmVersion \
cmWhileCommand \
cmWorkingDirectory \