In cmGlobalXCodeGenerator::Generate we generate a .xcodeproj for each
directory in the tree containing a project() command. First we
iteratively use SetGenerationRoot to add "ALL_BUILD" and other targets
to each project. This leaves "CurrentProject" set to the last project
when we invoke cmGlobalGenerator::Generate, which is not the same as the
top-level project if any subdirectories invoke the project() command.
When cmGlobalGenerator::Generate reaches CreateGeneratorTargets it
constructs cmGeneratorTarget and calls ComputeTargetObjects exactly once
per target. In this context the value of CurrentProject is undefined so
we cannot pass it to GetObjectsNormalDirectory. Use "$(PROJECT_NAME)"
instead so it will adapt automatically to each project.
Also teach Tests/ObjectLibrary to cover this case.
1fc8df9 Add missing this->.
7a3ecf5 Fix memory leak in Makefile generator.
9f7dc83 Ninja: also bootstrap ninja files
5d365b2 Ninja: enable ninja support everywhere
d569f3e Ninja: void function can't return a value
52160bf Ninja: enable ninja on Mac so all Mac CDash-builds are tested, cleanup later
56aeac6 Ninja: fixes for bcc
7a6bc9e Ninja: remove 'this' from member initializer list
44ba4cf Ninja: remove warnings
7751966 Ninja: remove 'friend' in ninja code
c3988ee Re-factor OS X content generator start up.
f8e0a51 Re-factor framework directory computation.
f36c7b0 Re-factor Mac OS X content directory computation.
5d885db Re-factor bundle content copying rules generation.
3b2a01e Ninja: Use same echo message as makefiles.
7bb56c5 Re-factor CFBundle generation.
...
b47cffa CPack: Use bin subdir when looking for dpkg and rpmbuild
a8c659c Find dpkg and rpmbuild in usual Fink and MacPort paths
848f220 Do not run cpack at CMake time it is not available.
9e30289 Ninja: Cannot pass a reference to an anonymous object.
0a3d6a1 Ninja: make debug symbol suffix configurable by CMAKE_DEBUG_SYMBOL_SUFFIX
75bbffb Ninja: make TARGET_PDB a real .gdb file name
e5a27a4 Ninja: line length
ae8124a Ninja: also mingw needs TARGET_PDB
74d1c88 Ninja: cmcldeps needs absolute paths for RCs
1cdeef7 Ninja: readd quotes to src file path before patching it
84a18cb Ninja: also stop when .rc's .d file couldn't be generated
c864103 Ninja: path is already declared
6547f36 Ninja: more searching for windres
78588e0 Ninja: there could be null pointers
0c89c10 Ninja: search for windres with prefix
4654680 Ninja: windres is also used for cross-compiling
When a search path contains multiple "lib/" instances we previously
converted all or none. This fails for cases where only some of the
multiple instances must be converted. Teach AddArchitecturePaths to
generate all combinations that exist. Uncomment these cases in the
CMakeOnly.find_library test now that they work.
Simplify cmFindLibraryCommand::AddArchitecturePaths logic to avoid
recording a separate 'found' status and populating an entire
vector<string> just to throw it away.
Previously methods AddArchitecturePaths and AddLib64Paths were almost
identical. Replace the latter with a call to the former. Fix the
AddArchitecturePaths implementation to add trailing slashes to all
tested paths.
4bb94c9 Ninja: sysconf() is declared in unistd.h
bb36759 Ninja: enable response file support on Mac (length 262144)
3a2c8e8 Ninja: disable work around when linking with mingw
3856e66 Ninja: error on missing rspfile_content
8c1e35c Ninja: remove some unused default arguments
7f647cf Ninja: also write link libraries to rsp file
Since commit 7ced0732 (make default install component name configurable,
2012-05-13) the COMPONENT option has not worked in all cases. The
change restored use of the broken SetDefaultString previously removed by
commit 43cad3e4 (fix the default "Unspecified" component, 2008-03-26).
Remove SetDefaultString and use the default component name only when an
invocation does not specify a non-empty COMPONENT option value.
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680825
A common mistake is to write
macro(foo arg)
if(arg)
endif()
endmacro()
and expect if() to treat "arg" as a variable. The documentation of the
macro() command already states that arguments are not variables, but
users writing the if() command may not look at the macro() docs.
Add a note to the if() documentation.
The work around is only needed by older GCCs (only testet 4.4/4.7)
Ninja is very new so chances are high that there is also a new mingw.
Use slashes in link rsp file, because ar.exe can't handle \.
Previously CMake silently accepted the empty string and added a bogus
dependency on the current directory. Instead warn about the empty file
name and ignore it. We cannot make this an error because there may be
existing projects that accidentally depend on the old behavior.
Add a RunCMake.include test to cover this case.
6b31d39 Ninja: don't shadow 'outputs' variable
9b311fb Ninja: add soname test case
e3b1be2 Ninja: Clean all symlink created for libraries.
990f77e Ninja: remove int/size_t warning
361696a CTest: Add test to verify -D variable definitions work
c77b57b CTest: Allow -Dvar=value with no space between the D and the var
93d084c CTest: Extend -D command line arg handling for variable definitions
af29848 CTest: Rename local variable for clarity
24ba0fd CTest: Refactor error output into ErrorMessageUnknownDashDValue
20e133e man documentation: detect man section from the given filename
38df155 documentation: preparation for making the man section configurable
e6a935f -remove trailing whitespace
ca403b8 Construct the full path before escaping it.
f9383a9 STYLE: Fix line length, remove extra blank line
e30d46e Use full paths in compile_commands.json for out of source builds.
'ninja -t clean' only cleans built output and dep files so all file
created as a side effect and not mentioned in the 'build' statement
would be omitted.
Commit 9090572f (Add ability to include a file in a project via a cache
variable, 2012-02-17) taught the project() command to check variable
"CMAKE_PROJECT_<projectName>_INCLUDE" but the documentation included an
extra "_FILE" by accident. Remove it.
In 2.8.7 running cpack with no arguments would run the packaging iff
a CPackConfig.cmake file is found whereas
In 2.8.8 it displays the help.
This commit restore the 2.8.7.
We should add a test for this but this is not included in this commit.
This patch adds a man section number, which is then used by the
DocumentationFormatterMan. The section number is right now always 1,
detecting this from the file name will be the next step.
Alex
Since commit e1409ac5 (Support building shared libraries or modules
without soname, 2012-04-22) CMake crashes on the code
add_library(foo SHARED foo.nolang)
because the logic to lookup the language's soname flag was moved from
cmTarget::GetLibraryNames to cmMakefile::GetSONameFlag without its check
for a NULL language. Restore the check for NULL.
Add RunCMake.Languages test to cover language error cases like this one.
If a source file extension is not recognized as any language then
src.GetLanguage() may return NULL. Check the result before
dereferencing in cmLocalGenerator::GetObjectFileNameWithoutTarget.
eb410e8 Ninja: disable cldeps for bcc32, it's too old, and ninja would also not build
5ead31d Ninja: try work around for bcc32 bug
1333b57 Ninja: build server fixes
9081e3a remove warning about unused parameter
f430bea Ninja: maybe this fixes the bcc32 build
f2c1288 Ninja: msvc6 for-scoping
44b9bbc Ninja: build with old msvc versions
57156a5 Ninja: build server fixes
f1abdce Ninja: some bytes of the rc files couldn't be piped correctly
2de963d Ninja: don't remove space between command and parameters
50b6f33 Ninja: build cmcldeps with mingw
c05653e Ninja: try to make GetProcessId visible
ab245ff Ninja: but cl supports /nologo ...
bf58e9a Ninja: no /nologo option in old rc.exe
2fb07fc Ninja: Eclipse and KDevelop fixes for ninja
518c065 Ninja: don't pollute build dir with preprocessed rc files
...
32313fd Merge branch 'ninja-rspfile' into no-std-stringstream
e3a1f72 Ninja: find mingw's resource compiler
c60557e Ninja: don't break because of empty commands
128fe5d Ninja: also create rspfile rules
0266c9b Ninja: check for valid pointer
5aab7f9 Ninja: 30000 is too long for windows cmd
ad4a768 Ninja: add response file support on Windows
Clang tooling requires that paths in the directory and file JSON
fields are relative to the directory field, but clang doesn't normalize
the paths already. The result is that clang doesn't find the relevant
entry for files which begin with ../.
When linking with cmake and vs_link_* the command line
could be too long for cmd.exe, which needs not to be
called in this case. (was not cached by a test)
Introduce rules which don't use the shell and use this
rule when there are no pre or post step.
For free we get a small speedup, because cmd is then
not called.
Also be more accurate when estimating the
command line length.
All tests are passing as of this morning on the CMake dashboard in
the Nightly Expected section.
Nice job to all the Ninja+CMake contributors. Congrats!
rc.exe doesn't support /showIncludes.
Because .rc files also #include stuff we can
misuse cl.exe to get the included files.
Done one the fly by cmcldeps.
Windows and Apple machines have predominantly used case-insensitive
filesystems so our file(INSTALL) command uses case-insensitive pattern
matching. It is implemented by converting the pattern and file path to
lower case before matching. The FILES_MATCHING option is implemented by
excluding a path that does not match any pattern unless it is a
directory that must be searched recursively. However, the test that an
excluded path is a directory is executed on the lower-case path and
therefore fails on mixed-case input paths on case-sensitive filesystems.
Fix the file(INSTALL) implementation to use the lower-case path only for
pattern matching and preserve the original path for tests against the
real filesystem.
bd34963 Refactor generation of shared library flags
55d7aa4 Add platform variable for flags specific to shared libraries
31d7a0f Add platform variables for position independent code flags
Older C++ compilers do not provide a standard std::stringstream.
Use our compatibility interfaces instead.
Also avoid std::stringstream(openmode) signature. Our approximate
stringstream implementation provided when the standard one is not
available does not support the openmode argument.
CMAKE_SHARED_LIBRARY_<lang>_FLAGS has flags on various platforms for a
variety of purposes that are correlated with shared libraries but not
exclusive to them. Refactor generation of these flags to use new
purpose-specific platform variables
CMAKE_<lang>_COMPILE_OPTIONS_DLL
CMAKE_<lang>_COMPILE_OPTIONS_PIC
CMAKE_<lang>_COMPILE_OPTIONS_PIE
Activate the DLL flags specifically for shared libraries. Add a new
POSITION_INDEPENDENT_CODE target property to activate PIC/PIE flags, and
default to true for shared libraries to preserve default behavior.
Initialize the new property from CMAKE_POSITION_INDEPENDENT_CODE to
allow easy global configuration in projects.
Although the default behavior is unchanged by this refactoring, the new
approach ignores CMAKE_SHARED_LIBRARY_<lang>_FLAGS completely. We must
leave it set in case projects reference the value. Furthermore, if a
project modifies CMAKE_SHARED_LIBRARY_<lang>_FLAGS it expects the new
value to be used. Add policy CMP0018 to handle compatibility with
projects that modify this platform variable.
Add a PositionIndependentCode test on platforms where we can get
meaningful results.
When global property TARGET_SUPPORTS_SHARED_LIBS is FALSE we should
still allow OBJECT libraries. This was an oversight in commit b87d7a60
(Add OBJECT_LIBRARY target type, 2012-03-12). While at it, fix the
warning message to report context.
cmcldeps wraps cl and adds /showInclude before calling cl.
It parses the output of cl for used headers, drops system
headers and writes them to a GCC like dependency file.
cmcldeps uses ATM ninja code for process handling,
but could be ported later to SystemTools.
TODO: Why needs ninja multiple calls in the BuildDepends test?
Since commit c8ef6430 (Allow directory names containing '=' and warn if
necessary, 2012-02-06) we allow directories with '=' instead of
rejecting them as was previously done since commit 8704525f (Reject
directory names containing '=', 2011-01-14). However, we did not warn
in all cases that '=' may cause failure, such as when it appears on the
right-hand side of a dependency line.
Both commits above were made assuming that '=' cannot be escaped in Make
syntax, but it can be achieved with a variable:
EQUALS = =
left$(EQUALS)side : right$(EQUALS)side
Use this approach to escape '=' in dependency lines, thus supporting
the character in paths.
All our tests now pass when CMake is built in source and build trees
both containing '=', except for the "OutOfSource" test. It fails in
its coverage of the obscure "OutOfBinary" test case where part of the
build tree is located outside the main build tree of the test. The
reason is that CMake must invoke a command like
$(MAKE) -f /path/with=sign/build.make /path/with=sign/somefile
but the make tool interprets the last argument as a variable assignment.
This is an acceptable limitation, since the case is so obscure, in
exchange for supporting '=' cleanly otherwise.
When reading archive entries from disk strip any "fflags" entry headers
that may have been loaded from the filesystem when libarchive is built
with HAVE_STRUCT_STAT_ST_FLAGS (struct stat has 'st_flags'). The local
filesystem flags are not useful for distribution. Furthermore, GNU tar
does not understand the "SCHILY.fflags" extended header used to store
the flags in the archive. Use the approach from commit e8558efa
(cmArchiveWrite: Clear xattr and acl from entries, 2011-04-07) to remove
the flags and avoid producing the non-portable extended header.
When MinGW is used slashes are used for dependencies
because ar.exe can't read rsp files with backslashes.
Many thx to Claus Klein for starting working on this.
Building CMake with g++ 2.9-aix51-020209 on an AIX 5.3 system gives:
cmsys/hashtable.hxx: In function `const long unsigned int *cmsys::get_stl_prime_list ()':
cmsys/hashtable.hxx:399: warning: sorry: semantics of inline function static data
`const long unsigned int _stl_prime_list[31]' are wrong (you'll wind up with multiple copies)
cmsys/hashtable.hxx:399: warning: you can work around this by removing the initializer
Give get_stl_prime_list internal linkage.
3545645 Exclude the CompileCommandOutput test on WIN32.
fbaddf4 Escape the source file to be compiled if required.
db839be Make the CMAKE_EXPORT_COMPILE_COMMANDS option work with Ninja.
8778357 Add newline to the output.
2c04bc0 Move the EscapeJSON method to a sharable location.
4986d52 Use CPACK_xxx and CMAKE_xxx in a consistent way.
f90223c Fix KWStyle warning
47f0dbd CPack add necessary check to detect/warns/error on ABSOLUTE DESTINATION
6ba055b CPack add easy possibility to warn about CPACK_SET_DESTDIR
Commit "KWSys: Fix SystemTools environment memory handling" (2012-04-26)
added a _WIN32 case inside !KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H to dllimport
the "environ" global. Howver, KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H is true
on every Windows toolchain we support so the case is never reached.
Furthermore, even if it were reached the use of dllimport is incorrect
because the toolchain might not be compiling with a dynamic runtime
library. Remove the unused incorrect line and supporting conditionals.
Fortran sources that pass through the C preprocessor may use
#include "header"
syntax or
#include <header>
syntax. CMake already follows the former. Teach it to follow the
latter.
More generally add the check for possible generator "activation" at
runtime depending on a generator specific check.
The dynamic behavior is currently implemented only for MacOS
and should be fully backward compatible for other system.
Inspired-By Tom Hughes <tomtheengineer@gmail.com>
CMAKE_xxx vars are now used in the CMake-generated cmake_install.cmake
script while CPACK_xxx equivalent vars are used from within CPack.
CPack is responsible for getting/forwarding definitions of
CPACK_xxxx var corresponding to CMAKE_xxxx when invoking
CMake-generated install scripts.
As a consequence:
CMAKE_ABSOLUTE_DESTINATION_FILES
CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
may be used from outside CPack as well.
e.g.
cmake -DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=1 -P cmake_install.cmake
works as expected.
c806b23 CDash now supports lots of files in coverage. So, show all files.
761d931 Do not try to run bullseye coverage if COVFILE env is empty.
5b69ce4 Update test data to match new coverage format.
1b418f1 Change GT.M Coverage Parser global
b0c07a1 Disable bullseye coverage for mumps coverage test.
0a169e6 Remove uncovered files from cache coverage data.
a7abf5e Add ability to specify more than one package directory or coverage directory.
220afca Use <TARGET_FILE> expression to run ctest so it works with Xcode and VS IDE.
62f6bce Use a script to run the test because WORKING_DIRECTORY is not in 2.8.2.
f5c5db0 Fix some warnings and a bug where it went past the length of a vector.
7955e99 Add support for Cache coverage.
a86cd33 Add virutal destructor to silence warning.
319eeb0 Add test for mumps coverage. Also refactor code to prepare for cache coverage.
72210c2 Fix line length.
dd07161 Fix warning about char* instead of const char*.
e6412e0 Add support to ctest for GTM mumps coverage.
In trace mode ('--trace'), any 'elseif' or 'else' commands that are
evaluated as part of a conditional block will be printed. Previously,
only the opening 'if' command of a conditional block was printed.
The [usually] wrong usage of absolute DESTINATION in INSTALL rules
keeps popping-up on the ML. We shall have some way to:
1) easily detect it.
2) forbids this for some CPack generator like NSIS
In fact it should certainly be forbidden for *any* generators
when used on Windows but we may implements that on top of the current
patch.
The patch ask the task to the generated cmake_install.cmake scripts.
Those scripts are a little bit more complicated with that but
iff there are absolute DESTINATION. This cost nothing if relative
DESTINATION are used.
Two new vars are introduced (and documented to handle that):
CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
and
CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
Until now an unnamed component was always named "Unspecified".
Now this name is taken from the new cmake variable CMAKE_INSTALL_DEFAULT_COMPONENT_NAME,
which is initialized to "Unspecified". But it can now be set to something
project-specific, per directory
Alex
The coverage global should be in the local namespace. This means the global
will be ^ZZCOVERAGE instead of ^COVERAGE. Change the parser to look for ^ZZCOVERAGE
instead of the old ^COVERAGE
Header files listed in a target's PUBLIC_HEADER or similar properties
are marked as OS X Framework content. Refactoring performed by
commit 11d9b211 (Add cmGeneratorTarget to represent a target during generation, 2012-03-07)
commit 45c2f932 (Simplify cmMakefileTargetGenerator using cmGeneratorTarget, 2012-03-07)
commit 328c0f65 (Simplify cmVisualStudio10TargetGenerator source classification, 2012-03-19)
and related commits accidentally removed such files from treatment as
normal header files by the VS generator (generators other than Makefiles
and Xcode). Move handling of such files out of cmGeneratorTarget and
back to cmMakefileTargetGenerator. The central cmGeneratorTarget
classification will always treat them as header or extra sources.
The hash_fun.hxx header is configured whether FundamentalType is enabled
or not and so cannot depend on it. Run the relevant platform tests
whether or not FundamentalType is on and configure the result directly
into hash_fun. While at it, remove the dependence of SystemInformation
on FundamentalType too since it needs only information that we now
always compute.
d931ce9 VS10: Generate relative source paths when possible (#12570)
b2e7c7a VS11: Do not use source path conversion workaround specific to VS 10
4248132 VS10: Convert paths normally unless forced to relative
c2ba6ba VS10: Simplify vcxproj.filter file generation
4f2d9d2 VS10: Refactor custom commands to use WriteSource
Add a boolean target property NO_SONAME which may be used to disable
soname for the specified shared library or module even if the platform
supports it. This property should be useful for private shared
libraries or various plugins which live in private directories and have
not been designed to be found or loaded globally.
Replace references to <CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG> and
hard-coded -install_name flags with a conditional <SONAME_FLAG> which is
expanded to the value of the CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG
definition as long as soname supports is enabled for the target in
question. Keep expanding CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG in
rules in case third party projects still use it. Such projects would
not yet use NO_SONAME so the adjacent <TARGET_SONAME> will always be
expanded. Make <TARGET_INSTALLNAME_DIR> NO_SONAME aware as well. Since
-install_name is soname on OS X, this should not be a problem if this
variable is expanded only if soname is enabled.
The Ninja generator performs rule variable substitution only once
globally per rule to put its own placeholders. Final substitution is
performed by ninja at build time. Therefore we cannot conditionally
replace the soname placeholders on a per-target basis. Rather than
omitting $SONAME from rules.ninja, simply do not write its contents for
targets which have NO_SONAME. Since 3 variables are affected by
NO_SONAME ($SONAME, $SONAME_FLAG, $INSTALLNAME_DIR), set them only if
soname is enabled.
Since commit ed0075bd (Use relative paths for custom command inputs,
2011-06-22) CMake generates full paths to source files in VS 10 project
files to avoid trouble with deep source/build tree paths. However, the VS
10 IDE will not populate the source file property dialog for a file
referenced by full path. Instead use a relative path when possible. When
not possible produce a detailed warning explaining the problem and
suggesting use of shorter directory paths.
CMake <= 2.8.4 generated VS 10 project files with a relative path to
source files. Then commit ed0075bd (Use relative paths for custom command
inputs, 2011-06-22) switched to using relative paths only for source files
holding custom commands and full paths for other sources. This behavior
was inhereted by the VS 11 generator but is not needed so use the
workaround only for exactly VS 10. Explain the behavior in comments.
Most CMake generators produce relative paths within the build tree and
full paths to files outside the build tree. Make VS 10 and VS 11
project files consistent with this approach except for paths forced to
be relative to work around a VS 10 bug.
Remove the duplicate source file classification logic used to generate
the filter files. Instead record during the main vcxproj file
generation the source files generated for each tool. Also record
whether or not each source file is converted to a relative path. Use
the recorded result during filter generation to ensure consistency
between the project file and filter file.
The SystemTools::PutEnv function tries to provide the "putenv" API
without leaking memory. However, the kwsysDeletingCharVector singleton
frees memory that may still be referenced by the environment table,
having been placed there by putenv. If any static destruction or
processing by an external tool happens after the singleton is destroyed
and accesses the environment it will read invalid memory.
Replace use of putenv with setenv/unsetenv when available. The latter
manage internal copies of the values passed instead of referencing the
original memory. When setenv/unsetenv are not available use putenv with
a singleton that removes its values from the environment before freeing
their memory. This requires an "unputenv" implementation. On at least
some platforms it must be written in terms of "putenv" because other
APIs are not available and direct modification of the "environ" global
is not safe (e.g. on Windows there is interaction with "wenviron").
Fortunately either putenv("A=") or putenv("A") will remove "A" from the
environment on these platforms. On other platforms fall back to direct
manipulation of "environ".
Also add UnPutEnv to the API and add a test for the behavior of both.
Generate anchors of the form
<a name="..."></a>
instead of
<a name="..."/>
to ensure browsers know that the anchor contains no text and do not try
to guess an end of the range. Also make the "section_Index" and item
label anchors empty instead of containing the section header or label
text. This ensures that the text associated with target anchors is not
rendered as if it were a hyperlink.
Since commit 4fbdce2b (try_compile: Use random executable file name,
2012-02-13) a different <target>.dir is used for each try-compile.
Cleanup the directories as well as their content to avoid accumulating
leftover temporary directories.
c9747f3 Ninja: CMAKE_USE_NINJA is the name of the macro
2a081a2 Ninja: no additional variable needed to enable ninja
b8c3e8c Ninja: enable Ninja for CodeBlocks
11bd9b5 Ninja: remove GCC -Wshadow warning
f93e818 Ninja: add option to enable ninja where it is not enabled by default
73426ac Ninja: no 16:9 screens for the cmake team ;)
8217c26 Ninja: ensure output directories exist
KWSys is no longer shared in projects via a server-side directory
symlink in CVS. An automated nightly date stamp commit can no longer be
shared by multiple projects directly. It needs a per-project replay
robot so the nightly commits end up needing N+1 robots instead of N.
Remove the DateStamp feature because it is no longer useful or
maintained by nightly commits.
Replace use of AppendEnv/RestoreEnv pairs with instances of
SaveRestoreEnvironment. Simplify the signature of AppendEnv and use it
in place of similar loops elsewhere. Move the RestoreEnv implementation
inside the SaveRestoreEnvironment destructor which is the only place
left that calls it.
Move the CMake version number components out of "CMakeLists.txt" into
dedicated file "Source/CMakeVersion.cmake". Set the TWEAK level to the
date explicitly. Add a "Source/CMakeVersion.bash" script to update the
date, thus replacing KWSys DateStamp for CMake. Teach the bootstrap
script to extract the version components from their new location.
It seems that file.seekg(0) will, in some circumstances, cause the next
file.getline() to omit the first character it reads. Workaround the
bug by seeking from ios::beg explicitly.
Hide custom command .rule files inside the CMakeFiles directory. Ensure
a short, deterministic, and unique name by using a hash of the directory
path containing the output file. Preserve the file name so the entry in
the IDE is human-readable. Clarify the comment that explains why the
rule file must be created on disk.
Add cmGlobalGenerator::GenerateRuleFile to compute a generator-specific
rule file location. This will allow specific generators to override the
location of .rule files without changing the behavior of other
generators.
Teach cmMakefile::AddCustomCommandToOutput to return the cmSourceFile
instance to which the custom command is attached. Use the return value
instead of separately adding a .rule extension and searching for the
source. Mark CMake-generated .rule files explicitly with a property
instead of trusting the file extension.
When loading a find module or package config file the find_package
command defines several variables to provide information about the
caller's request. Previously this was documented only in the
Modules/readme.txt file which is not distributed. Document the
behavior explicitly in the main find_package documentation.
Since commit ed1ea24c (Fix INSERT to allow inserting to empty list,
2006-05-15) the list command allows insertion into an empty list at
index 0. Fix rejection of insertion at non-zero (negative) indices to
present an error message instead of crashing.
While at it, fix the error message of the GET and REMOVE_AT operations
when the list is empty to not present a bogus allowed range.
Add a "RunCMake.list" test to cover failure cases on empty lists.
Commit ffbe61bb (make sure english is used for output of gcov, 2008-05-10)
taught ctest_coverage to set LC_ALL=POSIX to get English output from gcov.
Use the more portable value LC_ALL=C and restore the original value when
finished.
This commit creates a dummy text file for each OBJECT library for
the CodeBlocks generator, so the generated project file can reference
a unique file for each target. Most probably these files are unused.
Alex
01e979a VS: Add CMakeLists.txt re-run rules at start of generation
9a2c60e Classify known header file extensions as headers
1c48992 Always compile sources with known language
Previously, we were setting the default configuration for a generated
Xcode project to the hard-coded string "Debug" even in cases where users
customized their configuration types such that the list did not contain
"Debug". Now, we use the first string listed in CMAKE_CONFIGURATION_TYPES
as the default config for generated Xcode projects.
Refactoring in commit a2514f15 (Simplify cmNinjaTargetGenerator using
cmGeneratorTarget, 2012-03-13) accidentally removed mapping of .def file
paths through ConvertToNinjaPath (via GetSourceFilePath). Take the
ModuleDefinitionFile value from cmGeneratorTarget and map it correctly
through ConvertToNinjaPath.
In addition to generating cleaner paths in the ninja build files this
correctly links up references to a generated .def file with the custom
command output that produces it.
Since commit 328c0f65 (Simplify cmVisualStudio10TargetGenerator source
classification, 2012-03-19) the VS 10 generator uses the
cmGeneratorTarget source classification instead of directly getting the
list of source files from the target. This accidentally dropped the
CMakeLists.txt files from generated projects because they are added too
late for cmGeneratorTarget.
All generator-specific source files must be added to targets prior to
cmGeneratorTarget construction. Refactor addition of the CMakeLists.txt
files with CMake re-run custom commands to take place before normal
generation begins, and therefore early enough to be included in the
cmGeneratorTarget classification.
Commit 328c0f65 (Simplify cmVisualStudio10TargetGenerator source
classification, 2012-03-19) introduced the first use of source
classification from cmGeneratorTarget (which originated as Makefile
generator logic) in a Visual Studio generator for handling of header
files. Fix classification of header files to match known header
extensions instead of only the HEADER_FILE_ONLY property. Make it
consistent with the "Header Files" source group.
Refactoring by commit 11d9b211 (Add cmGeneratorTarget to represent a
target during generation, 2012-03-07) and commit 45c2f932 (Simplify
cmMakefileTargetGenerator using cmGeneratorTarget, 2012-03-07) preserved
behavior introduced by commit 7740ccd1 (some cleanup of the makefile
generator, 2006-02-14) that favored the IgnoreFile extension test over
the availability of a known compilation language associated with a
source file. If a source is not marked as HEADER_FILE_ONLY and has a
known language extension or an explicit LANGUAGE property it should be
treated as that language. The LANGUAGE source file property
documentation says so.
9b32475 automoc: add define to test which caused bug #130182066511 automoc: fix#13018, proper cmake escaping to avoid false rebuilds
c652812 make cmLocalGenerator::EscapeForCMake() static
The variables stored in the AutomocInfo.cmake file were not properly
escaped, so when reading them back they could turn into lists, if they
contained double quotes initially.
This patch fixes this by using cmLocalGenerator::EscapeForCMake() to
escape the variables properly.
Alex
Patch by Amine Khaldi!
Also, start using the -MT flag to set a target name for depfiles.
This works around a bug observed in distcc, as explained in the
comment. Based on a patch by Alexander Usov.
Commit 9a6ff950 (Fix for bug where VS2010 did not use .obj files,
2011-04-01) assumed that if an external object is GENERATED that it is
the output of a custom command in the current target. If it is
generated by another target then VS will not automatically include the
external object in the current target. This bug was preserved by the
refactoring in the parent commit.
Instead use <None> for external objects generated by a custom command in
the current target and <Object> for all other external objects. Update
the ExternalOBJ test to cover this case.
Combine WriteCLSources and WriteObjSources into a single method. Use
the cmGeneratorTarget source classification to simplify tool selection
for each source file. Extend the classification to handle .idl files.
0cf8447 find_package: additional test for checking the error message
56ae3f9 find_package: add test for setting Foo_FOUND to FALSE in a Config file
16c0c73 find_package: allow <pkg>Config.cmake to set <pkg>_FOUND to FALSE
0f4dfa6 CPack: Use real path to PackageMaker to find its version file (#12621)
4693cf8 Xcode: Detect new default locations of Xcode 4.3 bits and pieces (#12621)
* ninja-object-library: (37 commits)
Ninja: Honor $<TARGET_OBJECTS:...> source expressions
Build object library targets in Ninja
Pre-compute object file names before Ninja generation
Simplify cmNinjaTargetGenerator using cmGeneratorTarget
Ninja: Avoid using 'this' in member initializers
Ninja: Fix for PDB files with spaces in the path.
Ninja: Constify use of cmCustomCommand
Ninja: add /DEF: flag to linker call
Ninja: Add a cache option CMAKE_ENABLE_NINJA to enable the ninja generator.
Ninja: Add friend struct so it can access the private ConvertToNinjaPath.
Ninja: add .def file support
Ninja: ensure the output dir exists at compile time
Ninja: Remove an unnecessary variable
Ninja: Use cmSystemTools::ExpandListArgument to split compile/link commands
Ninja: Add a missed license header
Ninja: CMake: Adapt Ninja generator for per-target include dirs
Ninja: windows msvc: create for each target a .pdb file
Ninja: Import library support for Windows
Ninja: mark the Windows specific hacks with a comment only
Ninja: disable unfinished Windows ninja support
...
Treat OBJECT libraries as STATIC libraries. The Xcode project file
format provides no way to avoid running the libtool so hide the
resulting .a away next to the object files as it should never be
referenced. The object files will be left behind for reference by other
targets later.
This patch adds documentation for OPTIONAL_COMPONENTS to cmFindPackage.cxx,
and also extends Modules/readme.txt significantly with regard to how
components should be handled.
Alex
Add an OPTIONAL_COMPONENTS keyword to find_package() so we can have a
clear distinction between required and optional components. Don't allow
a component to be both required and optional.
Alex
8485208 Ninja: shell escape $(CMAKE_SOURCE_DIR) and $(CMAKE_BINARY_DIR)
df84767 Ninja: add support for OBJECT_OUTPUTS, fix PrecompiledHeader test case
48eb7fc Ninja: Avoid using 'this' in member initializers
bba37dd Ninja: Fix for PDB files with spaces in the path.
ac800f4 Ninja: Constify use of cmCustomCommand
9a0d5a8 Ninja: add /DEF: flag to linker call
d40eebd Ninja: Add a cache option CMAKE_ENABLE_NINJA to enable the ninja generator.
8c63433 Ninja: Add friend struct so it can access the private ConvertToNinjaPath.
dbe3dce Ninja: add .def file support
f1bb08f Ninja: ensure the output dir exists at compile time
7a6b5f4 Ninja: Remove an unnecessary variable
80ff210 Ninja: Use cmSystemTools::ExpandListArgument to split compile/link commands
d2731a3 Ninja: Add a missed license header
eabc9b0 Ninja: CMake: Adapt Ninja generator for per-target include dirs
bada88e Merge branch 'target-include-directories' into ninja-generator
54bd175 Ninja: windows msvc: create for each target a .pdb file
...
For example, when CPACK_<GEN>_COMPONENT_INSTALL and
CPACK_MONOLITHIC_INSTALL are both set. Previously, this
combination of variable settings produced an error without
any explanation. Now, in this case CPACK_MONOLITHIC_INSTALL wins
without trouble.
This is useful for when e.g. CPACK_ARCHIVE_COMPONENT_INSTALL is
globally on and one wants MONOLITHIC install for STGZ (but not
other generators). The same behavior may be obtained by re-setting
CPACK_ARCHIVE_COMPONENT_INSTALL to 0 but in any case the
'both set' case should have been handled without error.