Previously we silently ignored such calls and set nothing. The commit
"Initialize directory scope with closure of parent" inroduced a bad test
for the top scope. This commit fixes the test to avoid dereferencing a
null pointer, and adds a warning when the case is encountered.
This allows for a built in bzip and zip capability, so external tools
will not be needed for these packagers. The cmake -E tar xf should be
able to handle all compression types now as well.
We create per-configuration target properties to specify ARCHIVE,
LIBRARY, and RUNTIME output directories. The properties override the
generic properties for the <CONFIG> configuration:
ARCHIVE_OUTPUT_DIRECTORY -> ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>
LIBRARY_OUTPUT_DIRECTORY -> LIBRARY_OUTPUT_DIRECTORY_<CONFIG>
RUNTIME_OUTPUT_DIRECTORY -> RUNTIME_OUTPUT_DIRECTORY_<CONFIG>
For multi-configuration generators, the per-configuration subdirectory
normally appended to the generic output directory is not added to the
configuration-specific property values. This allows projects to set the
exact location at which binaries will be placed for each configuration.
See issue #9163.
VS 6 forgets to create the output directory for a static library if it
differs from the intermediate files directory. We work around this VS
bug by creating a pre-link event on the library target to make the
directory.
This commit removes use of configuration-less cmTarget::GetDirectory()
by the VS 6 generator (except for compatibility with user templates).
We replace OUTPUT_DIRECTORY_<CONFIG> tokens in the templates using the
per-configuration result of cmTarget::GetDirectory(config).
The try_compile() command's COPY_FILE option should not try to actually
copy the file if it cannot be found. Some C runtime library's fopen
cannot handle an empty file name.
Previously the Xcode generator set SYMROOT to be the target output
directory. This told Xcode to put the "<proj>.build" directory in the
output path too.
This commit sets SYMROOT, CONFIGURATION_BUILD_DIR, and OBJROOT to put
intermediate files in the build directory corresponding to the source
directory that created each target. This is more consistent with the VS
IDE generators. Now only the build output files (actual targets) go to
the target output directory.
The commit "modified the if command to address bug 9123 some" changed
the if() command behavior with respect to named boolean constants. It
introduced policy CMP0012 to provide compatibility. However, it also
changed behavior with respect to numbers (like '2') but did not cover
the change with the policy. Also, the behavior it created for numbers
is confusing ('2' is false).
This commit teaches if() to recognize numbers again, and treats them
like the C language does in terms of boolean conversion. We also fix
the CMP0012 check to trigger in all cases where the result of boolean
coersion differs from that produced by CMake 2.6.4.
The if() command reports its arguments at the beginning of some error
messages. Originally it reported the un-expanded form of the arguments
because in ancient CMake versions no context information was available.
Now it is more useful to see the real arguments, which may be mentioned
in the main error message. Since full context information is now
available, users can refer back to the source if they need to see the
unexpanded form of the arguments.
For example, the code
set(regex "++")
if("x" MATCHES "${regex}")
endif()
now produces the message
if given arguments:
"x" "MATCHES" "++"
Regular expression "++" cannot compile
instead of
if given arguments
"x" MATCHES "${regex}"
Regular expression "++" cannot compile
The commit "Set version info for shared libs on OSX" taught the Xcode
generator to honor VERSION and SOVERSION properties. However, it also
set version '1.0.0' as the default when no version property is set,
which is inconsistent with the Makefiles generator. This commit fixes
the default to '0.0.0' for consistency.
See issue #9773.
The reverted commit attempted to preserve the "../" PREFIX work-around
for avoiding per-config build directories in the VS IDE generators.
However, the original reporter has concluded that a "../" PREFIX no
longer works everywhere in VS 10 project files anyway. Rather than set
OutputPath, this commit restores the $(OutDir)$(TargetName)$(TargetExt)
default.
See issue #9768.
This commit fixes the cmparseMSBuildXML.py script to generate correct
flag table entries for booleans with optional value. These flags use
two entries: the first should ignore the value and enable the option,
and the second should use the value if given. Previously the first
entry did not recognize flags with values.
In particular this fixes flags like /MP4, but the change corrects
matching of some other flags too. See issue #9771.
This commit teaches the VS 10 generator to detect the -D_UNICODE option
in preprocessor definitions and set the CharacterSet attribute to the
value 'Unicode'. This was already done for other VS IDE versions.
See issue #9769
The default $(OutDir)$(TargetName)$(TargetExt) for this value works in
most cases because we set the three properties. However, if the target
property PREFIX contains a path component (not documented but happens to
work in other VS generators) we drop it from TargetName and do not put
it in OutDir either. This commit corrects the resulting path by setting
the OutputPath property explicitly with the full path.
See issue #9768.