If the host flags contain a c++11 flag (at least for gcc), then we can't
automatically propagate to nvcc it using -Xcompiler. This is because
nvcc can't use any C++ only flags. Instead we find this flag and add it
to nvcc's flags (it has a special flag for dealing with c++11 code) and
remove it from the host flags.
Co-Author: Guillermo Marcus <gmarcus@nvidia.com>
Revert commit 82c51a8a (liblzma: Disable XL compiler optimizations in
one source to avoid crash, 2015-04-02) and instead add a compiler flag
to disable optimizations in every source of liblzma. Somehow the XL
compiler optimizations create incorrect behavior in liblzma and lead
to crashes or truncated output during compression.
This is for consistency with other CMake access interfaces such as
definitions and properties which use a null value as a 'not present'
value. It is source compatible with existing callers, and it returns
a pointer into actual real cache entry storage.
Prefix test commands with the CROSSCOMPILING_EMULATOR property
for target executables. This allows test suites to be run on the host
when crosscompiling.
If the CMAKE_CROSSCOMPILING_EMULATOR variable is defined, and
CMAKE_CROSSCOMPILING is TRUE, then use CMAKE_CROSSCOMPILING_EMULATOR to run
the try_run executables. This prevents the need to populate
TryRunResults.cmake when cross compiling.
This topic was never tested without some follow-up commits. The
GetCacheEntryValue API returns a pointer to memory freed on return.
It will have to be revised along with the rest of the original topic.
* Re-order VS generators from newest to oldest.
* Show how to specify a VS generator with a target platform
* Increase the option output indentation to avoid extra wrapping
with longer generator names.
9410e24a cmCacheManager: Port consumers to non-iterator API.
7b7ae3b1 Port QtDialog to non-iterator cache API.
228c629c Port CursesDialog to non-iterator cache API.
2e50f5e7 cmMakefile: Port away from CacheEntry.Initialized.
e6224367 cmCacheManager: Add non-iterator-based API.
9ada4c04 cmCacheManager: Rename GetCacheValue to GetInitializedCacheValue.
1fe7f24c Add API for cache loading, deleting and saving to the cmake class.
08c642c6 cmMakefile: Remove cache version accessors.
cec8f97e cmMakefile: Simplify GetDefinitions implementation.
Extend sentences in other documentation linking to this manual to
say that it has a list of supported compilers.
Co-Author: Brad King <brad.king@kitware.com>
Add CROSSCOMPILING_EMULATOR target property for executables. This is used by
subsequent patches to run exectuables created for the target system when
crosscompiling. The property is initialized by the
CMAKE_CROSSCOMPILING_EMULATOR variable when defined.
Some tests may need to read "cmake --build" output passed through from
native build tools and do not know if it will be on stdout or stderr.
Optionally use the same variable for the execute_process output so
that it merges them and we can always match using expected stdout.
VS 2013 originally claimed to support initializer lists but a bug was
found in which it generated bad code silently. For this reason we
previously considered support to not be present. However, Update 3 adds
a hard error on cases that previously generated bad code, so it is now
safe to use initializer lists with VS 2013 Update 3 or greater. At
worst a compiler error will be issued in the cases that do not work, but
that is no different from any other compiler-specific workaround a
project code may need.
The only reason this failed to compile on VS 2013 was because the
compiler uses different initializer_list constructor argument types than
our dummy implementation. The standard does not specify the non-default
constructor argument types for initializer_list. Use a template to
match any two-arg constructor a compiler might select (e.g. begin/end or
begin/len). Use #error to preserve the error on VS 2013.
c37cf7fa cmCacheManager: Remove unused method
64556e3d cmCacheManager: Remove unused overloads.
23bb5d22 cmCacheManager: Remove use of intermediate overload.
510562e3 cmGlobalGenerator: Don't fetch the cache manager in a loop.
629e9489 cmake: Clear member rather than explicit erase.
d280bae9 cmake: Be clear that there is no chaining after global properties.
364c7ea1 cmake: Remove unused method.
47acfe1d cmake: Remove unused member.
a469bf7b cmMakefile: Remove one wrong and one insufficiently helpful comment.
257c1649 cmListFile: Remove unused member.
fe17092c cmMakefile: Remove bogus comment.
199b28ac Remove duplicate tag name.
6f82b5e8 Help: Link to properties in set_tests_properties.
66f5af29 Help: Link to properties in set_directory_properties docs.
f7dd3f7c Help: Add link in set_source_files_properties command docs.
3b256173 Help: Shorten too-long title marker.
8fc3a2fb Help: Add references to cmake-property sections.