summaryrefslogtreecommitdiffstats
path: root/Tests/CustomCommand
Commit message (Collapse)AuthorAgeFilesLines
* Normalize slashes of add_custom_(command|target) DEPENDS (#11973)Brad King2011-03-301-1/+1
| | | | | | | | | | | | | | | | All commands accepting file paths should normalize the slashes so that the string-represented names can be compared reliably. The commands add_library and add_executable have done this for years. We taught add_custom_command to normalize its OUTPUT names in commit a75a0a14 (Normalize add_custom_command OUTPUT names, 2010-12-15). We handled a special case of the DEPENDS option in commit 7befc007 (Handle trailing slashes on add_custom_command DEPENDS, 2011-01-26). Teach both add_custom_command and add_custom_target to normalize slashes of DEPENDS files up front. This approach subsumes the above-mentioned special case so remove the one line added for it but keep its test. Extend the CustomCommand test to check that slash count mismatches between custom command OUTPUT and DEPENDS can still be linked correctly.
* Merge topic 'custom-command-generator-expressions'Brad King2010-12-211-0/+13
|\ | | | | | | | | | | | | | | | | | | | | 4499d50 Mark CustomCommand test perconfig.out as SYMBOLIC f0cdb60 Introduce "generator expression" syntax to custom commands (#11209) 4749e4c Record set of targets used in cmGeneratorExpression ef9e9de Optionally suppress errors in cmGeneratorExpression 45e1953 Factor per-config sample targets out of 'Testing' test 4091bca Factor generator expression docs out of add_test bfb7288 Record backtrace in cmCustomCommand
| * Mark CustomCommand test perconfig.out as SYMBOLICBrad King2010-12-201-0/+1
| | | | | | | | | | The custom command with this output does not actually create the file, so mark it as SYMBOLIC.
| * Introduce "generator expression" syntax to custom commands (#11209)Brad King2010-12-151-0/+12
| | | | | | | | | | | | | | | | | | Evaluate in the COMMAND arguments of custom commands the generator expression syntax introduced in commit d2e1f2b4 (Introduce "generator expressions" to add_test, 2009-08-11). These expressions have a syntax like $<TARGET_FILE:mytarget> and are evaluated during build system generation. This syntax allows per-configuration target output files to be referenced in custom command lines.
* | Normalize add_custom_command OUTPUT names (#10485)Brad King2010-12-151-1/+1
|/ | | | | | | | | | | | Previously the OUTPUT arguments of add_custom_command were not slash-normalized but those of add_library and add_executable were. This caused the example add_custom_command(OUTPUT a//b.c ...) add_library(... a//b.c ...) to fail at build time with "no rule to make a/b.c". Fix this and modify the CustomCommand test to try it.
* Skip file-level dependencies on custom targets (#11332)Brad King2010-12-081-4/+1
| | | | | | | A custom command may name a target created by add_custom_target in its DEPENDS field. Treat this case as a target-level dependency only since a custom target provides no standard file on which to add a file-level dependency.
* Avoid CustomCommand test failure on VS71 (#9963)David Cole2010-09-201-1/+5
| | | | | | | Test still failing on dash1.kitware. Give up on testing the new arg on MSVC71. Test it with newer nmakes instead. All other dashboards are fine with -DPATH=c:/posix/path as the first arg, so keep it except when MSVC71 is true.
* Avoid CustomCommand test failure on VS71 (#9963)David Cole2010-09-141-2/+0
| | | | | | | | | | The new first arg in the test is the critical one to prove that the new NMake specific code works. The additional colons in the middle of the arg stream work fine everywhere else, but not on dash1.kitware with Visual Studio 7.1. Just avoid the failure for now by removing the unnecessary new args from the test.
* No extra spaces in CustomCommand test (#9963)David Cole2010-09-121-5/+10
| | | | | | | | | | | | | | | | | | The nightly dashboard showed that the following platforms had difficulties dealing with "bin dir" and/or "check command line" as directory and file names: AIX Borland 5.5, 5.6 and 5.8 IRIX NMake 6.0 OpenBSD VS 7.1 Watcom Re-visit later, after the release, to use spaces in the bin dir and in the target name where possible.
* Enable calling commands with : in argv[1] (#9963)David Cole2010-09-101-6/+11
| | | | | | | | | | | | | | | | | | | The solution seems hackish, but it works: for NMake only, prepend a no-op command before each real command that begins with ". This is really a work-around for an NMake problem. When a command begins with ", nmake truncates the first argument to the command after the first : in that arg. It has a parsing problem. Workaround..., hackish..., but it should solve the issue for #9963 and its related friends. Also, modify the CustomCommand test to replicate the problem reported in issue #9963. Before the NMake specific code change, the test failed. Now, it passes. Ahhhhhh.
* Oops. Last commit did not create subdir before doing a touch on a file in ↵David Cole2009-09-251-0/+1
| | | | it. So it fails on some platforms. This fixes that.
* Fix CMake Internal Error from cmTarget::GetOutputInfo - triggered by calling ↵David Cole2009-09-251-0/+27
| | | | GetLocation on a utility target - caused by custom command output file with same name as custom target. The fix is to avoid calling GetLocation unless the target is of a type that is expected to have a location...
* ENH: Remove CMAKE_ANSI_CFLAGS from testsBrad King2009-07-081-1/+0
| | | | | As of CMake 2.6 this variable is not defined, and the ANSI flags for the HP compiler are simply hard-coded in the default C flags.
* BUG: Fix windows command line escape for empty argBrad King2008-12-181-3/+3
| | | | | | On Windows the KWSys System package generates escapes for command-line arguments. This fix enables quoting of the empty string as an argument. This also adds a test to pass an empty argument to a custom command.
* ENH: Allow custom sources in custom targetsBrad King2008-10-091-0/+1
| | | | | | | This adds a SOURCES option to ADD_CUSTOM_TARGET, enabling users to specify extra sources for inclusion in the target. Such sources may not build, but will show up in the IDE project files for convenient editing. See issue #5848.
* ENH: Test relative path custom command outputBrad King2008-08-051-1/+11
| | | | | | | As of CMake 2.6 a custom command output specified by relative path is placed in the build tree. This adds a test to make sure other references to the output are hooked up correctly, fixing a bug in CMake 2.6.1.
* BUG: Fix new custom command with make-var expansion test on VS6. The VS6 ↵Brad King2008-06-051-2/+8
| | | | IDE adds some extra characters to the variable value during expansion.
* ENH: Add test for make variable replacement in a custom command with the ↵Brad King2008-06-042-0/+14
| | | | VERBATIM option.
* ENH: Remove SKIP_RULE_DEPENDS option from add_custom_command()Brad King2008-06-023-11/+1
| | | | | | | | - Option was recently added but never released. - Custom commands no longer depend on build.make so we do not need the option. - Rule hashes now take care of rebuilding when rules change so the dependency is not needed.
* ENH: Add SKIP_RULE_DEPENDS option for add_custom_command()Brad King2008-05-143-1/+11
| | | | | | - Allows make rules to be created with no dependencies. - Such rules will not re-run even if the commands themselves change. - Useful to create rules that run only if the output is missing.
* BUG: Fix escaping of more characters on Windows shells.Brad King2008-04-301-13/+21
|
* BUG: Do not escape shell operators when generating command lines.Brad King2008-04-295-3/+37
| | | | | - See bug#6868. - Update CustomCommand test to check.
* ENH: preclean some warningsKen Martin2008-03-251-0/+1
|
* ENH: Implemented generation of display for pre-build, pre-link, and ↵Brad King2007-12-181-0/+2
| | | | post-build custom command comments during the build. This addresses issue #5353.
* ENH: Re-arranged code to test adding a custom command to generate a source ↵Brad King2007-06-111-12/+9
| | | | file after the file has been added to a target. This is supported by the current implementation because of the use of source lists in the target implementation. When we later convert to creating cmSourceFile instances immediately for the target we need to make sure the mentioned case still works.
* BUG: Replace "with space" in custom command argument tests with "w s" to ↵Brad King2007-05-181-46/+46
| | | | still have whitespace but be shorter. The test was failing because the custom command line length was simply too long for the VS IDE.
* ENH: Added quick means to turn on verbose output for debugging this test.Brad King2007-05-182-1/+5
|
* ENH: Add testing of * and / character arguments except on MinGW.Brad King2007-05-171-2/+5
|
* ENH: Added test for custom command lines with special single-character ↵Brad King2007-05-171-4/+8
| | | | arguments.
* BUG: Disable test of angle bracket escapes until it works everywhere.Brad King2007-05-171-6/+6
|
* ENH: Added testing for custom command line arguments containing all special ↵Brad King2007-05-171-2/+69
| | | | characters on the US keyboard. Fixed curly brace arguments on borland and % arguments in mingw32-make.
* ENH: now target names can be used in add_custom_command() andAlexander Neundorf2007-05-093-0/+37
| | | | | | | | | | add_custom_target() as COMMAND, and cmake will recognize them and replace them with the actual output path of these executables. Also the dependency will be added automatically. Test included. ENH: moved TraceVSDependencies() to the end of GlobalGenerator::Configure(), so it is done now in one central place Alex
* ENH: Added test to make sure custom commands are not built more than once in ↵Brad King2007-05-012-0/+12
| | | | a single build. This tests for a bug introduced by one fix and fixed by another fix for bug#4377.
* ENH: Re-enabling # escape test now that it is implemented everywhere.Brad King2006-10-251-4/+4
|
* BUG: Disable testing of # escapes until it can be implemented for Watcom WMake.Brad King2006-10-241-4/+4
|
* ENH: Added # character for shell escaping.Brad King2006-10-231-0/+4
|
* ENH: Adding test of special characters in custom command and custom target ↵Brad King2006-10-041-1/+2
| | | | comments.
* ENH: Added COMMENT option to ADD_CUSTOM_TARGET. This addresses bug#3461.Brad King2006-10-041-0/+1
|
* ENH: Added APPEND option to ADD_CUSTOM_COMMAND to allow extra dependencies ↵Brad King2006-10-041-1/+3
| | | | to be connected later. This is useful to create one rule and then have a macro add things to it later. This addresses bug#2151.
* BUG: Do not replace @VAR@ syntax in list files. This addresses bug #2722.Brad King2006-10-041-2/+2
|
* COMP: Fix command line check test implementation for Watcom.Brad King2006-10-022-0/+3
|
* ENH: Added VERBATIM option to ADD_CUSTOM_COMMAND and ADD_CUSTOM_TARGET ↵Brad King2006-09-282-2/+35
| | | | commands. This option enables full escaping of custom command arguments on all platforms. See bug#3786.
* BUG: Disable new shell escape code until backward compatibility can be ↵Brad King2006-09-251-1/+1
| | | | established in the new implementation.
* COMP: Need ANSI C flags to build check_command_line.c.Brad King2006-09-221-0/+1
|
* ENH: Adding test for non-trivial custom command line arguments. This is for ↵Brad King2006-09-212-0/+71
| | | | bug#3786.
* ENH: Added test for generation of files listed explicitly as sources but not ↵Brad King2006-06-013-11/+33
| | | | used during the build of a target.
* COMP: Do not use ANSI function prototypes to pacify HP.Brad King2006-04-131-3/+3
|
* ENH: Added support for multiple outputs generated by a single custom ↵Brad King2006-04-112-6/+10
| | | | command. For Visual Studio generators the native tool provides support. For Xcode and Makefile generators a simple trick is used. The first output is considered primary and has the build rule attached. Other outputs simply depend on the first output with no build rule. During cmake_check_build_system CMake detects when a secondary output is missing and removes the primary output to make sure all outputs are regenerated. This approach always builds the custom command at the right time and only once even during parallel builds.
* BUG: fix test to list generate dheaderKen Martin2006-03-242-1/+2
|
* ENH: Automatic include directories should not be done by default as was just ↵Brad King2006-02-191-1/+4
| | | | implemented. Instead a project may now set CMAKE_INCLUDE_CURRENT_DIR to get this behavior. The current source and binary directories are added automatically to the beginning of the include path in every directory. This simulates in-source behavior for double-quote includes when there are generated sources and headers in the directory.