| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
These provide more detailed information about how the test project was
configured.
Issue: #23200
|
|
|
|
| |
Preserve manually-formatted blocks.
|
| |
|
|
|
|
| |
Issue: #23200
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Some newer compilers warn in situations where the returned local
variable could be movable, but a C++11 defect meant older compilers
may still return a copy when a type conversion is involved. Adding
the suggested std::move prevents that warning on that compiler, but
creates a new warning on others. Constructing the actual return type
explicitly with the suggested std::move on the constructor argument
keeps both sets of compilers happy.
|
|
|
|
|
|
| |
Add configure log events for `try_compile` and `try_run` results.
Issue: #23200
|
|
|
|
|
|
| |
Update the `TryCompileCode` signature to allow callers to distinguish
between administrative failures and a compilation failure. Return
results in a structure to which more information can be added later.
|
|
|
|
|
|
|
|
|
| |
Since commit 0c141b0393 (try_compile: Record output location instead of
reverse computing it, 2022-08-31, v3.25.0-rc1~154^2) we always look for
the "Debug" configuration's output binary from the test project.
Restore looking for the `CMAKE_TRY_COMPILE_CONFIGURATION`.
Fixes: #24180
|
|\
| |
| |
| |
| |
| |
| |
| | |
50e90e2828 try_compile: Honor CMP0128 setting in test project
Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !7803
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some projects pass a raw `-std=` flag to the compiler in the
`try_compile` project. If they do not set CMP0128 to NEW,
we should not append a `-std=` flag where we did not before
the policy was added.
Fixes: #24063
|
| |
| |
| |
| |
| |
| |
| |
| | |
When `--debug-trycompile` is enabled, issue a log (with trace) for every
`try_compile` noting what directory is being used for the compilation.
This will make it easier to find the corresponding artifacts.
Closes: #24022
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change the SOURCE_FROM_ARG keyword to try_compile to SOURCE_FROM_CONTENT
(which we can do because it was recently added and hasn't been in a
release yet). The new name should be clearer as to what it does, and
also more consistent with the CONTENT arguments to some other commands.
Also, fix a typo in an error message.
|
| |
| |
| |
| |
| |
| |
| | |
Add NO_CACHE option to try_compile and try_run, which places the results
in regular, rather than cache, variables.
Issue: #22799
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
611d801790 try_compile: Add SOURCE_FROM_FILE
a04eaf6742 Tests: Clean up and simplify TryCompile tests
cb14ae2b87 try_compile: Add SOURCE_FROM_{ARG,VAR}
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7700
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add ability to copy try_compile (and try_run) source files from
arbitrary locations into the operation directory. This is included for
the sake of completion and consolidation, although use cases which
actually require this may be rare.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add ability to "feed" try_compile (and try_run) sources more directly,
either from literal content, or from a CMake variable which contains
literal content. This saves the user from needing a separate step to
write the content to a file, and allows for the sources to only exist in
the scratch directory.
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
aac542f2f1 try_run: Remove PROJECT support
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7702
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
Remove PROJECT support from try_run; it was never tested, has never been
documented, and it's unclear how it should even work (since CMake
wouldn't know what executable to run).
|
|/ /
| |
| |
| |
| | |
Tweak some error messages from try_compile (and try_run) to be more
consistent with each other.
|
| |
| |
| |
| |
| |
| |
| | |
Introduce a new signature for the project flavor of try_compile (and
try_run) which removes the `bindir` argument and adds a required PROJECT
tag. This is similar to the SOURCES flavor added by commit aa9220d3
(try_compile: Add keyword-dispatched signature, 2022-09-02).
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
a858466aac MSVC: Add test for debug information format
0e96a20478 MSVC: Add abstraction for debug information format
d4c8111da4 Clang/Windows: Clarify name of internal runtime library flags variables
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7606
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Replace our hard-coded default for `/Zi` with a first-class abstraction
to select the debug information format an enumeration of logical
names. We've long hesitated to do this because the idea of "debug
information format" touches on related concepts on several platforms.
Avoid that scope creep by simply defining an abstraction that applies
only when targeting the MSVC ABI on Windows.
Removing the old default flag requires a policy because existing
projects may rely on string processing to edit them and choose a
runtime library under the old behavior. Add policy CMP0141 to
provide compatibility.
Fixes: #10189
|
|/ /
| |
| |
| | |
Fixes #23887, #23942, #20163, #18288
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Introduce a new signature for try_compile (and try_run) which removes
the `bindir` argument and requires the SOURCES tag. This will eventually
allow us to add other ways of providing sources, but also allows us to
change the behavior without breaking compatibility.
The old signature uses a special, but non-unique temporary location
inside the specified `bindir`, which conventionally is just the
project's build directory. The new signature unconditionally uses the a
unique temporary directory which is unconditionally within the project's
build directory (which is no longer separately specified). This ensures
that successive runs do not overwrite previous runs, will simplify
debugging, and should also, eventually, allow us to execute multiple
trials in parallel.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Modify cmCoreTryCompile to only recognize try_run arguments when
actually parsing try_run. (The old behavior was to recognize try_run
arguments for try_compile also and then complain.)
This has a small chance that a try_run keyword will be consumed as part
of a multi-valued keyword argument. However, this behavior is more
consistent with other commands, as we don't normally treat keywords as
universally reserved. Also, the code is noticeably simplified.
|
| |
| |
| |
| |
| |
| |
| |
| | |
In commit 6b427d8da9 (cmCoreTryCompile: Port to cmArgumentParser,
2022-08-01) we inadvertently dropped a matching quote during refactoring
of reporting unknown arguments given to try_compile/try_run. Add the
missing quote to match the old behavior and not have an imbalanced quote
in the warning.
|
| | |
|
| |
| |
| |
| |
| | |
This is specific to `try_compile` since `try_run` always needs an
executable. Move the logic out of the common code path.
|
| |
| |
| |
| | |
The return value is only used as a boolean, so use `bool`.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
If the bindir is not an absolute path, other errors occur later.
Fail early with a clear error in this case.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
81549baff4 try_compile: Fix COPY_FILE with app-bundles on non-macOS hosts
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7377
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Cross compiling from eg linux to apple-platforms requires handling of
.app-Bundles.
Fixes: #23597
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
6377a43814 CUDA: Support response files with nvcc
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7358
|
| |/ / |
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
Rename the booleans 's_ErrorOccured' and 's_FatalErrorOccured' to
's_ErrorOccurred' and 's_FatalErrorOccurred', respectively.
Rename the getters and setters to 'Get[Fatal]ErrorOccurred' and
'Set[Fatal]ErrorOccurred', and fix all uses across the codebase.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Add a `CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES` variable to tell
`try_compile` not to pass platform variables to the test project.
Issue: #23219
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add policy CMP0137 to propagate both our builtin variables and those
listed by `CMAKE_TRY_COMPILE_PLATFORM_VARIABLES` to `try_compile`
whole-project builds.
Inspired-by: Alexander Neumann <Alexander.Neumann@hamburg.de>
Fixes: #23219
|
| |
| |
| |
| |
| |
| |
| |
| | |
Add a `CMAKE_WATCOM_RUNTIME_LIBRARY` variable to control the
runtime library selection. Add policy CMP0136 to switch to
in place of the old hard-coded default flags.
Fixes: #23178
|
| | |
|
|/
|
|
|
|
| |
Prepare to enable the behavior under more conditions.
Issue: #23219
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the Apple linker sees -headerpad_max_install_names and
bitcode is enabled with a flag like -fembed-bitcode, it issues a warning
and ignores the -headerpad_max_install_names flag. This causes
unrelated compiler and linker flag checks to fail for valid flags.
In f745e0497e (CheckCompilerFlags: Catch linker warning about ignored
flags, 2022-01-03), we started detecting linker warnings, which caused
a regression for projects that were setting -fembed-bitcode in their
CMAKE_CXX_FLAGS or similar. Prevent that regression by removing
the -headerpad_max_install_names linker flag when we know it will
warn and be ignored anyway.
Fixes: #23390
Issue: #23408
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
To avoid ambiguity on std::string assigment between the following two
cmProp cast operators:
* operator const std::string&() const noexcept
* operator cm::string_view() const noexcept
|