Commit Graph

2719 Commits

Author SHA1 Message Date
Clinton Stimpson a5aadcd46d CFBundle test: Add isysroot argument when calling Rez. 2013-11-06 06:42:44 -07:00
Brad King e313d397cd Merge topic 'fix-automoc-compile-definitions'
a1b9465 Automoc: Add directory-level COMPILE_DEFINITIONS to command line (#14535)
2013-11-05 13:32:15 -05:00
Stephen Kelly a1b9465bf8 Automoc: Add directory-level COMPILE_DEFINITIONS to command line (#14535)
In commit 18412153 (Refactor cmTarget::GetCompileDefinitions...,
2013-06-06) cmQtAutomoc was refactored to get all compile definitions
from the target instead of separately asking the target and querying the
directory-level COMPILE_DEFINITIONS property value.  While the
generation process does integrate directory-level COMPILE_DEFINITIONS
into the target definitions, this did not happen until after Automoc
targets are constructed.  Therefore the commit regressed use of
directory-level definitions in Automoc targets.

Factor the definition finalization logic out from the
cmGlobalGenerator::CreateGeneratorTargets method into a new
cmGlobalGenerator::FinalizeTargetCompileDefinitions method and call it
before constructing Automoc targets.  This will place the
directory-level definitions into the target in time to use them for the
Automoc targets.

Extend the QtAutomoc test to cover this case.
2013-11-05 12:00:49 -05:00
Brad King d9600f9880 Merge topic 'test-Assembler-no-g'
f60797f Tests/Assembler: Drop -g when generating sample assembly source
2013-11-05 11:42:01 -05:00
Brad King b4a1f442bb Merge topic 'policy-CMP0022-fixes-for-master'
b51696f CMP0022: Update target_link_libraries plain signature documentation
25b7f87 Merge branch 'policy-CMP0022-fixes' into policy-CMP0022-fixes-for-master
0a561a0 CMP0022: Warn about a given target at most once
23d21b7 Do not export INTERFACE_LINK_LIBRARIES from non-linkable targets
ef10b87 CMP0022: Plain target_link_libraries must populate link interface
0e06788 CMP0022: Add test for target_link_libraries plain signature
c0f4a61 CMP0022: Add unit test for null pointer check and message.
4b0cfa7 Merge branch 'output-CMP0022-entries' into policy-CMP0022-fixes
2013-11-04 07:54:20 -05:00
Brad King ae57fb8ef6 Merge topic 'robust-ctest_empty_binary_directory'
35fbc10 CTest: more aggressive implementation of ctest_empty_binary_directory()
9d9f102 Tests: added test for ctest_empty_binary_directory()
2013-11-04 07:53:47 -05:00
Brad King f3698f7c4a Merge topic 'cpack-drag-n-drop-rez'
53d6ebb cpack: For DragNDrop generator, add sysroot option when calling Rez.
193029c cpack: For DragNDrop generator, add sysroot option when calling Rez.
2013-11-04 07:53:25 -05:00
Brad King 25b7f87eca Merge branch 'policy-CMP0022-fixes' into policy-CMP0022-fixes-for-master
Resolve conflict in Source/cmTarget.cxx by integrating the changes to
the internal copy constructor from both sides.  Also resolve a logical
conflict by dropping the special case for INTERFACE_LIBRARY targets.
Since cmTarget::SetMakefile already forces CMP0022 to NEW for such
targets we need no special handling.

Resolve conflict in Source/cmTargetLinkLibrariesCommand.h by dropping
the documentation change.  We will make the same change in the new
location of the same documentation in a separate commit.

Resolve conflicts in

 Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt
 Tests/RunCMake/CMP0022/RunCMakeTest.cmake

by taking the side from the 'policy-CMP0022-fixes' branch.
2013-11-03 09:20:47 -05:00
Brad King 0a561a0347 CMP0022: Warn about a given target at most once
Since cmTarget::ComputeLinkInterface is called separately for each
"head" target that links a target, the warning we produce when
CMP0022 is not set could be repeated.  Add explicit logic to allow
the warning to appear at most once.  Multiple copies of the warning
for the same target are almost always identical and therefore
redundant.  In the rare case that two copies of the warning are
different, the second can appear in a future run after the first
is fixed.
2013-11-03 09:14:54 -05:00
Brad King 23d21b78e1 Do not export INTERFACE_LINK_LIBRARIES from non-linkable targets
When cmExportFileGenerator::SetImportLinkInterface exports the old
LINK_INTERFACE_LIBRARIES property values it skips doing so for
non-linkable targets because target->GetLinkInterface returns NULL for
such targets.

Since cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty
looks at the INTERFACE_LINK_LIBRARIES property directly instead of using
the computed link interface, teach it to skip exporting the property if
target->IsLinkable returns false.

Extend the RunCMake.CMP0022 test with a case covering this.  Simply
export an executable target that links to a library that is not
exported.
2013-11-02 14:51:07 -04:00
Brad King ef10b87cc1 CMP0022: Plain target_link_libraries must populate link interface
The CMP0022 NEW behavior is that the INTERFACE_LINK_LIBRARIES property
exactly defines the link interface.  The plain target_link_libraries
signature says linking is transitive by default, so it should populate
the property.

Teach the target_link_libraries plain signature to populate the
INTERFACE_LINK_LIBRARIES regardless of the CMP0022 setting.  Refactor
the cmTarget::ComputeLinkInterface checks that warn when the policy is
not set to compare the new property to either the explicitly set old
link interface properties or the link implementation fallback for all
linkable target types, not just static libraries.

This fixes a regression in 2.8.12.0 that caused target_link_libraries to
not implement transitive linking in the plain signature once the policy
CMP0022 is set to NEW.
2013-11-02 12:55:17 -04:00
Stephen Kelly 0e06788c0a CMP0022: Add test for target_link_libraries plain signature 2013-11-02 12:48:48 -04:00
Stephen Kelly c0f4a61074 CMP0022: Add unit test for null pointer check and message. 2013-11-02 12:48:40 -04:00
Brad King 4b0cfa7004 Merge branch 'output-CMP0022-entries' into policy-CMP0022-fixes 2013-11-02 12:47:45 -04:00
Brad King f61bbf1b90 Merge topic 'ctest-p4'
1b54b1d ctest_update: Do not remove the p4 depot name
2013-11-02 10:54:42 -04:00
Brad King 872a9d6476 Merge topic 'object-library-no-TARGET_FILE'
d960589 Genex: Reject $<TARGET_FILE:...> for object libraries (#14532)
2013-11-02 10:54:23 -04:00
Brad King 53ac9b8d86 Merge topic 'object-library-missing-source'
5a2fc3d Check for OBJECT_LIBRARY source files at start of generation
2013-11-02 10:54:15 -04:00
Brad King 2043a86b6a Merge topic 'doc-rst-note-and-productionlist'
450b515 cmRST: Add support for the note and productionlist directives
2013-11-02 10:54:10 -04:00
Nils Gladitz 9d9f102f53 Tests: added test for ctest_empty_binary_directory() 2013-11-01 21:32:16 +01:00
Brad King 5a2fc3d696 Check for OBJECT_LIBRARY source files at start of generation
Teach cmGlobalGenerator::CheckTargets to include OBJECT_LIBRARY targets
in the check for source file existence.

Extend the RunCMake.ObjectLibrary test to cover this case.
2013-11-01 14:46:58 -04:00
Brad King f60797f75b Tests/Assembler: Drop -g when generating sample assembly source
Some compilers, such as Clang on OS X, do not want the -g flag for both
generating assembly code and assembling it.  Drop the -g flag from
generation of main.s in the Assembler test.
2013-11-01 10:55:58 -04:00
Brad King d960589778 Genex: Reject $<TARGET_FILE:...> for object libraries (#14532)
Teach the cmGeneratorExpressionEvaluator filesystem artifact logic
to reject OBJECT_LIBRARY targets since they have no main artifact.
Without the explicit rejection evaluation falls through to an
internal CMake error message in cmTarget::GetOutputInfo.

Extend the RunCMake.GeneratorExpression test to cover these cases.
2013-11-01 10:17:01 -04:00
Brad King e065decd43 Merge topic 'add-CMAKE_FIND_NO_INSTALL_PREFIX'
fe057ab Allow disabling adding the install prefix to the prefix search path.
2013-11-01 09:40:19 -04:00
Brad King a549b68d37 Merge topic 'cmake-syntax-recorded-brackets'
b54dbeb Test foreach/function/macro handling of bracket arguments
ccdf7e0 macro: Do not substitute for placeholders in bracket arguments
999abb9 macro: Add extra indentation to placeholder substitution code
2013-11-01 09:39:56 -04:00
Pedro Navarro 1b54b1d5b7 ctest_update: Do not remove the p4 depot name
Instead of removing the depot name, which causes problems when looking
at the file change list in CDash, make the Update test remove a given
prefix from the files retrieved from Update.xml.
2013-11-01 08:52:26 -04:00
Clinton Stimpson 193029c4aa cpack: For DragNDrop generator, add sysroot option when calling Rez.
Also adding overwrite option (-ov) in case multiple temporary
dmg files are being created.

Fixes bug #14536.
2013-10-31 20:25:12 -06:00
Stephen Kelly fe057ab3cd Allow disabling adding the install prefix to the prefix search path.
In certain scenarios, it is preferable to keep a 'dirty' install prefix
than to clear it, and to expect that content will not be found there.
Add a CMAKE_FIND_NO_INSTALL_PREFIX variable that can be set to disable
searching the install prefix.
2013-10-31 16:40:24 +01:00
Brad King d182a55adb Merge topic 'fix-ninja-launcher-errors-from-custom'
4fcb97e Tests: Add test for CTEST_USE_LAUNCHERS capture of custom commands
05c7042 Ninja: run custom commands through launcher if available
2013-10-31 09:39:54 -04:00
Nils Gladitz 4fcb97eaac Tests: Add test for CTEST_USE_LAUNCHERS capture of custom commands
This new test detects if custom command failures are detected with
launchers.
2013-10-31 09:29:55 -04:00
Brad King b54dbebf62 Test foreach/function/macro handling of bracket arguments
Bracket arguments recorded in command invocations inside foreach,
function, and macro blocks should not have any replacements done when
the arguments are replayed later.  Teach the RunCMake.Syntax test to
cover these cases.
2013-10-30 19:13:41 -04:00
Brad King 450b515ad0 cmRST: Add support for the note and productionlist directives
Simply print out the lines as normal paragraph text.  Teach the
CMakeLib.testRST test to cover this syntax.  Update the
cmake-developer.7 manual to document support for the directives.
2013-10-30 10:26:29 -04:00
Brad King 8640e52979 Add to RunCMake.Syntax test \-escape cases
Add an Escape1 test case covering \-escape cases inside bracket, quoted,
and unquoted arguments.  Also cover comments immediately after quoted
and unquoted arguments on lines containing \# escapes.
2013-10-29 10:21:50 -04:00
Brad King 144068e270 Add to RunCMake.Syntax test comments not separated by spaces
Extend the BracketComment5 test case to cover both bracket comments and
line comments starting immediately after a bracket comment closes.
2013-10-29 09:55:43 -04:00
Brad King 8f80eaf981 Merge topic 'fix-custom-source-with-flags-crash'
f037b9b Generators: don't append sources from utility targets to objectSources
2013-10-29 09:45:45 -04:00
Brad King fcbe435c23 Merge topic 'Qt-auto-generators'
9c87d9c Add automatic rcc invocation for Qt.
84218e1 Add automatic uic invocation for Qt.
94a0ca6 Record which files are skipped by automoc.
18fb758 Run the main executable created in the autogen tests.
e485ba1 Rename the QtAutomoc tests to QtAutogen.
7ce65c3 Add extra checks for the AUTOMOC target property.
32771fc Update output messages for generic use.
f371ab5 Rename RunAutomoc to RunAutogen.
85b3d6e Extract an SetupAutoMocTarget method.
ca124a1 Rename the AutomocInfo.cmake file to be more generic.
a342c9f Move some makefile definitions up away from moc-specific code.
98632ef Add the AUTOGEN_TARGETS_FOLDER and obsolete AUTOMOC_TARGETS_FOLDER.
63378ba Rename some variables to reflect broader scope.
97f1aa3 Rename method to reflect generic use.
4abb111 Rename local variable to reflect generic use.
03878c9 Move variable set to where it is used.
...
2013-10-28 15:23:09 -04:00
Nils Gladitz f037b9b726 Generators: don't append sources from utility targets to objectSources 2013-10-28 14:25:28 +01:00
Brad King 16df2456a4 Merge topic 'enable-language-require-compiler'
3e04946 Require CMAKE_<LANG>_COMPILER to be found as a full path
6007f7c CMakeDetermineCompilerId: Always use compiler detected from IDE
332771c CMakeDetermine*Compiler: Remove temporary cache entry
2013-10-28 08:39:29 -04:00
Brad King 3e04946f7b Require CMAKE_<LANG>_COMPILER to be found as a full path
All generators now support detection of the full path to the compiler, so
require it to be so.  This will allow CMake<LANG>Information.cmake and
other logic to assume the full path to the compiler tool is available.

The Makefile generators already rejected CMAKE_<LANG>_COMPILER values
that did not name an existing compiler.  Extend this error message to
all generators, make it occur as early as possible, and improve the
message with advice about how to set the compiler.  If the full path to
the compiler is not known, finish enabling languages with a fatal error
so configuration does not continue.

For now, allow the RC language compiler to not be a full path.  Later we
will need to detect the full path to "rc" under the VS IDE.

Add a RunCMake.CompilerNotFound test to cover failure cases.
Fix the RunCMake.CompilerChange test EmptyCompiler case to work
when configuration does not continue past enable_language.
2013-10-28 08:36:14 -04:00
Nils Gladitz 0655d0946e Tests: use string(TIMESTAMP) instead of system and locale specific date/time 2013-10-26 21:09:37 +02:00
Brad King 38fc334fd0 Merge topic 'ctest-fix-run-serial'
ff59365 CTest: fix dashboard issues associated with the ctest-fix-run-serial topic
7a665ae CTest: added test for RUN_SERIAL issue #14484
384beff CTest: added comments that describe the basic test sorting approach
adbe00d CTest: removed redundant copy of test dependency set
1b750cb CTest: perform cycle test early
6d4d7ca CTest: consider previously failed tests before all others
e809d8c CTest: prioritize tests by their depth in the dependency graph
44017a4 CTest: handle dependent and non dependent test requirements equally
2013-10-26 10:29:34 -04:00
Brad King ef13fc4dfc Merge topic 'ctest-p4'
970c823 ctest_update: Add support for Perforce p4 client
2013-10-26 10:29:28 -04:00
Brad King bd48b8a8ce Merge topic 'handle-CMP0024-in-tests'
310aef9 Make ExportLanguages a subtest of the ObjectLibrary test
30ff6cf Refactor the Plugin test.
2013-10-26 10:28:55 -04:00
Brad King cd553c34d6 Merge topic 'wix-fix-shortcut-ids'
fe7f8c9 CPackWiX: use safe IDs for generated start menu shortcuts
2013-10-26 10:28:50 -04:00
Brad King 4025013dd7 Merge topic 'compatible-interface-numbers'
ff6c401 cmTarget: Add interface for compatible numeric properties
e4e20c1 cmTarget: Add enumeration for consistency to expect from properties.
9877769 cmTarget: Assign consistent content back to the property being evaluated.
816b4a8 cmTarget: Make consistentProperty return consistent content.
030800a cmTarget: Add a template to create correct implied content.
2013-10-26 10:28:30 -04:00
Brad King bb21e17fb7 Merge topic 'remove-pre-2.4-compatibility'
7d47c69 Drop compatibility with CMake < 2.4
c7c44fc CTestTest*: Update minimum required CMake to 2.4
2013-10-26 10:28:09 -04:00
Brad King 1b21ac405f Merge topic 'fix-tll-static-private'
239b0c6 Don't add invalid content to static lib INTERFACE_LINK_LIBRARIES.
2013-10-26 10:28:02 -04:00
Brad King 0c46e55656 Merge topic 'remove-old-commands-by-policy'
4ea27bc Cygwin: Avoid legacy warnings in RunCMake.DisallowedCommands test
2013-10-26 10:27:49 -04:00
Pedro Navarro 970c82348b ctest_update: Add support for Perforce p4 client
Teach the ctest_update implementation to use the p4 command-line
client to perform updates and extract the list of changes.

Add a CTest.UpdateP4 test like those that exist already for the other
version control tools.  Make the test available when p4 and the p4d
server are found.  During the test launch p4d in the background to
serve a repository from the test directory.  Then direct the client
toward this server for the duration of the test.
2013-10-26 10:24:15 -04:00
Nils Gladitz fe7f8c99a4 CPackWiX: use safe IDs for generated start menu shortcuts 2013-10-26 10:15:19 -04:00
Stephen Kelly 239b0c6b0e Don't add invalid content to static lib INTERFACE_LINK_LIBRARIES.
Only valid target names or generator expressions may appear in
the target field of a LINK_ONLY expression.

Other content like link flags should still be added to that property
(wrapped in config-specific generator expressions), but not wrapped
in LINK_ONLY. Otherwise undue warnings would be issued for the
policy CMP0022.

The LINK_ONLY expression only has an effect for actual target
names anyway, so there is no logical deficit.
2013-10-26 10:10:20 -04:00
Nils Gladitz ff59365f8b CTest: fix dashboard issues associated with the ctest-fix-run-serial topic 2013-10-25 21:39:58 +02:00
Brad King 4ea27bcc4c Cygwin: Avoid legacy warnings in RunCMake.DisallowedCommands test
Set the minimum required version of CMake high enough to avoid the
warning for CMAKE_LEGACY_CYGWIN_WIN32.  The warning appears on stderr
and breaks the expected output matching.
2013-10-25 15:07:35 -04:00
Stephen Kelly 310aef959b Make ExportLanguages a subtest of the ObjectLibrary test
It was a subtest of the RunCMake.ObjectLibrary test. However, we need
to test a build with ExternalProject after running CMake, which RunCMake tests
do not do.
2013-10-24 19:05:34 +02:00
Stephen Kelly 30ff6cf9e9 Refactor the Plugin test.
Policy CMP0024 was introduced to disallow the include() of a file
generated by export().

Use ExternalProject to test the plugins after building.
2013-10-24 19:03:49 +02:00
Stephen Kelly 9c87d9cc3e Add automatic rcc invocation for Qt.
This replaces the need to invoke qt4_add_resources by allowing
adding the source .qrc file directly to the target sources.
2013-10-24 12:30:41 +02:00
Stephen Kelly 84218e1870 Add automatic uic invocation for Qt.
The source files are already processed by cmQtAutomoc to look for
moc includes, so extend that to also look for ui_ includes and
find corresponding .ui files to process.

This replaces the need to invoke qt4_wrap_ui().

As the ui files are not likely to be part of the SOURCES of the
target, store the options associated with them separately in the
cmMakefile for querying during the autogen run.
2013-10-24 12:30:38 +02:00
Stephen Kelly 18fb7588df Run the main executable created in the autogen tests.
Don't try to show the windows, which would require a gui capable test
machine, and that's not guaranteed.

Automatically link to qtmain.a on Windows to avoid a policy warning. Set
policy CMP0020 to NEW by increasing the required version.

Don't attempt to run the test when using Windows.
2013-10-24 11:50:58 +02:00
Stephen Kelly e485ba1219 Rename the QtAutomoc tests to QtAutogen. 2013-10-24 11:50:58 +02:00
Stephen Kelly ff6c401309 cmTarget: Add interface for compatible numeric properties
When using the boost MPL library, one can set a define to increase
the limit of how many variadic elements should be supported. The
default for BOOST_MPL_LIMIT_VECTOR_SIZE is 20:

 http://www.boost.org/doc/libs/1_36_0/libs/mpl/doc/refmanual/limit-vector-size.html

If the foo library requires that to be set to 30, and the independent
bar library requires it to be set to 40, consumers of both need to set
it to 40.

 add_library(foo INTERFACE)
 set_property(TARGET foo PROPERTY INTERFACE_boost_mpl_vector_size 30)
 set_property(TARGET foo PROPERTY COMPATIBLE_INTERFACE_NUMBER_MAX boost_mpl_vector_size)
 target_compile_definitions(foo INTERFACE BOOST_MPL_LIMIT_VECTOR_SIZE=$<TARGET_PROPERTY:boost_mpl_vector_size>)

 add_library(bar INTERFACE)
 set_property(TARGET bar PROPERTY INTERFACE_boost_mpl_vector_size 40)
 # Technically the next two lines are redundant, but as foo and bar are
 # independent, they both set these interfaces.
 set_property(TARGET bar PROPERTY COMPATIBLE_INTERFACE_NUMBER_MAX boost_mpl_vector_size)
 target_compile_definitions(bar INTERFACE BOOST_MPL_LIMIT_VECTOR_SIZE=$<TARGET_PROPERTY:boost_mpl_vector_size>)

 add_executable(user)
 target_link_libraries(user foo bar)

Because the TARGET_PROPERTY reads the boost_mpl_vector_size property
from the HEAD of the dependency graph (the user target), and because
that property appears in the COMPATIBLE_INTERFACE_NUMBER_MAX of
the dependencies of the user target, the maximum value for it is
chosen for the compile definition, ie, 40.

There are also use-cases for choosing the minimum value of a number.
In Qt, deprecated API can be disabled by version. Setting the
definition QT_DISABLE_DEPRECATED_BEFORE=0 disables no deprecated
API. Setting it to 0x501000 disables API which was deprecated before
Qt 5.1 etc.

If two dependencies require the use of API which was deprecated in
different Qt versions, then COMPATIBLE_INTERFACE_NUMBER_MIN can be
used to ensure that both can compile.
2013-10-24 08:42:05 +02:00
Brad King 2945814de2 cmRST: Teach cmake-module directive to scan bracket comments
When scanning CMake module files for .rst comments, recognize
bracket comments starting in ".rst:" too.  For example:

 #[[.rst:

Include the bracket comment content terminated by the closing bracket.
Exclude the line containing the bracket if it starts in "#".

Teach the CMakeLib.testRST test to cover multiple bracket lengths
and ending brackets on lines with and without "#".

Update the cmake-developer.7 manual to document the bracket-comment
syntax for .rst documentation.
2013-10-23 09:36:00 -04:00
Brad King efcf318f8d Add \-continuation to CMake language quoted arguments
Teach the CMake language lexer to treat the \-LF pair terminating a
line ending in an odd number of backslashes inside a quoted argument
as a continuation.  Drop the pair from the returned quoted argument
token text.  This will allow long lines inside quoted argument
strings to be divided across multiple lines in the source file.
It will also allow quoted argument text to start on the line after
the opening quote.  For example, the code:

 set(x "\
 ...")

sets variable "x" to the value "..." with no opening newline.

Previously an odd number of backslashes at the end of a line inside
a quoted argument would put a \-LF pair (or a \-CR pair) literally
in the argument.  Then the command-argument evaluator would complain
that the \-escape sequence is invalid.  Therefore this syntax is
available to use without changing behavior of valid existing code.

Teach the RunCMake.Syntax test to cover cases of quoted arguments
with lines ending in \, \\, and \\\.  Odd counts are continuations.
2013-10-23 09:02:07 -04:00
Brad King 7d47c69365 Drop compatibility with CMake < 2.4
Drop all behavior activated by setting CMAKE_BACKWARDS_COMPATIBILITY to
a value lower than 2.4, and generate an error when projects or the user
attempt to do so.  In the error suggest using a CMake 2.8.x release.

Teach cmake_minimum_required to warn about projects that do not require
at least CMake 2.4.  They are not supported by CMake >= 3.0.

Replace the documentation of CMAKE_BACKWARDS_COMPATIBILITY with a
reference to policy CMP0001.
2013-10-23 08:54:31 -04:00
Brad King c7c44fc7f4 CTestTest*: Update minimum required CMake to 2.4
We will soon deprecate support for compatibility with CMake < 2.4.
2013-10-23 08:54:31 -04:00
Brad King d67286ff9b Merge topic 'output-CMP0022-entries'
0b3b336 CMP0022: Output link interface mismatch for static library warning
2013-10-23 08:20:14 -04:00
Brad King 8855bf5395 Merge topic 'remove-old-commands-by-policy'
6c91944 Add policy CMP0036 to disallow build_name
3969bb2 Add policy CMP0035 to disallow variable_requires
178b9af Add policy CMP0034 to disallow utility_source
248d1dc Add policy CMP0033 to disallow export_library_dependencies
6865c8f Add policy CMP0032 to disallow output_required_files
aa76518 Add policy CMP0031 to disallow load_command
97268cf Add policy CMP0030 to disallow use_mangled_mesa
9f64fbf Add policy CMP0029 to disallow subdir_depends
882c0f0 Add infrastructure for policies that disallow commands
2013-10-23 08:19:57 -04:00
Brad King 6403a53f0e Merge topic 'CheckTypeSize_CXX'
e6cec64 CheckTypeSize: Add unit tests
07a2342 CheckTypeSize: Add support for C++
2013-10-23 08:19:46 -04:00
Stephen Kelly 0b3b3368fb CMP0022: Output link interface mismatch for static library warning
Other warnings for the same policy already have similar output since
commit 81d2793e (Add differing target property content to policy CMP0022
warning, 2013-09-11).
2013-10-23 08:18:02 -04:00
Brad King 6c9194488a Add policy CMP0036 to disallow build_name 2013-10-22 09:09:53 -04:00
Brad King 3969bb23aa Add policy CMP0035 to disallow variable_requires 2013-10-22 09:09:52 -04:00
Brad King 178b9af186 Add policy CMP0034 to disallow utility_source 2013-10-22 09:09:52 -04:00
Brad King 248d1dc057 Add policy CMP0033 to disallow export_library_dependencies 2013-10-22 09:09:52 -04:00
Brad King 6865c8fe05 Add policy CMP0032 to disallow output_required_files 2013-10-22 09:09:52 -04:00
Brad King aa76518f8b Add policy CMP0031 to disallow load_command 2013-10-22 09:09:52 -04:00
Brad King 97268cf5b7 Add policy CMP0030 to disallow use_mangled_mesa 2013-10-22 09:09:51 -04:00
Brad King 9f64fbf5b5 Add policy CMP0029 to disallow subdir_depends 2013-10-22 09:09:51 -04:00
Brad King 882c0f0b69 Add infrastructure for policies that disallow commands
Add cmCommand::Disallowed helper to check the setting of a policy that
disallows the command.  Add a RunCMake.DisallowedCommands test
placeholder.  Add a Help/policy/DISALLOWED_COMMAND.txt file for
inclusion by each policy document to avoid duplication of the common
text.
2013-10-22 09:09:51 -04:00
Brad King ddef8a7cff Merge topic 'rst-literal-blocks'
2d0287d cmRST: Process literal blocks after paragraphs ending in '::'
7b9ae40 cmRST: Do not process inline markup in code-block literals
2013-10-22 09:08:38 -04:00
Brad King 7809adb814 Merge topic 'string-CONCAT-command'
4e184a2 string: Add CONCAT sub-command
2013-10-22 09:08:15 -04:00
Brad King 0d9e8b1ab9 Merge topic 'double-colon-is-imported'
f063c45 Consider targets with double colons to be IMPORTED or ALIAS targets.
2013-10-22 09:07:40 -04:00
Brad King 6384f1683a Merge topic 'remove-cmake-i-wizard'
a8226e9 cmake: Drop support for "-i" wizard mode
2013-10-22 09:07:14 -04:00
Nils Gladitz 7a665ae7e3 CTest: added test for RUN_SERIAL issue #14484 2013-10-21 22:13:22 +02:00
Brad King 2d0287dd5e cmRST: Process literal blocks after paragraphs ending in '::'
Teach cmRST to recognize non-markup lines ending in '::' followed by a
blank line as starting a literal block.  Record the whole block as if it
were a literal block directive and print it just like a code block.
Extend the CMakeLib.testRST test to cover such cases.
2013-10-21 15:40:26 -04:00
Brad King 7b9ae406f3 cmRST: Do not process inline markup in code-block literals
Move the ProcessDirectiveParsedLiteral and ProcessDirectiveCodeBlock
method internals into an OutputMarkupLines helper.  Pass through it a
new "inlineMarkup" parameter and teach OutputLine to understand it.
When false, do not process inline markup.  Extend the CMakeLib.testRST
test to cover the two cases.
2013-10-21 14:56:26 -04:00
Brad King 4e184a21be string: Add CONCAT sub-command
Add a string(CONCAT) command to simply concatenate input arguments
together.  This will be useful for combining strings from different
quoting syntaxes.  Add a RunCMake.string test covering these cases.
2013-10-21 12:54:20 -04:00
Daniele E. Domenichelli e6cec64820 CheckTypeSize: Add unit tests 2013-10-21 16:39:04 +02:00
Stephen Kelly f063c45589 Consider targets with double colons to be IMPORTED or ALIAS targets.
Introduce a policy to control the behavior.

The AliasTargets unit test already tests that using a
double-semicolon in the name is not an error. Change the ExportImport
test to use a namespace with a double-semicolon too.
2013-10-21 15:56:31 +02:00
Brad King bf02e75079 Merge topic 'INTERFACE_LIBRARY-build-targets'
b04f3b9 Create make rules for INTERFACE_LIBRARY targets.
dba4962 Makefile: Always create clean target command
2013-10-21 09:48:04 -04:00
Stephen Kelly b04f3b9a2a Create make rules for INTERFACE_LIBRARY targets.
The result is that the depends of the target are created.

So,

 add_library(somelib foo.cpp)
 add_library(anotherlib EXCLUDE_FROM_ALL foo.cpp)
 add_library(extra EXCLUDE_FROM_ALL foo.cpp)
 target_link_libraries(anotherlib extra)

 add_library(iface INTERFACE)
 target_link_libraries(iface INTERFACE anotherlib)

Executing 'make iface' will result in the anotherlib and extra targets
being made.

Adding a regular executable to the INTERFACE of an INTERFACE_LIBRARY
will not result in the executable being built with 'make iface' because
of the logic in cmComputeTargetDepends::AddTargetDepend.

So far, this is implemented only for the Makefile generator. Other
generators will follow if this feature is possible for them.

Make INTERFACE_LIBRARY targets part of the all target by default.
Test this by building the all target and making the expected library
EXCLUDE_FROM_ALL.
2013-10-21 09:46:27 -04:00
Brad King 9fb65d7090 Merge topic 'cmake-syntax-updates'
daa0f6f Add Lua-style long brackets and long comments to CMake language
a8c6523 cmListFileLexer: Convert CRLF -> LF newlines explicitly
dbd9333 cmListFileLexer: Allow a leading UTF-8 Byte-Order-Mark (#11137)
5645783 cmListFileLexer: Allow command names with one letter (#14181)
2013-10-21 09:02:00 -04:00
Brad King 936dec32e5 Merge topic 'target-LOCATION-policy'
abfebef Cygwin: Avoid legacy warnings in RunCMake.CMP0026 test
2013-10-20 07:37:48 -04:00
Brad King abfebefbb9 Cygwin: Avoid legacy warnings in RunCMake.CMP0026 test
Set the minimum required version of CMake high enough to avoid the
warning for CMAKE_LEGACY_CYGWIN_WIN32.  The warning appears on stderr
and breaks the expected output matching.
2013-10-19 06:47:12 -04:00
Brad King a8226e91d7 cmake: Drop support for "-i" wizard mode
Tell users to pass cache values with the -D option on the command line
or use cmake-gui or ccmake.
2013-10-18 13:32:39 -04:00
Stephen Kelly 70ae6dfd92 Handle genexes when evaluating INTERFACE_INCLUDE_DIRECTORIES errors. 2013-10-18 10:11:49 -04:00
Stephen Kelly dede273193 target_link_libraries: Allow repeated use of LINK_{PRIVATE,PUBLIC} keywords.
This has not been allowed since they were introduced in
commit 91438222 (target_link_libraries: Add LINK_(PUBLIC|PRIVATE)
options, 2011-10-07), but allowing this form makes it more compatible
with the newer PUBLIC and PRIVATE keywords.
2013-10-17 17:37:20 +02:00
Brad King daa0f6f98d Add Lua-style long brackets and long comments to CMake language
Teach the CMake language parser to recognize Lua-style "long bracket"
arguments.  These start with two '[' separated by zero or more '='
characters e.g. "[[" or "[=[" or "[==[".  They end with two ']'
separated by the same number of '=' as the opening bracket.  There is no
nesting of brackets of the same level (number of '=').  No escapes,
variable expansion, or other processing is performed on the content
between such brackets so they always represent exactly one argument.

Also teach CMake to parse and ignore "long comment" syntax.  A long
comment starts with "#" immediately followed by an opening long bracket.
It ends at the matching close long bracket.

Teach the RunCMake.Syntax test to cover long bracket and long comment
cases.
2013-10-17 09:07:00 -04:00
Brad King a8c652342f cmListFileLexer: Convert CRLF -> LF newlines explicitly
Read input files in binary mode instead of text mode and convert CRLF
newlines to LF newlines explicitly in our own buffer.  This is necessary
to read CMake source files with CRLF newlines on platforms whose C
runtime libraries do not transform newlines in text mode.  For example,
a Cygwin or Linux binary may not transform CRLF -> LF in files read from
a Windows filesystem.  Perform the conversion ourselves to ensure that
multi-line string literals in CMake source files have LF newlines
everywhere.
2013-10-17 09:07:00 -04:00
Brad King dbd933365e cmListFileLexer: Allow a leading UTF-8 Byte-Order-Mark (#11137)
Teach the lexer to read a UTF-8, UTF-16 BE/LE, or UTF-32 BE/LE
Byte-Order-Mark from the start of a file if any is present.  Report an
error on files using UTF-16 or UTF-32 and accept a UTF-8 or missing BOM.
2013-10-17 09:06:59 -04:00
Brad King 56457837e2 cmListFileLexer: Allow command names with one letter (#14181)
Teach the lexer to treat a single letter as an identifier instead of an
unquoted argument.  Outside of a command invocation, the parser treats
an identifier as a command name and an unquoted argument as an error.
Inside of a command invocation, the parser treats an identifier as an
unquoted argument.  Therefore this change to the lexer will make what
was previously an error case work with no other behavioral change.
2013-10-17 09:06:59 -04:00
Stephen Kelly 4fd60241c8 CMP0022: Add unit test for null pointer check and message. 2013-10-16 10:45:55 -04:00
Brad King 6035c0458e get_property: Drop test for builtin property documentation
Property documentation is no longer builtin, so the get_property command
will be unable to return the documentation.  Drop the test for it.
2013-10-16 09:22:36 -04:00