Commit Graph

4443 Commits

Author SHA1 Message Date
Brad King ca7a52fc59 Merge branch '16449-revert-xcode-system-includes' into release 2016-11-28 13:57:56 -05:00
Gregor Jasny 543dcb0ada Revert "Xcode: Obey SYSTEM keyword for includes (#15687)"
Revert commit v3.7.0-rc1~266^2 (Xcode: Obey SYSTEM keyword for includes,
2015-08-31).  It worked for C, C++, and Swift but not for GNU Assembly
files for which Xcode has no property to set flags.

Closes: #16449
2016-11-28 13:42:46 -05:00
Brad King ea8eba0bbf Android: Add CMAKE_<LANG>_ANDROID_TOOLCHAIN_MACHINE
Expose the binutils' machine name (typically used as a prefix on the
tool names) publicly.  This is expected to match the `gcc -dumpmachine`
value.

Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
2016-11-18 10:03:15 -05:00
Brad King 0d3eb139e1 Android: Add CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG variable
The NDK provides prebuilt toolchain files in directories named for the
host architecture.  The NDK build system calls this `HOST_TAG`.
Expose the value publicly for use by clients that need to pass it
to external tools.

Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
2016-11-18 10:03:07 -05:00
Brad King 236d6244a0 Android: Always set CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION
When this variable is not set by the user or toolchain file, set it to
the default selected.  This will be useful for client code that needs to
pass the value to an external tool that needs to find the same toolchain
in the NDK.  Leave it empty for a standalone toolchain.

Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
2016-11-18 10:02:57 -05:00
Brad King a316f5fd6d Merge branch 'cmake-server-handshake-improvements' into release 2016-10-28 08:27:21 -04:00
Tobias Hunger d792491c40 cmake-server: Better error reporting during handshake
Catch more problematic input during handshake and report failure.

These were caught before when trying to configure, but it is way better
to get these reports early.
2016-10-27 14:18:42 -04:00
Brad King 4ec0329bf1 Merge branch 'cmake-server-message-quoting' into release 2016-10-24 14:36:50 -04:00
Brad King 9b8dc79cc8 cmake-server: Change message wrapper to avoid ambiguity with content
Change our message wrapper from

    [== CMake Server ==[ ... ]== CMake Server ==]

to

    [== "CMake Server" ==[ ... ]== "CMake Server" ==]

to guarantee that no JSON content can ever contain the ending string
(because it would be encoded as `]== \"CMake Server\" ==]`).
2016-10-24 14:36:13 -04:00
Brad King 6cd02f08c7 Merge branch 'backport-ninja-subdir-binary-dir' into release 2016-10-24 10:31:14 -04:00
Alexis Murzeau 42db2ebc75 Ninja: Use binary dir for `$subdir/all` targets
The targets added by commit v3.6.0-rc1~240^2~2 (Ninja: Add `$subdir/all`
targets, 2016-03-11) use as `$subdir` the relative path from the top of
the source tree to the current source directory.  This is not correct
when using `add_subdirectory(test test_bin)`.  Instead we need to use
the relative path from the top of the binary tree to the current binary
directory as was done for related targets by commit v3.7.0-rc1~268^2
(Ninja: Add `$subdir/{test,install,package}` targets, 2016-08-05).
2016-10-24 09:49:23 -04:00
Brad King 43f4326ece Android: Fix support for armeabi with c++_static
Add missing "unwind" and "atomic" libraries needed for this combination.
See `${ndk}/sources/cxx-stl/llvm-libc++/libs/armeabi/libc++.a` for the
libraries the NDK uses.

Issue: #16380
2016-10-21 08:42:25 -04:00
Brad King a0c539b546 Merge branch 'fix-Android-NsightTegra' into release 2016-10-18 14:24:34 -04:00
Brad King 9af881d810 Tests: Add VSNsightTegra test for VS 2015 2016-10-18 13:32:50 -04:00
Brad King 6739d24030 Tests: Fix VSNsightTegra test on Android NDK r12b
Test with architecture `armv7-a` instead of `armv7-a-hard` because the
latter is supporte supported only with NDK revisions r9c to r11c.
2016-10-18 13:32:50 -04:00
Brad King a975b21cec Merge branch 'ninja-framework-POST_BUILD' into release 2016-10-13 14:09:43 -04:00
Brad King 20278872e3 Ninja: Fix POST_BUILD commands on macOS Frameworks
The condition added by commit v2.8.12~179^2 (OS X: Fix regression
handling frameworks for Ninja, 2013-07-16) for excluding use of
versioning symlinks on macOS Frameworks must match that used for
POST_BUILD selection.  Otherwise we place the POST_BUILD commands after
a symlink step that is never added.

Closes: #16363
2016-10-13 14:04:12 -04:00
Brad King acd2eab2f3 Merge branch 'ExternalProject-fix-CMAKE_CACHE_ARGS-list' into release 2016-10-10 14:49:10 -04:00
Max Smolens a3c98cb30e ExternalProject: Fix regression in passing list to CMAKE_CACHE_ARGS
Fix passing a list to the CMAKE_CACHE_ARGS and CMAKE_CACHE_DEFAULT_ARGS
options of ExternalProject_Add.

Following commit v3.7.0-rc1~273^2~1 (prefer list(APPEND) over
string(APPEND) where appropriate, 2016-08-08), the semicolon list
separator after the first list element was missing in the generated
cache.
2016-10-10 14:40:12 -04:00
Brad King 5d8da06d60 Merge branch 'android-export-has-cpp' into release 2016-10-07 15:03:15 -04:00
Brad King dda6775c94 Android: Record use of C++ by static libs in exported Android.mk files
When a `PREBUILT_STATIC_LIBRARY` uses C++ in its sources then the `.a`
file will have a link-time dependency on the C++ runtime libraries.
Android NDK r14 will add a way to give this information to the NDK build
system by adding a `LOCAL_HAS_CPP` setting to the `Android.mk` file.
Add this for exported static libraries that use C++.
2016-10-07 15:02:42 -04:00
Brad King 8cdac469d1 Android: Fix support for cxxabi.h with libc++
Additional include directories are needed for this on some STL types.

Closes: #16350
2016-10-07 09:53:51 -04:00
Brad King ebef3632c7 Android: Suppress -Wattributes warnings in test case builds
We use `-Werror` in the Android test builds to make sure there are
no warnings that we care about (e.g. unused flags).  However, the
NDK r13 tools produce a warning about their own builtins:

```
<built-in>: In function 'float abs(float)':
<built-in>: warning: conflicts with previous declaration here [-Wattributes]
```

Suppress this warning so that we can continue using `-Werror` but
tolerate these warnings.
2016-10-06 13:26:05 -04:00
Brad King 8202816a36 Merge topic 'autogen-empty-qrc'
bcafc399 QtAutogen: Add test for empty qrc file
98b11f25 QtAutogen: Allow .qrc files that do not contain any file reference
2016-10-01 08:20:33 -04:00
Brad King b4235b7590 Merge topic 'add-setup-projects-tests-module'
130784e0 AndroidTestUtilities: Add module to help drive Android device tests
2016-10-01 08:20:27 -04:00
Schuyler Kylstra 130784e039 AndroidTestUtilities: Add module to help drive Android device tests
Add a module to manage the data needed for the project tests.  It will
move the test data to the build directory and transfer necessary data to
an Android device if that is enabled.
2016-09-30 13:49:47 -04:00
Sebastian Holtermann bcafc399c5 QtAutogen: Add test for empty qrc file 2016-09-30 10:02:49 -04:00
Brad King d56f9237d7 Tests: Teach Server test to wait for server exit
We expect the server to exit when its communication pipes are closed.
Close them and wait for the server to exit.  If supported by the current
version of python, kill the server if it does not exit after a few
seconds.
2016-09-30 09:36:57 -04:00
Brad King 523f8ec82c server-mode: Add option to enable/disable test case explicitly
Add a `CMake_TEST_SERVER_MODE` option that can be set in testing builds
to enable/disable server mode tests explicitly.  This will allow testing
in combination with `CMake_TEST_EXTERNAL_CMAKE` or for server mode to be
built on systems that have a python version that cannot run the test.
2016-09-29 13:40:21 -04:00
Brad King a833496199 server-mode: Rename variable CMake_{HAVE => ENABLE}_SERVER_MODE
The latter is a better name for making it a public-facing option.
2016-09-29 13:20:10 -04:00
Brad King 5d29506811 Merge topic 'cmake_parse_arguments-PARSE_ARGV-multi-value'
66c70cd9 cmake_parse_arguments: Add additional unit tests
41291b20 cmake_parse_arguments: Fix PARSE_ARGV multi-value argument handling
2016-09-29 08:09:48 -04:00
Brad King 48cd0f7405 Merge topic 'cmake-server-commands'
71a50587 server-mode: Add project data for unit tests
7b1e60f2 server-mode: Report CMakeCache entries
84553a6e server-mode: Add command to retrieve build system files
ead71873 server-mode: Report information relevant for a codemodel
2016-09-29 08:09:45 -04:00
Brad King 7cea3479d6 Merge topic 'fix-explicit-RC'
9c5238df project: Fix support for explicit RC language
40c04821 Tests: Decide earlier whether to test resources
2016-09-29 08:09:36 -04:00
Matthew Woehlke 66c70cd9f1 cmake_parse_arguments: Add additional unit tests
Add additional unit tests for some corner cases in argument splitting.
2016-09-28 15:20:42 -04:00
Matthew Woehlke 41291b20f3 cmake_parse_arguments: Fix PARSE_ARGV multi-value argument handling
The `PARSE_ARGV` mode was recently added to help functions properly
parse their arguments even when those arguments may be quoted and
contain literal `;` in their values.  Fix the implementation to encode
`;`s in reported multi-value arguments and in `UNPARSED_ARGUMENTS` so
that `;`s in the individual values are preserved in the lists.  This
allows clients to access all their argument values correctly.
2016-09-28 14:18:20 -04:00
Tobias Hunger 71a505870c server-mode: Add project data for unit tests
Do some basic unit tests for "codemodel", "cmakeInputs" and "cache"
commands of the cmake server.

This just calls the commands right now and makes sure the server
thinks it can reply to the request. The data itself is currently not
validated.
2016-09-28 20:10:59 +02:00
Brad King 9c5238dfd6 project: Fix support for explicit RC language
The check added in commit v3.6.0-rc1~293^2 (Diagnose recursive
project/enable_language without crashing, 2016-03-07) broke support for
enabling `RC` explicitly along with other languages like `C`.  The
reason is that we enable all listed languages at once so the internal
`enable_language(RC)` that we do while enabling `C` or `CXX` on some
platforms triggers the recursion check if `RC` is explicitly listed.

Ideally we should refactor things to only enable one language at a time,
but for now it is simplest to just exclude `RC` from the explicit list
until other languages are enabled, and then enable it.

Closes: #16330
2016-09-28 10:34:57 -04:00
Brad King 40c0482153 Tests: Decide earlier whether to test resources
Provide a CMake_TEST_RESOURCES variable storing the decision.
2016-09-28 09:40:00 -04:00
Brad King af35ddc808 Tests: Add newline to RunCMake.CPack_RPM SOURCE_PACKAGE case
The `main.cpp` that this test generates needs a newline so that
compilers do not warn about a missing newline.  Otherwise the warning
causes RunCMake infrastructure to detect unexpected output.
2016-09-28 09:07:42 -04:00
Brad King 756169ac99 Tests: Update ModuleNotices test for new notice 2016-09-27 15:18:07 -04:00
Brad King 86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Brad King 681e0429fc Tests: Fix RunCMake.CTest output match to tolerate line number changes 2016-09-27 15:04:27 -04:00
Brad King 1adcf4917e Merge topic 'cpack-rpm-debuginfo-sources'
39c7d62c CPack/RPM debuginfo packaging documentation
dd3c938a CPack/RPM debuginfo directories to sources
b78fcf0d CPack/RPM debuginfo packages must contain sources
2016-09-27 08:23:03 -04:00
Brad King e8ff565d94 Merge topic 'cmake-server-basic-commands'
89043267 server-mode: Add command to compute the build system
0a8ad670 server-mode: Add a configure command
544f65f4 server-mode: Set global configuration of cmake via a command
82104cc7 server-mode: Query global configuration of cmake via a command
2016-09-27 08:22:50 -04:00
Domen Vrankar dd3c938a0f CPack/RPM debuginfo directories to sources
List of sources must be split into paths parts
so that debuginfo package cleans up after
itself.
2016-09-27 08:18:21 -04:00
Domen Vrankar b78fcf0d2f CPack/RPM debuginfo packages must contain sources
Issue #15668 fix was missing relevant source
files in debuginfo package.
2016-09-27 08:18:21 -04:00
Nils Gladitz 144cc6f1f9 Ninja: Add source location as include directory for preprocessed files
Fortran INCLUDE statements are not handled by the preprocessor.

Since the location of the preprocessed file is distinct from the
original source file explicitly add the source file's directory
as an include path in the actual compile step (not the preprocessing step)
so INCLUDE can find it.

Closes: #16332
2016-09-27 08:11:08 -04:00
Tobias Hunger 544f65f44d server-mode: Set global configuration of cmake via a command
"setGlobalSettings" can be used to change settings reported by
"globalSettings" command.
2016-09-26 14:25:20 -04:00
Tobias Hunger 82104cc7a8 server-mode: Query global configuration of cmake via a command
Add "globalSettings" command that returns:
* Return capability information
* Return currently used generator/extra generator
* Return a range of flags for debug/trace/etc.
2016-09-26 14:23:53 -04:00
Brad King 4d6f0a5573 Merge topic 'revert-cpack-deb-package-description-fallback'
1ef45a30 Revert "CPack/DEB: Make package description variable precedence match RPM"
2016-09-26 09:06:39 -04:00