diff options
author | cjihrig <cjihrig@gmail.com> | 2019-10-19 16:46:32 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2019-10-20 10:13:31 -0500 |
commit | 7d433a936bce26707f7a10bb56b121fe0dfb0a66 (patch) | |
tree | ee46549068d0ba1c62b2cca0a9036182d70e0682 /deps/uv/CMakeLists.txt | |
parent | 0822bfaa9f52aea289abd0e15a90b0df2e12f7e1 (diff) | |
download | android-node-v8-7d433a936bce26707f7a10bb56b121fe0dfb0a66.tar.gz android-node-v8-7d433a936bce26707f7a10bb56b121fe0dfb0a66.tar.bz2 android-node-v8-7d433a936bce26707f7a10bb56b121fe0dfb0a66.zip |
deps: upgrade to libuv 1.33.1
Notable changes:
- uv_random() has been added.
- More work to read those pesky Windows
environment variables.
- Several build fixes for Tier 3 platforms (Android,
NetBSD, OpenBSD, Haiku).
- Stop using fsevents to watch files (using kqueue again).
PR-URL: https://github.com/nodejs/node/pull/29996
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'deps/uv/CMakeLists.txt')
-rw-r--r-- | deps/uv/CMakeLists.txt | 42 |
1 files changed, 33 insertions, 9 deletions
diff --git a/deps/uv/CMakeLists.txt b/deps/uv/CMakeLists.txt index 6f18f3397d..7da5e68816 100644 --- a/deps/uv/CMakeLists.txt +++ b/deps/uv/CMakeLists.txt @@ -1,6 +1,15 @@ # TODO: determine CMAKE_SYSTEM_NAME on OS/390. Currently assumes "OS/390". -cmake_minimum_required(VERSION 2.8.12) -project(libuv) +cmake_minimum_required(VERSION 3.4) +project(libuv LANGUAGES C) + +include(CMakePackageConfigHelpers) +include(CMakeDependentOption) +include(GNUInstallDirs) +include(CTest) + +cmake_dependent_option(LIBUV_BUILD_TESTS + "Build the unit tests when BUILD_TESTING is enabled and we are the root project" ON + "BUILD_TESTING;CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF) if(MSVC) list(APPEND uv_cflags /W4) @@ -14,6 +23,7 @@ set(uv_sources src/fs-poll.c src/idna.c src/inet.c + src/random.c src/strscpy.c src/threadpool.c src/timer.c @@ -72,7 +82,6 @@ set(uv_test_sources test/test-idna.c test/test-ip4-addr.c test/test-ip6-addr.c - test/test-ip6-addr.c test/test-ipc-heavy-traffic-deadlock-bug.c test/test-ipc-send-recv.c test/test-ipc.c @@ -108,6 +117,7 @@ set(uv_test_sources test/test-process-title-threadsafe.c test/test-process-title.c test/test-queue-foreach-delete.c + test/test-random.c test/test-ref.c test/test-run-nowait.c test/test-run-once.c @@ -236,6 +246,7 @@ else() src/unix/pipe.c src/unix/poll.c src/unix/process.c + src/unix/random-devurandom.c src/unix/signal.c src/unix/stream.c src/unix/tcp.c @@ -284,6 +295,14 @@ if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|NetBSD|OpenBSD") list(APPEND uv_sources src/unix/bsd-ifaddrs.c src/unix/kqueue.c) endif() +if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + list(APPEND uv_sources src/unix/random-getrandom.c) +endif() + +if(APPLE OR CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") + list(APPEND uv_sources src/unix/random-getentropy.c) +endif() + if(APPLE) list(APPEND uv_defines _DARWIN_UNLIMITED_SELECT=1 _DARWIN_USE_64_BIT_INODE=1) list(APPEND uv_sources @@ -300,6 +319,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") src/unix/linux-inotify.c src/unix/linux-syscalls.c src/unix/procfs-exepath.c + src/unix/random-getrandom.c + src/unix/random-sysctl.c src/unix/sysinfo-loadavg.c) endif() @@ -356,11 +377,7 @@ target_compile_options(uv_a PRIVATE ${uv_cflags}) target_include_directories(uv_a PUBLIC include PRIVATE src) target_link_libraries(uv_a ${uv_libraries}) -option(libuv_buildtests "Build the unit tests when BUILD_TESTING is enabled." ON) - -include(CTest) -if(BUILD_TESTING AND libuv_buildtests) - enable_testing() +if(LIBUV_BUILD_TESTS) add_executable(uv_run_tests ${uv_test_sources}) target_compile_definitions(uv_run_tests PRIVATE ${uv_defines} USING_UV_SHARED=1) @@ -380,7 +397,6 @@ endif() if(UNIX) # Now for some gibbering horrors from beyond the stars... - include(GNUInstallDirs) foreach(x ${uv_libraries}) set(LIBS "${LIBS} -l${x}") endforeach(x) @@ -402,3 +418,11 @@ if(UNIX) install(TARGETS uv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(TARGETS uv_a ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() + +if(WIN32) + install(DIRECTORY include/ DESTINATION include) + install(FILES LICENSE DESTINATION .) + install(TARGETS uv uv_a + RUNTIME DESTINATION lib/$<CONFIG> + ARCHIVE DESTINATION lib/$<CONFIG>) +endif() |