summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-13 18:33:38 (GMT)
committerBrad King <brad.king@kitware.com>2017-09-17 15:10:18 (GMT)
commit714ce728828c267da9a5c0d9f2e48eb5f88a8336 (patch)
tree6b7857ad6dddef5f691ebb609c1d43e695e21d58 /Source/cmakemain.cxx
parent6a2d967de07a52f0460089999349e31741b402f8 (diff)
downloadCMake-714ce728828c267da9a5c0d9f2e48eb5f88a8336.zip
CMake-714ce728828c267da9a5c0d9f2e48eb5f88a8336.tar.gz
CMake-714ce728828c267da9a5c0d9f2e48eb5f88a8336.tar.bz2
bootstrap: Make libuv available during bootstrap
On UNIX, build only the parts of libuv we need for the filesystem, process, and poll abstractions using the POSIX poll() backend. This avoids many platform-specific conditions. On Windows, build all of libuv; there are no conditional alternatives anyway.
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r--Source/cmakemain.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 09dcb6d..219a658 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -14,12 +14,13 @@
#ifdef CMAKE_BUILD_WITH_CMAKE
#include "cmDocumentation.h"
#include "cmDynamicLoader.h"
+#endif
+
#ifdef _WIN32
#include <fcntl.h> /* _O_TEXT */
#include <stdlib.h> /* _set_fmode, _fmode */
#endif
#include "cm_uv.h"
-#endif
#include "cmsys/Encoding.hxx"
#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE)
@@ -167,7 +168,7 @@ int main(int ac, char const* const* av)
ac = args.argc();
av = args.argv();
-#if defined(CMAKE_BUILD_WITH_CMAKE) && defined(_WIN32)
+#if defined(_WIN32)
// Perform libuv one-time initialization now, and then un-do its
// global _fmode setting so that using libuv does not change the
// default file text/binary mode. See libuv issue 840.
@@ -192,8 +193,8 @@ int main(int ac, char const* const* av)
int ret = do_cmake(ac, av);
#ifdef CMAKE_BUILD_WITH_CMAKE
cmDynamicLoader::FlushCache();
- uv_loop_close(uv_default_loop());
#endif
+ uv_loop_close(uv_default_loop());
return ret;
}