| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| | |
c5dd2ca538 DetermineCompiler: Relax _CMAKE_TOOLCHAIN_PREFIX detection
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4547
|
| |
| |
| |
| |
| |
| | |
Now detect _CMAKE_TOOLCHAIN_PREFIX whenever a compilers
name matches the heuristics, instead of only doing it
when cross compiling
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
46d9006efa XL: Add comment clarifying why we pretend it has full C++11/14 support
4aaa9ea96c XL: C++14 language level flags are only available on Linux
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4551
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since commit b0f46c48f6 (CompileFeatures: Now able to presume full
language level support, 2019-03-06, v3.15.0-rc1~265^2~1) we pretend that
the XL compiler has full C++11 and C++14 support so that projects
specifying granular features will at least get the corresponding
compiler mode. This is a work around for our lack of a full feature
check table for this compiler that works in common cases. Add a comment
explaining this.
Issue: #20521
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since commit 458ea9d76c (XL: Add C++14 language level flags, 2019-04-15,
v3.15.0-rc1~226^2) we use `-qlanglvl=extended1y` for C++14 with XL 16.1.
However, that flag is only supported on a Linux host.
Issue: #20521
|
|\ \ \
| |_|/
|/| |
| | |
| | |
| | |
| | | |
ff71612d02 FindBoost: Allow Boost_LIB_PREFIX to be set externally
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4531
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
On platforms where our default Boost static library prefix is incorrect,
make it possible for users to set it explicitly to work around the problem
until FindBoost can be updated.
Fixes: #20372
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
79b6e928c3 CUDA: Support compiler specific FindBinUtils overrides
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Axel Huebl <axel.huebl@plasma.ninja>
Merge-request: !4539
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
3b4838b57f GoogleTest: Add tests for MultiConfig discovery in PRE_TEST mode
1ba4cb565e GoogleTest: Parameterize tests to check PRE_TEST/POST_BUILD discovery mode
75e82a13db GoogleTest: Add new DISCOVERY_MODE option to gtest_discover_tests
889a7146ff GoogleTestAddTests: Refactor into callable method
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4078
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Introducing a new DISCOVERY_MODE mode option, which provides greater control
over when gtest_discover_tests perforsm test discovery.
It has two supported modes:
* POST_BUILD
* PRE_TEST
POST_BUILD is the default behavior, which adds a POST_BUILD command
to perform test discovery after the test has been built.
PRE_TEST is a new mode, which delays test discovery until test execution.
DISCOVERY_MODE can be controlled in two ways:
1. Setting the DISCOVERY_MODE when calling gtest_discover_tests
2. Setting the global CMAKE_GTEST_DISCOVER_TESTS_DISCOVERY_MODE
prior to calling gtest_discover_tests
By delaying test discovery until ctest runtime,
we can provide better cross compile support,
because we're more likely to be in an environment that can run the test executable.
This was achieved by moving the command for test discovery
into the generated ctest include file.
In PRE_TEST mode, the generated include file now has the form:
if(EXISTS "path/to/test.exe")
if("path/to/test.exe" IS_NEWER_THAN "path/to/ctest_file")
// command to discover tests
// and generate ctest_file
endif()
include("path/to/ctest_file")
endif()
elseif()
// test not built
endif()
Which generates the appropriate CTest files at runtime
and regenerates the CTest files when the executable is updated.
In the old approach, test discovery was always added as POST_BUILD step
and the executable was ran in order to scan for tests.
If the test executable failed to run for any reason,
this resulted in a link failure.
This failure could more commonly occur when cross compiling,
because your build environment might not have
the appropriate runtime environment dlls required to run the test executable.
I also ran into the issue when compiling a Qt application using Qt Creator.
Qt Creator manages its build and runtime environments separately
and only adds the Qt dlls to the environment during runtime -- not during build.
So when gtest_discover_tests ran my test executable,
it promptly crashed because the environment wasn't correct,
which resulted in a build failure.
Setting the DISCOVERY_MODE to PRE_TEST fixed my build failure
by delaying test discovery until runtime,
because this allowed the test exe to run in the proper environment.
A few non-trivial implementation details worth noting:
1. bracket_arguments
In the PRE_TEST side, parameters whose contents might contain special characters,
need to be handled with great care.
To aid in escaping these list arguments, backslashes, and other special characters,
and ensuring that they are preserved in the generated file,
bracket arguments (i.e. [== <...> ==]) are used.
For example:
gtest_discover_tests(
...
EXTRA_ARGS how now "\"brown\" cow"
)
Generates a file with the following call:
gtest_discover_tests_impl(
...
TEST_EXTRA_ARGS [==[how;now;"brown" cow]==]
)
This way the arguments are forwarded correctly.
2. multi-config generators
Multi-Config generators (e.g. MSBuild) now work more correctly in
PRE_TEST than POST_BUILD.
PRE_TEST is more correct because it will generate a unique CTest file for each configuration.
It generates a per config file responsible for test discovery:
foo[1]_include-Debug.cmake
foo[1]_include-MinSizeRel.cmake
foo[1]_include-Release.cmake
foo[1]_include-RelWithDebInfo.cmake
A per config file for containing the google tests:
foo[1]_tests-Debug.cmake
And an outer ctest file:
foo[1]_include-Debug.cmake
That is generically written to include the correct configuration file
by looking at the value of ${CTEST_CONFIGURATION_TYPE} when CTest runs.
POST_BUILD, in contrast, preserves the existing functionality.
Tests are disocvered based on the last configuration that was chosen
and only a single file is produced:
foo[1]_include.cmake
foo[1]_tests.cmake
But it runs with whatever executable requested by ctest --config,
which means it's possible to run the wrong tests
if some tests were enabled in one configuration but not another.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Move test discovery logic into new gtest_discover_tests_impl method
and make GoogleTestAddTests aware of whether it is being launched in
CMake's script mode.
When launched in script mode, gtest_discover_tests_impl is called
passing arguments obtained from the definitions passed into the call to cmake.
(i.e. cmake -P GoogleTestAddTests -D <arg1> -D <arg2> ...)
This preserves the existing behavior assumed by GoogleTest.cmake.
Unit tests are unchanged and still pass.
Looking ahead, it also allows GoogleTestAddTests to be included in generated files
and call gtest_discover_tests_impl to perform test discovery at test runtime
with the new PRE_TEST discovery mode introduced later in this branch.
My original approach attempted to call execute_process(cmake -P ...) in
the generated file, the same way POST_BUILD is doing, but I ran into
difficulties serializing the command arguments correctly.
By exposing a way to call gtest_discover_tests_impl directly from our generated file,
we remove a layer of shell quoting / parsing that our arguments have to survive,
which simplifies the act of producing a generated file that behaves the
same as its POST_BUILD counterpart.
|
|\ \ \ \ \
| | |_|/ /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | | |
040f503d83 FindBoost: Clarify logic selecting Boost_LIB_PREFIX
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4537
|
| | | | |
| | | | |
| | | | |
| | | | | |
Also add a comment explaining its purpose.
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
4bef0e6450 llvm-rc: Enable preprocessing if CMAKE_RC_COMPILER_INIT is an absolute path
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4535
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
`CMAKE_RC_COMPILER_INIT` and `CMAKE_RC_COMPILER` can be set by user,
for example `llvm-rc-10` and `D:\LLVM\bin\llvm-rc.exe`.
|
| |\ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
2c724c3aea llvm-rc: Write depfile to location specified by the generator
4cc876540e llvm-rc: Select preprocessor from active languages
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4524
|
| |_|_|_|/ /
|/| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
To support any python installation, if package 'distutils.sysconfig'
is not available, try to use package 'sysconfig'.
Fixes: #20502
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
2ce08e5489 PCH: add an option to disable `-Winvalid-pch`
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4499
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Fixes: #20295
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
f3d7a15010 VS: Fix ClangCL toolset compiler path detection
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4523
|
| | |_|_|_|_|/
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Prior to commit 3c125c6de0 (VS: Support Visual Studio Clang Toolkit
identification, 2019-12-03, v3.17.0-rc1~341^2) using `-T ClangCL`
would work but `CMAKE_{C,CXX}_COMPILER` would be detected as `cl.exe`
even though `clang-cl.exe` is the actual compiler. That commit
attempted to fix the detection by using `$(ClangClExecutable)`
as we do for LLVM-distributed toolsets, but that is not actually
defined. Instead, look for `$(CLToolExe)` in the `PATH`.
Fixes: #20504
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
63580668a8 FindPython: fix variable spelling error
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4529
|
| | |_|/ / / /
| |/| | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
4b8297721f CheckIPOSupported: Avoid polluting cache with common name 'result'
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !4528
|
| | |/ / / / /
| |/| | | | |
| | | | | | |
| | | | | | | |
Fixes: #20508
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
6c7e6b1e49 Ninja Multi-Config: Fix MSVC showincludes prefix detection
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !4526
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Activate the detection logic for this generator too.
Fixes: #20506
|
|\ \ \ \ \ \ \
| | |_|_|/ / /
| |/| | | / /
| |_|_|_|/ /
|/| | | | |
| | | | | |
| | | | | |
| | | | | | |
2c724c3aea llvm-rc: Write depfile to location specified by the generator
4cc876540e llvm-rc: Select preprocessor from active languages
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4524
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Move the depfile flags to `CMAKE_DEPFILE_FLAGS_RC` so that they
are only usedwith generators that use depfiles. Also switch to
using the `<DEPFILE>` placeholder for the location of the depfile
so that it goes where the generator expects.
Fixes: #20493
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The llvm-rc preprocessor is selected according to the
CMAKE_C_COMPILER_ID / CMAKE_CXX_COMPILER_ID which are only defined when
the C or CXX language is active.
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
e565053bce Ninja: Remove unnecessary newlines in compile commands
5d4bab500e Avoid consecutive whitespace in rules
d8622fbd0f Modules: Collapse consecutive whitespace in strings
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4512
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
af4adf6aa9 MinGW: Fix default windres selection when cross-compiling
0251ddadab MinGW: Drop unnecessary windres selection code with Unix Makefiles
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4520
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
When cross-compiling to MinGW, select the `windres` tool named with the
toolchain's prefix.
Fixes: #20500
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Since commit 957c2aac7f (RC: Simplify selection of resource compiler
based on C/C++ toolchain, 2015-05-07, v3.3.0-rc1~93^2~5) we select
windres as the RC compiler on MinGW via `CMAKE_RC_COMPILER_INIT`. Drop
the special case from commit be9afbf453 (Find mingw's windres also when
Unix Makefiles are used, 2012-08-27, v2.8.10~152^2).
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
905d5667e8 FindRuby: Add support for RVM installations
e6699b9b59 FindRuby: Validate Ruby_EXECUTABLE before accepting it
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4386
|
| | | | | | | |
|
| |/ / / / / |
|
|\ \ \ \ \ \
| |/ / / / /
|/| | / / /
| | |/ / /
| |/| | |
| | | | |
| | | | | |
bf1ecfef7f FindPython: misc. fixes
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4519
|
| |/ / /
| | | |
| | | |
| | | |
| | | | |
Help: Fix errors regardings HINTS.
Code: Optimize Python signature cache variable to avoid unecessary searchs.
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
75331a4578 FindMatlab: Add R2020a=9.8
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4507
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
417b765f5a GetPrerequisites: Classify vcruntime libraries as system
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4506
|
| |\ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
cc7f116cb4 FindPython: fix regression on version validation
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4492
|
|\ \ \ \ \ \ \
| | |_|_|/ / /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
75331a4578 FindMatlab: Add R2020a=9.8
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4507
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This allows Matlab R2020a to be recognized as a valid Matlab version.
|
|\ \ \ \ \ \ \
| | |_|_|/ / /
| |/| | | | /
| |_|_|_|_|/
|/| | | | |
| | | | | |
| | | | | | |
417b765f5a GetPrerequisites: Classify vcruntime libraries as system
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4506
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previously GetPrerequisites classified `vcruntime*.dll` as type "other".
They should be classified as type "system".
|
| |\ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
1dc524f2 FindPython: Do not cache computed result variables in CMake 3.16
602d1d82 FindPython: Mark non-public cache entries INTERNAL in CMake 3.16
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4399
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Since commit 06d9e67fbd (FindPython: Add capability to specify directly
artifacts, 2019-08-15, v3.16.0-rc1~157^2) we accidentally add the result
variables `Python*_LIBRARY_RELEASE` and `Python*_LIBRARY_DEBUG` to the
cache. They are always computed from other results and so should not be
presented to users in cmake-gui and ccmake to edit.
Issue: #20362
|