Take logic from upstream `Makefile.am` and `configure.ac` to build libuv
sources.
Update `uv.h` to include KWSys Large File Support configuration so that
consistent stream libraries are used (on AIX with XL).
Add a `cm_uv.h` header to include the CMake-provided copy of the `uv.h`
header from CMake sources.
By default is OFF and marked as advanced.
It's also add custom cmake-developer-reference (ALL) target
Generated output will be installed to ${CMAKE_DOC_DIR}/developer-reference.
Turn the feature check for cxx11_unordered_map into a function such that
we can use it for other features as well. Drop the 11 suffix, as we may
want to check features from other standards.
Download http://www.gnu.org/licenses/lgpl.txt and place it as
Licenses/LGPLv3.txt in our source tree. When building cmake-gui, use
option CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL to enable notification in the
"About" dialog of how the distribution of Qt is licensed. Install the
license file as ${CMAKE_ROOT}/Licenses/LGPLv3.txt so that the dialog can
display a path to it.
Since https is almost ubiquitous nowadays we should support it by
default whenever possible. When building our own curl, we already
automatically enable SSL/TLS support on Windows and OS X by using the
OS-native APIs. On UNIX platforms we need to use OpenSSL but have not
done so by default before, leading to possible user confusion when https
transfers fail later. Fix this by searching for OpenSSL quietly and
enabling use of it automatically if it is found.
Do this only on Linux and FreeBSD for now because on other UNIX
platforms (e.g. AIX, HP-UX, SunOS) it seems too easy to find an
OpenSSL that is not compatible with the target compiler.
If this policy is WARN, then the ReplaceVariableInString is executed with both
the new algorithm and the OLD slow algorithm. The NEW algorithm should be used
wherever it works.
Support for C11's _Thread_local was introduced in GCC in the 4.9 series,
even though we make the C11 compiler flags available in CMake with GCC
>= 4.6.
FreeBSD's runetype.h uses _Thread_local, which causes CMake's own build
to fail when using GCC < 4.9 and -std=gnu11:
/usr/include/runetype.h:92:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'const'
extern _Thread_local const _RuneLocale *_ThreadRuneLocale;
Add a test for _Thread_local support and only build CMake itself with
C11 support if it works.
Bug: http://www.cmake.org/Bug/view.php?id=15741
Disable the CMake_INSTALL_DEPENDENCIES option by default and turn it on
explicitly in our packaging scripts. This simplifies packaging in
distributions that provide the dependencies for us without having to
install them. We only need 3rd-party runtime dependencies to be
installed for packaging with redistributable binaries.
The GNU 4.8 standard library's cstdio header is not aware that C++14
honors C11's removal of "gets" from stdio.h and results in an error:
/.../include/c++/4.8/cstdio:120:11: error: no member named 'gets' in the global namespace
Detect this problematic case and default to using C++11 instead of
C++14 for building CMake itself.
If CMake_NO_<LANG>_STANDARD is set, do not set CMAKE_<LANG>_STANDARD.
This will allow users to build with their own -std= flags without
CMake adding any itself.
Since jsoncpp 0.7.0 (2014-11-20) the upstream may provide a CMake
package configuration file such that find_package(jsoncpp) will find a
jsoncppConfig.cmake file. In order to avoid conflicting with this
(especially on case-insensitive filesystems), and since we always prefer
projects to provide package config files (that they maintain), it is
better to not provide FindJsonCpp publicly.
Move FindJsonCpp into a private source directory that is not installed
so that we can still use it for building CMake itself.
Reported-by: Ryan Pavlik <ryan.pavlik@gmail.com>
Move CMAKE_USE_OPENSSL and CURL_CA_BUNDLE up to the top of CMake so that
CMake's own sources can know their values. Add the CURL_CA_PATH option
at the top and honor it as part of the curl build.
This fixes several reported bugs about CMake not handling
non-ascii paths on Windows.
Practically, the use of some unicode characters may still
be limited by the build or compiler tools.
For example, a user may be limited by the build tools to
using characters within the Windows ANSI code page (which can
include non-ascii characters in the current system language).
Update json/json.h to account for our lack of autolink.h. Update
json/config.h to include KWSys Large File Support configuration so that
consistent stream libraries are used (on AIX with XL).
Add a cm_jsoncpp_reader.h header to include the CMake-provided copy of
the json/reader.h header from CMake sources.
Set CMAKE_C_STANDARD and CMAKE_CXX_STANDARD only if they are not
already defined. This will allow users to add the settings with
different values to their local cache (e.g. on the command line).
When CMake is built with CMake 3.1 or later, appropriate -std=
options will be added for GNU and Clang compilers while building
C and CXX code.
This allows taking advantage of 'hidden' language features such
as move-constructors, and allows the standard library to enable
the use of more-advanced features too, where available.
This does not change CMake host compiler requirements.
Set curl build options as needed for CMake rather than presenting them
to the user in the cache. Drop the CMAKE_BUILD_CURL_SHARED option for
now.
Change the curl library name to 'cmcurl'. Disable blocks of code within
curl CMakeLists.txt files that we do not need for CMake, but leave the
code in place to make merging with curl updates easier.
When testing CMAKE_<LANG>_COMPILER_ID values, do not explicitly
dereference or quote the variable. We want if() to auto-dereference the
variable and not its value. Also replace MATCHES with STREQUAL where
equivalent.
The CMAKE_SYSTEM_NAME is "CYGWIN", but we also define a variable
named "CYGWIN" to "1". Avoid allowing if() to expand the "CYGWIN"
string as a variable.
The CMake_TEST_EXTERNAL_CMAKE option added by commit 9608ef6f (Tests:
Optionally configure tests exclusively, 2014-03-03) is intended to allow
one to run the CMake test suite with a compiler that may not be
supported for hosting the build of CMake itself. However, we currently
use the CMake test infrastructure to test KWIML everywhere that CMake
supports. In order to continue testing KWIML even in places that CMake
itself does not build, include it even when testing an external CMake.
Add an undocumented CMake_TEST_EXTERNAL_CMAKE option to name an external
CMake 'bin' directory. Skip all main CMake binary builds and instead
configure the Tests directory to run using the external CMake provided.
This will provide a means to exercise the CMake test suite generating
for target platforms and compilers with which the CMake source does not
build. That will allow us to raise the level of C++ features required
of a compiler to build our source while retaining tests for generating
projects with older compiler tools.