When the policy was added by commit 783bce29 (Export: Disallow exported
interface includes in src/build tree, 2014-03-31) it accidentally left a
code path that would warn when the include dir is in the install tree
but *not* in the source or build tree. Fix that.
Generalize the change from commit 39d0ade0 (Windows-GNU: Support
duplicate object names in large archives, 2014-04-14) to the default
archive rules. These rules have used an incremental append approach
since commit v2.8.0~1856 (Build large archives incrementally,
2008-08-04). Switch from "ar r" to "ar q" to be sure we always append
objects instead of replacing them.
Extend CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES with these paths. We
already have the equivalents under /usr. Systems that have these
directories have their dynamic loaders configured already. Do not allow
them to appear in the RPATH explicitly.
As explained in cmVisualStudio10TargetGenerator::WriteSource comments,
VS tools append relative paths to the current directory, e.g.
c:\path\to\current\dir\..\..\..\relative\path\to\source.c
and fail if this is over 250 charaters or so. Previously we used a full
path only if no relative path could be constructed with a leading "../"
sequence that does not escape the source or build tree. This means that
long relative paths can be generated when the build tree is inside the
source tree, and can cause build failures due to the above path
concatenation problem.
Teach cmVisualStudio10TargetGenerator::ConvertPath to ask the Convert
method to honor CMAKE_USE_RELATIVE_PATHS. This will cause it to use
full paths by default but still give users the option of getting the
relative paths when possible.
Suggested-by: Josh Green <inbilla@gmail.com>
f21ac16e Replace MATCHES test on numbers with EQUAL test
7eacbaed Replace MATCHES ".+" tests with NOT STREQUAL ""
3a71d34c Use CMAKE_SYSTEM_NAME instead of CMAKE_SYSTEM where sufficient
b0b4b460 Remove .* expressions from beginning and end of MATCHES regexs
5bd48ac5 Replace string(REGEX REPLACE) with string(REPLACE) where possible
2622bc3f Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)
97f2b7f5 Ninja: set correct LANGUAGE_COMPILE_FLAGS when linking
49fcffc6 Ninja: cmake formatting, make code more readable
b735c8cb MinGW: link like on Unix and use compile flags when linking
We don't do crypto here, so a "poor" random doesn't matter. In fact we have API
to allow people to get a repeatable sequence by setting a specific seed.
In libarchive/archive_write_set_format_zip.c there are two calls to
archive_le32enc whose second argument is of the form
archive_entry_mode(zip->entry) << 16
However, the return type from archive_entry_mode may be a signed integer
so the shift may overflow. Since the second argument of archive_le32enc
expects uint32_t anyway, simply cast to that prior to shifting.
Replace it by cmStandardIncludes.h which drags in the proper header depending
on what the compiler provides to fix this error:
CMake/Source/cmExtraCodeLiteGenerator.cxx:27: sstream: No such file or directory
OpenBSD defines Elf64_Dyn::d_tag to be of an unsigned type, which differs from
what most other platforms do and what is the case for 32 bit. To have the tag
as unsigned makes sense, but this causes a compilation warning:
/.../CMake/Source/cmELF.cxx: In member function 'const cmELF::StringEntry* cmELFInternalImpl<Types>::GetDynamicSectionString(int) [with Types = cmELFTypes64]':
/.../CMake/Source/cmELF.cxx:945: instantiated from here
/.../CMake/Source/cmELF.cxx:668: warning: comparison between signed and unsigned integer expressions
Add an explicit typedef to cast the value to for 32 and 64 bit. That type is
unsigned and has the proper length for both platforms so no information is
lost. Explicitely cast both arguments before comparing them to avoid the
warning in all situations.
Since commit v2.6.0~388 (Added build rule variables
CMAKE_<LANG>_ARCHIVE_..., 2008-01-29) we use separate "ar cr ..." and
"ar r ..." steps to incrementally add a large list of object files to an
archive. Since the "r" command replaces existing objects of the same
name in an archive, if multiple objects have the same file name and
appear in separate append steps then one overwrites the other. Instead,
use "ar cq ..." and "ar q ..." to always append to the archive.
We already remove the archive before creating it so this will not cause
objects to be appended to existing archives on incremental rebuilds.