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.
Necessary for the Xcode generator, in which the CMakeLists.txt
files are added as sources merely for convenient access, without
any associated custom command.
Implement cmGlobalGenerator::ComputeTargetObjects in the Ninja generator
to pre-compute all the object file names. Use the results during
generation instead of re-computing it later.
Describe the OBJECT library signature of add_library and the
$<TARGET_OBJECTS:...> expressions needed to use object libraries.
Also document the what is not allowed for object library targets.
For now do not allow an OBJECT library to reference other object
libraries. Teach cmTarget::ComputeLinkImplementation to include the
languages of object libraries used by a target.
The write code introduced by commit 0b0d1b1d (add CMakeCache.txt
support, 2001-02-22) uses a temporary file but does not replace the
original atomically. Use cmGeneratedFileStream to do both
copy-if-different and atomic replacement.
Before, find_package in Config mode always set Foo_FOUND to true if the
Config file has been found and could be executed.
If the Config file itself detected some problem, like a missing dependency,
it did not have a way to signal to the outside that the package is not working.
With this patch, if a Config file sets Foo_FOUND to FALSE, this is taken into
account and not overridden.
Alex
Treat OBJECT libraries as STATIC libraries. The VS project file format
provides no way to avoid running the librarian so hide the resulting
.lib 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 library type can compile sources to object files but does not link
or archive them. It will be useful to reference from executable and
normal library targets for direct inclusion of object files in them.
Diagnose and reject the following as errors:
* An OBJECT library may not be referenced in target_link_libraries.
* An OBJECT library may contain only compiling sources and supporting
headers and custom commands. Other source types that are not normally
ignored are not allowed.
* An OBJECT library may not have PRE_BUILD, PRE_LINK, or POST_BUILD
commands.
* An OBJECT library may not be installed, exported, or imported.
Some of these cases may be supported in the future but are not for now.
Teach the VS generator that OBJECT_LIBRARY targets are "linkable" just
like STATIC_LIBRARY targets for the LinkLibraryDependencies behavior.
On machines where a usr/bin/packagemaker symlink is found, we were
unable to find the version.plist file relative to the symlink.
Resolve the symlink first, so we can find it relative to the
real PackageMaker.
Add cmGeneratorTarget::ObjectDirectory member to hold the value. In
ComputeTargetObjects set the value to the full path to the target object
directory including any necessary placeholder for the configuration
name.
CMake does not automatically pass the Fortran module output directory
location to the module search path. Add a note to the documentation
that the location must also be specified by INCLUDE_DIRECTORIES.
Rename cmGlobalGenerator::GetCMakeCFG{InitDirectory => IntDir} to
have a shorter name without a typo. Add a 'const' qualifier since
the method is only for lookup and never needs to modify anything.
Implement cmGlobalGenerator::ComputeTargetObjects in the VS generator
to pre-compute all the object file names. Use the results during
generation instead of re-computing it later.
Add a virtual cmGlobalGenerator::ComputeTargetObjects method invoked
during cmGeneratorTarget construction. Implement it in the Makefile
generator to pre-compute all object file names for each target. Use
the results during generation instead of re-computing it later.
Construct the instances after the final set of targets is known but
before computing inter-target dependencies. This order will allow
initialization of cmGeneratorTarget instances to adjust and finalize
declared inter-target dependencies.
Some per-target information and logic is common to all generators.
Some of that information is currently stored in cmTarget but that
should be reserved for the configure step. Create a class to hold
per-target information for generators. On construction classify
sources from the target and store them in separate members. This
classification is already implemented separately in each generator.
The long-standing sporadic failures of CPack tests on the Mac dashboards
are caused by an occasional problem running hdiutil. To compensate for
this, a retry loop was added in the code in a previous commit: a9fa71a4
... but the logic for breaking out of the retry loop was flawed, breaking
out of the loop (and not retrying) when the hdiutil command returns an
error instead of when it returns success.
This commit fixes the flawed logic, bumps up the number of retries from
4 to 10, and adds a half-second delay in between retries.
The delay is specifically added in case a virus checker or spotlight indexer
is temporarily causing the hdiutil failure by hanging onto a newly created
file longer than hdiutil expects it to.
As with all sporadically occurring issues, we'll never know if this is
really fixed all the way. But I'll be happy even if we can only get it to
happen just a bit less often.
Xcode 4.3 installs into "/Applications" by default, from the Mac App Store.
Also, the paths to the available SDKs changed: they are now within the
Xcode.app bundle.
PackageMaker is installed as a separate program, and may be installed
anywhere. It is not installed with Xcode 4.3 by default anymore.
Download the "Auxiliary Tools for Xcode" to get PackageMaker.
Put PackageMaker inside the Xcode.app bundle, in its nested Applications
folder, or put it alongside Xcode in "/Applications" and CMake will find
it.
Update references to "find" paths: add new possible locations for finding
Xcode.app and PackageMaker.app. Prefer the most recent version's locations
first, but keep the old locations as fallback search paths, too.
Thanks to all the contributors who provided and tested out various patches
for fixing this issue. Especially, but by no means limited to:
Francisco Requena Espí, Jamie Kirkpatrick and drfrogsplat.
b28e7fa VS6: Avoid SBCS test on VS6 (#12189)
df19b9c VS6: Avoid _MBCS define when _SBCS is defined (#12189)
ba89e92 Visual Studio: Allow setting Single Byte Character Set (#12189)
d662dff Fix shadowed variable warning on dashboard results
f66e735 Fix compiler warning reported on older Borland dashboard.
d90eed4 Fix compiler error reported on older Borland dashboard.
8233636 Update the documentation regarding INCLUDE_DIRECTORIES.
d899eb7 Call ExpandVariablesInString for each target's INCLUDE_DIRECTORIES
c21db87 Make search paths ordered and unique
22021f0 Remove cmMakefile::GetIncludeDirectories
9106b56 Extract and use the INCLUDE_DIRECTORIES target properties.
840509b Keep the INCLUDE_DIRECTORIES target property up to date.
a4d5f7b Add API to get the ordered includes for a target.
8adaee2 CMake: Eliminate cmMakefile::IncludeDirectories
7620932 Remove include flags memoization.
97a5faa Make it safe to call this method without creating duplicates.
edd5303 Refactor GetIncludeFlags to take includes instead of fetching them
If in Config mode a configuration file could not be found, cmake printed
an error, but did not actually stop processing. With SetFatalErrorOccured
it does.
Alex
Simplify cmLocalVisualStudioGenerator::ComputeObjectNameRequirements to
loop over the original vector of source files instead of recursively
traversing source groups just to find the same files. Drop from
cmVisualStudio10TargetGenerator::ComputeObjectNames temporary source
group calculation now that it is not needed for computing object names.
Remove partial implementation added by commit ca0230a3 (check in initial
conv library stuff, 2007-02-16) since it was never finished. It does
not make sense for multi-configuration generators since no specific
build configuration is processed at CMake time.
This allows downstreams to use
set(CMAKE_WIN32_EXECUTABLE ON)
set(CMAKE_MACOSX_BUNDLE ON)
to create executables with the WIN32_EXECUTABLE and MACOSX_BUNDLE
properties set on by default.
09ff226 Merge branch 'add-const-qualifiers' into doxygen-fixes
31ab25c doxygen: MathCommand is not about string operators
486033a doxygen: review cmake.h
937bb4b doxygen: remove a few comments
4774590 doxygen: fix some comments in cmPolicies.h
4a48be3 doxygen: Small fixes in cmake.h apidocs
1e5b971 doxygen: Use proper syntax to document enum
54ab11c doxygen: Improve API docs of GetRealDependency
80072d4 doxygen: cmPropertyDefinition
eeaaffc find_package: Test error and warning messages in failure cases
52dffb9 Merge branch 'test-CMakeCommands' into find_package-improve-messages
d365104 find_package: Optionally warn when implicitly using Config mode
31ead5f find_package: Reject mixed use of MODULE- and CONFIG-only options
6d83083 find_package: mention requested version number in error message
9c39bbd find_package: add CONFIG mode keyword alias for NO_MODULE
f310f67 find_package: add MODULE mode to use only Find-modules
7d67dcf find_package: improve error message when no Find module is present
978d89b find_package: rename NoModule to UseFindModules
Remove dependency on /Developer/Headers/FlatCarbon when creating SLAs for DMG images.
Instead, of adding those .r files on the command line, include the necessary .r files
from the generated .r file.
Define variable CMAKE_FIND_PACKAGE_WARN_NO_MODULE for use by a project
that wants to use an explicit mode in every call to find_package in
order to generate more specific failure messages. Word the warning
using the new CONFIG and MODULE mode keywords when the minimum required
version of CMake is new enough to have them. Otherwise word the warning
using the old NO_MODULE mode keyword.
Inspired-by: Alex Neundorf <neundorf@kde.org>
Explain exactly why CMake is looking for a package configuration file
and who is expected to provide what:
CMake Error at CMakeLists.txt:7 (find_package):
By not providing "Find<pkg>.cmake" in CMAKE_MODULE_PATH the caller
has asked CMake to find a package configuration file provided by
"<pkg>", but CMake did not find one.
Could not find a package configuration file provided by "<pkg>"
with any of the names:
<pkg>Config.cmake
<pkg>-config.cmake
Add the installation prefix of "<pkg>" to CMAKE_PREFIX_PATH or
set "<pkg>_DIR" to a directory containing one of the above files.
If "<pkg>" provides separate development package or SDK be sure
it has been installed.
The first paragraph explains how CMake is interpreting the intention of
the caller. This puts the blame or credit at the call site in the
project code where it belongs both when it is a bug and when it is
intentional. It can be dropped in NO_MODULE mode.
Suggested-by: Brad King <brad.king@kitware.com>
In commit 41c2895b (Added version support to Config mode of find_package
command, 2008-01-28) the error message was computed but was not
reported. Add the SetError call to report it.
The purpose of the TargetType enumeration was overloaded for install
type because install rules were once recorded as targets. Factor the
install types out into their own enumeration.
This concerns all variables common to all CPack generators.
Variables mainly used and/or set in CPack.cmake are documented
therein. C++ built-in variables are documented in
cmCPackDocumentVariables.cxx.
The confluence of the ninja-generator and target-include-directories
branches conspired to produce a nice little compiler error when
they were both merged into 'next'...
Yay for Continuous dashboards!
For strict backwards compatibility only. This should be unnecessary at
this point, but introducing a policy to deprecate it properly is a
whole different topic branch...
Eliminate callers of cmMakefile::GetIncludeDirectories.
All callers of GetIncludeDirectories should go through the local generator
object.
Only the local generator calls cmTarget::GetIncludeDirectories directly.
35c48e1 Check*.cmake: Expand imported targets in CMAKE_REQUIRED_LIBRARIES
61cb4ea bootstrap: move while() and endwhile() into the bootstrap build
c9f2886 -don't pull in CheckTypeSize.cmake from the cmake which is being built
628f365 -remove trailing whitespace
Generally these are only required in build statements, as Ninja wants
to be able to chop paths up. But it doesn't hurt to also try to use
them in command line arguments.
This did not work because find_library() did only treat the given name as
complete filename if is matched "PREFIX.*SUFFIX":
find_library(MYLIB libfoo.so.2)
Now it is also taken as a whole if the name matches "PREFIX.*SUFFIX\..*".
If a variable exists called CMAKE_PROJECT_<projectName>_INCLUDE,
the file pointed to by that variable will be included as the last step
of the project command.
For Visual Studio using the Preprocessor Define _SBCS. This behavior
is similar to the way that _UNICODE and _MBCS work already.
Added tests to confirm this behavior.
Append a random number to the "cmTryCompileExec" file name to avoid
rapid creation and deletion of the same executable file name. Some
filesystems lock executable files when they are created and cause
subsequent try-compile tests to fail arbitrarily. Use a different
name each time to avoid conflict.
Even if there are no lines covered in the file the gcov coverage report still
contains valueable information, the amount of uncovered lines and which exactly
they are. Set 'Covered="true"' for files we have a gcov report for even if they
have no lines covered. Otherwise CDash will neither show the uncovered line
count nor the detailed coverage report for this file.
When CTEST_EXTRA_COVERAGE_GLOB was used to collect otherwise uncovered files
'Covered="true"' was unconditionally set, so this can't be worse here.
d4b77eb Avoid discovering system infos for documentation. Adding some path is enough.
9002f73 Fix non existent std::string::clear on VS6
02ccb32 Create getDocumentedModulesListInDir which may be used in other context.
24fbc28 Add missing section markup for CPackComponent
bafd8a9 Example of builtin variable documentation (i.e. only used in C++ source code).
543f1ad Make the load of script documentation more efficient and dynamic.
cdbd1a9 Fix another compiler warning due to a typo
52c53de Really avoid compiler warning about unused vars
37f90ed Calm down compiler warning about unused var
7c82b7f Fix potential bad memory access, thanks to Eike
62b589b Suppress unused var, beautify code, avoid 1 extra newline.
751713f Update bash completion file in order to handle new CPack doc options.
1629615 CPack Documentation extraction from CMake script begins to work
83e34dd Implement simple CMake script comment markup language.
c6a0169 CPack begin the implementation of --help-command* and --help-variables*