summaryrefslogtreecommitdiffstats
path: root/Tests/BuildDepends
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Fix xcode version detection for Xcode 13 on ARMBrad King2021-06-181-1/+1
| | | | | | | | | | Running `xcode -version` on an ARM box prints content to stderr: objc[...]: Class ... is implemented in both... One of the two will be used. Which one is undefined. Capture and parse only stdout. Otherwise we might configure test behavior for the wrong version of Xcode.
* Makefiles Generators: use compiler for dependencies generationMarc Chevrier2020-11-291-0/+6
| | | | | | | | | | | Each source compilation generates a dependencies file. These dependencies files are consolidated in one file per target. This consolidation is done as part of command 'cmake -E cmake_depends` launched before evaluation of makefile dependency graph. The consolidation uses the same approach as `CMake` dependencies management. Fixes: #21321
* Tests: Update BuildDepends test for Xcode "new build system"Brad King2020-09-182-0/+10
| | | | | | Xcode somehow tracks what we're running inside a custom command, so we cannot prevent it from regenerating the `noregen.h` header even though we do not declare any dependencies of it.
* Genex: Add $<LINK_LANGUAGE:...> and $<LINK_LANG_AND_ID:...>Marc Chevrier2020-02-262-0/+30
| | | | | | This MR may help to solve issues #19757 and #18008 Fixes: #19965
* PCH: Fix Makefile dependencies to rebuild PCH on header changesBrad King2019-10-174-4/+29
| | | | | | | | Teach the Makefile generator to scan the implicit dependencies of PCH creation. When a header named by `target_precompile_headers` changes the corresponding PCH must be rebuilt and all consumers recompiled. Fixes: #19830
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-1/+2
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* LINK_DEPENDS: add support of 'generator expressions'Marc Chevrier2018-06-271-1/+1
|
* LINK_DEPENDS: add support for property INTERFACE_LINK_DEPENDSMarc Chevrier2018-06-272-0/+16
| | | | Fixes: #17997
* Tests: Do not use i386 architecture with Xcode 10 and aboveBrad King2018-06-191-17/+17
| | | | Xcode 10 dropped support for i386 builds.
* Drop Visual Studio 8 2005 generatorBrad King2018-04-021-1/+1
| | | | This generator has been deprecated since CMake 3.9. Remove it.
* Drop Visual Studio 7 .NET 2003 generatorBrad King2017-04-191-1/+1
| | | | This generator has been deprecated since CMake 3.6. Remove it.
* Revise C++ coding style using clang-formatKitware Robot2016-05-167-20/+18
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-293-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* Drop Visual Studio 6 generatorBrad King2016-03-091-4/+1
| | | | | | This generator has been deprecated since CMake 3.3. Remove it. Update documentation, modules, and tests to drop content specific to this generator.
* Ninja: Honor the LINK_DEPENDS target property (#14796)Brad King2015-08-051-1/+1
|
* Tests: Extend BuildDepends test to cover OBJECT_DEPENDSBrad King2015-07-224-0/+39
| | | | | | | | The actual file timestamp dependency is known to not work on Visual Studio or Xcode generators. Tolerate such failure for these generators (Tests/CustomCommand already covers using OBJECT_DEPENDS to pull a custom command into a target, and that still works with these generators).
* Makefile: Fix multiple custom command outputs with one missingBrad King2015-04-102-0/+83
| | | | | | | | | | | | | | | | The use of "cmake -E touch_nocreate" added in commit v3.2.1~4^2 (Makefile: Fix multiple custom command outputs regression, 2015-03-06) caused builds to fail when one of the outputs is intentionally not created. This was fixed by our parent commit by making touch_nocreate succeed when the file is missing. Add a test case covering it. For the Watcom WMake generator, check for the SYMBOLIC source file property separately on each output. The mark is needed on outputs that are not really created to tell 'wmake' not to complain that it is missing. The mark is also needed on outputs that are created or 'wmake' will not consider them out of date when they exist. Inspired-by: Ben Boeckel <ben.boeckel@kitware.com>
* Tests: Cover rebuild with multiple custom command outputs (#15116)Brad King2014-12-052-0/+41
| | | | | | | | Extend the BuildDepends test with a case covering multiple custom command outputs with the second one consumed by another rule. With the old "multiple output pair" infrastructure used in the Makefile and Xcode generators this did not work. Now that it is fixed, test the case explicitly.
* Tests/BuildDepends: Drop unneeded help for NinjaBrad King2014-11-141-5/+1
| | | | | The extra post-modification invocations of 'ninja' does not seem to be needed anymore for the BuildDepends test to pass.
* Tests/BuildDepends: Make 3-second delay more robustBrad King2014-05-192-8/+1
| | | | | Use "cmake -E sleep 3" instead of execute_process with a TIMEOUT of 3. This avoids using a busy loop or depending on a timeout to kill it.
* ExternalProject: Add option to always run the build stepBrad King2014-02-213-0/+56
| | | | | | | Teach ExternalProject_Add a new BUILD_ALWAYS option to skip using the build step stamp file and execute the step on every build. Extend the BuildDepends test with a case to cover this option.
* Xcode: Teach BuildDepends test that Xcode >= 5 needs no helpBrad King2013-10-081-1/+1
| | | | | | Drop the HELP_XCODE workarounds needed on older Xcode versions when using Xcode >= 5. We now expect builds and rebuilds to work using proper dependencies with no special help.
* Xcode: Teach Tests/BuildDepends to allow LINK_DEPENDS_NO_SHARED failureBrad King2013-10-021-0/+2
| | | | | | Xcode 5.0 now relinks targets when their shared libraries dependencies are modified, and there seems to be no way to stop it. Report this as a known limitation in the test output and do not fail.
* Xcode: Fix test architecture selection for Xcode >= 5Brad King2013-10-021-2/+2
| | | | | | | | In Tests/Architecture and Tests/BuildDepends/Project we select a set of OS X cpu architectures to use for the test. Prior to Xcode 4 we always used i386 and ppc. Starting with Xcode 4, the tools do not support ppc but do support x86_64, so we switch to that. Fix the version check to recognize Xcode >= 5 as at least Xcode 4 and use the new architectures.
* VS 6: Tell BuildDepends test to tolerate ninjadep failureBrad King2013-07-301-0/+3
| | | | | | The VS 6 IDE does not want to recompile a particular source after a particular header it includes is modified, even by hand. For now just silence the failure and document it with a comment.
* Ninja: Update BuildDepends test to verify cmcldeps depfiles.Robert Maynard2013-07-263-0/+58
|
* Merge topic 'link-depends-no-shared'Brad King2012-11-135-0/+73
|\ | | | | | | | | | | 306796e Teach BuildDepends test to cover LINK_DEPENDS_NO_SHARED ed97631 Optionally skip link dependencies on shared library files
| * Teach BuildDepends test to cover LINK_DEPENDS_NO_SHAREDBrad King2012-11-095-0/+73
| | | | | | | | | | | | | | | | | | Build a shared library and an executable linking to it inside the inner test. Set LINK_DEPENDS_NO_SHARED on the executable. Add a custom target to compare the output file times. Verify that on the first build the executable is newer than the library. Then modify a library source file. Verify that on the second build the library is newer because the executable did not have a dependency to re-link.
* | AddCustomCommand: Handle multiple IMPLICIT_DEPENDS files (#10048)Alex Neundorf2012-11-062-1/+4
|/ | | | | | | | | | | | | The code handling IMPLICIT_DEPENDS was only able to track a single file, the latest file replaced earlier files in the list. The documentation now mentions that the language has to be prefixed to every file and the test now uses two implicit dependencies, where only the second is modified to trigger re-running of the custom command. Alex Inspired-by: Michael Wild <themiwi@users.sourceforge.net>
* Remove CMake multiline block-end command argumentsMarcin Wojdyr2012-08-151-8/+4
| | | | removing arguments omitted in 9db3116226cb99fcf54e936c833953abcde9b729
* Remove CMake-language block-end command argumentsKitware Robot2012-08-132-18/+18
| | | | | | | | | | | | | | | | | Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Convert CMake-language commands to lower caseKitware Robot2012-08-131-7/+7
| | | | | | | | | | | | | | | | | Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code: cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-19/+19
| | | | | | | | | | | | | | | | | Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
* Ninja: fix mis-matching endif() argumentPeter Kümmel2012-07-181-1/+1
|
* Ninja: on Mac no multiple -arch because of -MPeter Kümmel2012-07-101-9/+3
|
* Ninja: dep files and multiple -arch flags not possible on macPeter Kuemmel2012-06-191-1/+8
|
* Ninja: add wrapper for cl to extract dependenciesPeter Kuemmel2012-06-081-2/+6
| | | | | | | | | | | 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?
* Provide dependency file flags to generatorPeter Collingbourne2012-02-021-0/+2
| | | | | | | Causes compiler modules (currently only GNU) to set a CMAKE_DEPFILE_FLAGS_${lang} variable, which communicates to the generator the flags required to cause the compiler to create dependency files.
* Base architecture choice logic on Xcode versionDavid Cole2011-07-181-2/+18
| | | | Not on Darwin version.
* Fix BuildDepends test to work with Xcode 4David Cole2011-07-151-0/+5
| | | | | | ppc tools are no longer available in the Xcode 4 installation. Eliminate the use of the hard-coded 'ppc' in the test when running on Snow Leopard or later.
* Define LINK_DEPENDS target property (#11406)Brad King2010-11-053-0/+32
| | | | | Custom Makefile link rules may need to depend on linker scripts. Define this property to allow user-specified link-time dependencies.
* Avoid Intel linker crash in BuildDepends testBrad King2009-10-271-0/+8
| | | | | | | The BuildDepends test exercises incremental linking with MSVC and Intel tools on Windows. In some cases the Intel compiler creates objects that cause the MS linker it invokes to crash during incremental linking. We avoid the problem for this test by disabling incremental linking.
* More verbose BuildDepends test outputBrad King2009-10-221-2/+4
| | | | | We teach BuildDepends to always print the output from each try_compile. This may make debugging easier.
* ENH: make sure multiple archs are only tested when the workBill Hoffman2009-02-191-1/+7
|
* BUG: fix xcode depend issue and add a test for itBill Hoffman2009-02-191-1/+3
|
* ENH: Update BuildDepends test to check #include lines with macros.Brad King2008-05-145-12/+75
| | | | | | | - Tests IMPLICIT_DEPENDS_INCLUDE_TRANSFORM properties. - See issue #6648. - Works without help in VS IDEs due to native dependency handling. - Xcode needs help to rebuild correctly.
* ENH: preclean some warningsKen Martin2008-03-251-0/+1
|
* BUG: Enable CMAKE_SUPPRESS_REGENERATION because the entire test runs during ↵Brad King2007-12-221-0/+5
| | | | the inital configuration.
* ENH: Add a depends check step to custom targets. Add support for the ↵Brad King2007-12-214-7/+27
| | | | IMPLICIT_DEPENDS feature of custom commands when building in custom targets. Convert multiple-output pair checks to be per-target instead of global.
* ENH: Adding test for ADD_CUSTOM_COMMAND's new IMPLICIT_DEPENDS feature.Brad King2007-09-174-0/+68
|