Commit Graph

86 Commits

Author SHA1 Message Date
Matthew Woehlke
746c776caf ConfigureLog: Add infrastructure for structured configure event logging
Add infrastructure for a "configure log".  Use YAML for a balance of
machine- and human-readability to records details of configure-time
events in a structured format.

Teach the RunCMake test framework to support matching the configure log.

Issue: #23200
2022-12-16 10:11:37 -05:00
Matthew Woehlke
e8b8d82cbf Tests: Generalize RunCMake expectation component names
Do not assume all the component names start in "std".

Co-authored-by: Brad King <brad.king@kitware.com>
2022-12-14 11:42:29 -05:00
Brad King
b2d030e8fe Tests: Teach RunCMake to ignore Intel -Rdebug-disables-optimization remarks
The Intel compiler may remark:

    icpx: remark: Note that use of '-g' without any optimization-level
    option will turn off most compiler optimizations similar to use of
    '-O0' [-Rdebug-disables-optimization]

Teach RunCMake to drop such incidental lines before matching against
expected output.
2022-10-27 08:17:54 -04:00
Brad King
29e45a94b0 Tests: Teach RunCMake to ignore Intel Classic compiler deprecation warnings 2022-10-03 17:51:11 -04:00
Alex Turbov
a509602699 Build: Modernize some foreach calls to use IN LISTS/IN ITEMS 2022-09-22 09:24:46 -04:00
Brad King
aafa598e24 Merge topic 'xcode-14'
627c08e28b Tests: Teach RunCMake to ignore Xcode DVTSDK warnings
ab40020b17 Xcode: Suppress "Run Script" build phase warning during compiler id
89e1113e0c Xcode: Use ad-hoc signing during compiler id on macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7350
2022-06-11 05:39:11 -04:00
Brad King
627c08e28b Tests: Teach RunCMake to ignore Xcode DVTSDK warnings
On some Xcode versions, `xcodebuild` may warn:

    ... xcodebuild[...]  [MT] DVTSDK: Warning: SDK path collision for path ...

Teach RunCMake to drop such incidental lines before matching against
expected output.
2022-06-10 14:24:03 -04:00
Gregor Jasny
94361a1309 Tests: Ignore all classes in Xcode internal objc warnings
Xcode on Apple Silicon warns not only about AMSupportURL classes
but also many more.
2022-04-25 15:52:15 -04:00
Brad King
da9f864513 Tests: Teach RunCMake to ignore Xcode extension point warnings
On some Xcode versions, `xcodebuild` may warn:

    ... xcodebuild[...] Requested but did not find extension point with
                        identifier ...

Teach RunCMake to drop such incidental lines before matching against
expected output.
2022-04-25 14:35:11 -04:00
Gregor Jasny
183b6bbf51 Tests: Ignore all classes in Xcode internal objc warnings
Xcode on Apple Silicon warns not only about AMSupportURL classes
but also many more.
2022-04-03 22:39:17 +02:00
Brad King
af5e4e44ca Tests: Teach RunCMake to ignore lld-link PDB item index warnings
In commit fade5b5b8c (gitlab-ci: Update Windows builds to MSVC 19.31
toolset, 2022-03-09, v3.23.0-rc3~4^2~1) we switched from MSVC toolset
version 14.30.30705 to version 14.31.31103.  The latter causes the
Clang 13.0.0 lld-link tool to warn about invalid PDB item indexes, as
discussed [here](https://developercommunity.visualstudio.com/t/1667797).

This causes the RunCMake.PrecompileHeaders test PchLibObjLibExe case to
fail on NMake builds due to unexpected content on stderr.  The warnings
appear with Ninja too, but `ninja` prints them on stdout.  Teach the
RunCMake infrastructure to ignore these warnings.
2022-03-11 09:41:45 -05:00
Brad King
4ee96f6e77 Merge topic 'test-RunCMake-xcodebuild-incidental'
6ade07ef89 Tests: Teach RunCMake to ignore Xcode extension point warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6992
2022-02-17 08:46:53 -05:00
Brad King
67f97f5478 Tests: Add RunCMake helper to run cmake with raw execute_process args 2022-02-16 12:10:19 -05:00
Brad King
6ade07ef89 Tests: Teach RunCMake to ignore Xcode extension point warnings
On some Xcode versions, `xcodebuild` may warn:

    ... xcodebuild[...] Requested but did not find extension point with
                        identifier ...

Teach RunCMake to drop such incidental lines before matching against
expected output.
2022-02-16 11:21:54 -05:00
makise-homura
3958ed878f LCC: Add policy CMP0129 regarding interpreting LCC as GNU
Due to MCST LCC compiler identification is now changed to LCC,
there should be a way for old projects to still identify it as GNU,
as it was before.
This commits adds the policy:
CMP0129: Compiler id for MCST LCC compilers is now LCC, not GNU.
This policy controls such a behavior.
OLD behaivior is to treat LCC as GNU, NEW is to treat is as LCC.
2021-10-21 17:24:22 +03:00
Gregor Jasny
a7bbbbf73b Tests: ignore Xcode DVTPlugInManager output 2021-06-10 22:50:06 +02:00
Orgad Shaneh
ddcd1469e8 MSYS: Add support for running under MSYS runtime environment
Detect MSYS as CYGWIN, with the required adaptations.
2021-04-26 14:27:34 -04:00
Brad King
efcdec9a19 Merge topic 'nmc-cc-no-output'
6dd89529e8 Ninja Multi-Config: Fix crash on custom command config with no output
e21a80e97d Tests: Teach RunCMake to ignore incidental 'Recompacting log' ninja output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !5950
2021-03-30 09:50:48 -04:00
Brad King
e21a80e97d Tests: Teach RunCMake to ignore incidental 'Recompacting log' ninja output
Ninja versions prior to 1.6.0 occasionally print this message.
2021-03-29 09:55:57 -04:00
Brad King
8dd8d63665 Tests: Add RunCMake hook to describe test variants 2021-03-22 13:26:29 -04:00
Brad King
e8065554a8 Tests: Teach RunCMake to always print the command on failure
Previously we only printed explicit `RunCMake_TEST_COMMAND` cases on
failure.  Refactor the RunCMake infrastructure so that we always define
`RunCMake_TEST_COMMAND` internally, and print it on failure.
2021-03-09 07:43:29 -05:00
Brad King
5f03744e36 Tests: Move RunCMake option construction closer to use 2021-03-09 07:35:18 -05:00
Brad King
f4d154755a Tests: Reverse RunCMake code path order 2021-03-09 07:35:18 -05:00
Brad King
adc351db8f Tests: Add RunCMake helper to run a plain script
Many tests covering CMake scripting commands can work without
initializing a full generator.
2021-03-03 16:41:30 -05:00
Brad King
d33c2c93d8 Tests: Update for upstream ninja change to write status on stderr
Upstream ninja commit `ad3d29fb53` (Put builder output through status
interface) from ninja PR 1899 changed the status output from stdout to
stderr.  In particular, `ninja: no work to do` is now printed on stderr.
Update our RunCMake tests to accept this difference.

A few RunCMake test cases check for `ninja: no work to do`.  For those,
move the message to stdout using `RunCMake_TEST_OUTPUT_MERGE`.  The rest
of the test cases do not care about the message, so remove it from the
actual stderr content before comparing against that expected.
2021-02-23 10:55:12 -05:00
Brad King
928ca50b6f Tests: Teach RunCMake to ignore Xcode install_name_tool signature warnings
The `install_name_tool` may warn:

    install_name_tool: warning: changes being made to the file will
    invalidate the code signature in: ...

Teach RunCMake to drop such incidental lines before matching against
expected output.
2020-11-24 14:33:59 -05:00
Brad King
383e81aa60 Tests: Teach RunCMake to ignore Xcode internal objc warnings
Xcode on Apple Silicon warns:

    objc[...]: Class AMSupportURL... is implemented in both ...
    One of the two will be used. Which one is undefined.

Teach RunCMake to drop such lines before matching against expected
output.
2020-09-30 11:58:44 -04:00
Gregor Jasny
16692f4926 Apple: suppress Xcode 12 ranlib warning
The Xcode 12 (Beta) toolchain for arm64 emits a warning when static
libraries are created:

```
ranlib: archive member: libStaticLib.a(a.c.o) offset in archive not a multiple of 8 (must be since member is an 64-bit object file)
```

Due to the unexpected output multiple tests are broken. To make those
tests pass we filter the problematic output in the test driver.

See: https://developer.apple.com/forums/thread/652620
2020-07-17 15:42:26 +02:00
Brad King
59673bb2dc Tests: Teach RunCMake to ignore PGI license expiry warnings
These are not useful in nightly testing.
2019-11-01 09:23:03 -04:00
Corentin Plouet
553658393c Graphviz: added test suite, fixes, enhancements
* Added a fairly comprehensive test suite
* Separated the graph traversal logic from the Graphviz generation
  code by introducing a new class, cmLinkItemsGraphVisitor{.h,cxx}
* Made the graph traversal logic less ad-hoc by using existing
  methods in the GlobalGenerator; this fixed a few bugs
* Added support for new target types: custom targets, object
  and unknown libraries
* Improved support for ALIAS libraries by showing the alias(es)
  in the graph
* Introduced new flags to control those new libraries (consistent
  with existing flags)
* Updated the documentation
* Removed useless setting to set graph type in dot file
* Improved the node/edge shapes (nicer, more consistent)
* Added a legend to the graph
* Some refactoring and cleanup of the Graphviz generation code
* Added test and fix for issue 19746
2019-10-08 13:45:56 +11:00
Brad King
dce58afd30 Merge branch 'backport-3.15-fix-EXCLUDE_FROM_ALL-subdir-all'
Resolve conflicts with changes since the 3.15 series:

* Convert `cmSystemTools::IsOn` => `cmIsOn`.
* Move one "EXCLUDE_FROM_ALL" target property logic fix to
  its new location in `cmMakefile::AddNewUtilityTarget`.
2019-09-30 09:34:57 -04:00
Brad King
05d7ca14e9 Merge branch 'backport-3.14-fix-EXCLUDE_FROM_ALL-subdir-all' 2019-09-30 09:19:21 -04:00
Brad King
0cfbd85e7b Tests: Teach RunCMake to support a custom working directory 2019-09-24 14:10:34 -04:00
Brad King
c2c3d22504 Tests: Drop RunCMake workaround for AIX ld warnings about GNU atexit
Drop the filtering added by commit e22c45d4c9 (Tests: Teach RunCMake to
ignore AIX ld warnings about GNU atexit, 2018-02-28, v3.12.0-rc1~419^2~6).
It is no longer needed now that we compute our own exports on AIX and
do not get these warnings when using shared libraries.
2019-07-15 13:27:16 -04:00
Robert Maynard
f0a89149bc RunCMake: Automatically support platform out override files 2019-06-21 11:06:39 -04:00
Brad King
44d6370db3 Tests: Add RunCMake helper to run cmake with options 2019-04-10 09:40:48 -04:00
Brad King
538721939f Tests: Teach RunCMake to optionally exclude the source dir argument 2019-04-10 09:40:48 -04:00
Kyle Edwards
b6eafd5781 Tests: Add RunCMake_TEST_FILTER environment variable
This environment variable allows developers to locally run only a
subset of RunCMake subtests in a single RunCMakeTest.cmake script.
If the environment variable is not set, all of the tests in the
script are run.
2018-12-13 18:47:13 -05:00
Brad King
c3635e502c Tests: Add RunCMake "prep" step
Give tests a chance to write content to the build tree before CMake
runs on it.
2018-12-11 12:50:21 -05:00
Brad King
bdec3bd896 Tests: Teach RunCMake infrastructure to optionally provide stdin 2018-11-15 08:08:56 -05:00
Brad King
71fa78ff7a Tests: Teach RunCMake to ignore Xcode missing file type warnings
Xcode 10 beta warns

    xcodebuild... warning: file type '::com.apple.instruments.instrdst'
    is based on missing file type 'default::com.apple.package'

Teach RunCMake to drop such lines before matching against expected
output.
2018-06-19 10:56:50 -04:00
Brad King
eb80af9093 Drop Visual Studio 8 2005 generator
This generator has been deprecated since CMake 3.9.  Remove it.
2018-04-02 10:08:10 -04:00
Brad King
e22c45d4c9 Tests: Teach RunCMake to ignore AIX ld warnings about GNU atexit 2018-03-01 07:56:38 -05:00
Brad King
314613d1af Add infrastructure for generators to select a build tool instance
Add cache entry `CMAKE_GENERATOR_INSTANCE` to hold the instance location
persistently across re-runs of CMake in a given build tree.

For now we reject the option by default if explicitly set.  It will be
implemented on a per-generator basis.  Pass the setting into try_compile
project generation.  Add a RunCMake.GeneratorInstance test to cover
basic use cases for the option.  Verify that `CMAKE_GENERATOR_INSTANCE`
is empty by default, and that it is rejected when the generator does not
support a user setting.

Issue: #17268
2017-10-19 10:20:08 -04:00
Brad King
0be7d61abf Tests: Teach RunCMake to ignore clang unused sanitizer flag warnings
These can show up in Release builds of CMake because some tests still
build Debug.
2017-10-10 09:37:49 -04:00
Brad King
3f567a9847 Tests: Refactor RunCMake output line ignore regex construction
Avoid one giant line.
2017-10-10 09:35:31 -04:00
Brad King
81f9c9e892 Deprecate Visual Studio 8 2005 generator
Update documentation to mark the generator deprecated.  Add a warning at
the end of generation plus an option to turn off the warning.
2017-04-21 13:45:45 -04:00
Brad King
c94f1bcf92 Drop Visual Studio 7 .NET 2003 generator
This generator has been deprecated since CMake 3.6.  Remove it.
2017-04-19 15:28:05 -04:00
Gregor Jasny
ede8db109c RunCMake: Ignore xcodebuild bug warnings in tests
Encountered on OS X 10.4 with old Xcode:

  Expected stderr to match:

   expect-err> ^$

  Actual stderr:

   actual-err> Hit xcodebuild bug : ... bad interpreter: Text file busy
2017-03-24 08:15:16 -04:00
Gregor Jasny
45405f00d2 Xcode: Ignore Xcode project warning until issue is fixed
Issue: #15272
2017-01-26 13:34:40 -05:00