Commit Graph

11 Commits

Author SHA1 Message Date
Brad King
9e3b559b6a Tests: Update cmake_minimum_required versions to 3.10 2024-10-03 14:18:16 -04:00
Brad King
f53bd6f450 Tests: Bump CMake minimum required in tests to 3.5
CMake 3.27 deprecates compatibility with CMake < 3.5.  Update tests that
do not cover older interfaces to avoid the deprecation warning.

Follow the pattern from:

* commit 7b07ccdd2b (Tests/*Only: Update cmake_minimum_required versions,
                     2020-06-15, v3.19.0-rc1~629^2~1)

* commit 72e7c45e98 (Tests: Bump CMake minimum required in tests to 2.8.12,
                     2020-12-22, v3.20.0-rc1~224^2)

* commit f6b4db365a (Tests: bump cmake_minimum_required version to 2.8.12,
                     2021-04-04, v3.21.0-rc1~372^2)

Also remove explicit `cmake_policy` settings made redundant by the
version.
2023-03-01 16:36:54 -05:00
William R. Dieter
3640842df2 Tests: Update ModuleDefinition for IntelLLVM MSVC Frontend Variant
IntelLLVM for MSVC uses the compiler for linking.  The /DEF flag needs
to be passed to the linker, and the compiler does not accept it, unless
it is prefixed with `/Qoption,link,`.

Rather than explicitly set the LINK_FLAGS target property, as is done
for other MSVC frontend variants, add the .def file to the sources
for `add_library`.  `add_library` will wrap the `/DEF` flag using
`CMAKE_${lang}_LINKER_WRAPPER_FLAG`.  Presumably, this should work
for any MSVC front end, but leave the original test to avoid changing
a test that is working.

Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
2022-08-01 19:34:49 -04:00
Rolf Eike Beer
f6b4db365a Tests: bump cmake_minimum_required version to 2.8.12
This needlessly produces warnings during the test runs that no-one
sees but that are distracting when actually inspecting the logs.
2021-04-05 09:53:07 -04:00
Kitware Robot
d7204e649e Revise C++ coding style using clang-format-6.0
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`.  Use `clang-format` version 6.0.

* 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.
2018-06-01 09:53:42 -04:00
Brad King
075f645409 Support WINDOWS_EXPORT_ALL_SYMBOLS with .def files
The `WINDOWS_EXPORT_ALL_SYMBOLS` target property exports all symbols
found in object files explicitly given to the linker.  However, the
linker may also find additional symbols in dependencies and copy them
into the linked binary (e.g. from `msvcrt.lib`).  Provide a way to
export an explicit list of such symbols by adding a `.def` file as a
source file.

Fixes: #16473
2017-03-21 10:02:34 -04:00
Kitware Robot
d9fd2f5402 Revise C++ coding style using clang-format
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.
2016-05-16 16:05:19 -04:00
Ben Boeckel
29c3edb87a Avoid if() quoted auto-dereference
When testing CMAKE_<LANG>_COMPILER_ID values, do not explicitly
dereference or quote the variable. We want if() to auto-dereference the
variable and not its value. Also replace MATCHES with STREQUAL where
equivalent.
2014-10-20 11:49:16 -04:00
Brad King
89987c2102 Test generated module .def files
Teach the ModuleDefinition test to cover the case that a .def file is
generated by a custom command.
2012-04-02 10:54:25 -04:00
Brad King
f1b7e620f7 Fix ModuleDefinition test for Intel on Windows
CMake defines MSVC only for a VS compiler, but the Intel compiler adds
the preprocessor definition _MSC_VER.  Instead of relying on separate
tests to decide whether to use example_dll_2, we do one test in CMake
and then add our own preprocessor definition.
2009-10-05 14:39:23 -04:00
Brad King
0db2c8505e Test use of module .def files for MS tools
This adds a "ModuleDefinition" test enabled when using MSVC tools.  It
checks that .def files can be used to export .dll and .exe symbols and
create corresponding .lib files that can be linked.  See issue #9613.
2009-09-29 16:39:43 -04:00