4671 Commits

Author SHA1 Message Date
Brad King
1c60231ca5 CUDA: Link to standard system libraries when linking as CUDA
On Windows with MSVC-like host compilers we must honor the standard
libraries chosen by the `Platform/Windows-MSVC` module.  Otherwise C
code linked into the CUDA binary that expects to have these libraries
available may not link.
2017-02-14 10:34:15 -05:00
Brad King
8d75d8dc72 Tests: Add case for CUDA with C but not C++
An executable using CUDA and C should link as CUDA.
2017-02-14 10:34:06 -05:00
Brad King
c4a6135039 Tests: Run clang-format on CUDA code 2017-02-14 10:20:50 -05:00
Brad King
592e3d2f96 clang-format.bash: Format CUDA source files too
Add `.clang-format` configuration files for Cuda test directories that
use `Standard: Cpp11`.  Otherwise clang-format splits the triple angle
brackets used for CUDA kernels.
2017-02-14 10:20:23 -05:00
Robert Maynard
44f3acb202 CUDA: Detect the toolkit include directories
The `nvcc -v` output provides what include directories need to be added
to use the CUDA toolkit from other languages ( C/C++ ).
2017-02-10 16:08:06 -05:00
Zack Galbreath
8a5cb84b0e AndroidTestUtilities: do not require ExternalData unconditionally
Attempting to use AndroidTestUtilities to simply install some local
files on device can result in the following error:

    Neither ExternalData_URL_TEMPLATES nor ExternalData_OBJECT_STORES is set

We no longer require these ExternalData-specific variables to be set if
no such remote data files are requested.

Fixes: #16529
2017-02-04 08:16:24 -05:00
Rolf Eike Beer
940bf6a4a4 Tests/Module/WCDH: only use -Werror=undef compiler flag if actually supported 2017-02-02 18:28:56 +01:00
Rolf Eike Beer
f26ca5a195 Tests/Module/WCDH: write multi_file_compiler_detection.h before using it
This was broken in commit 98e6d1e5e426c491e04faa746c11746002e6a69d
(Tests/Module/WCDH: make it work with only C features defined) when all C tests
were made accessible even if no C++ features are available, but the header was
only created if C++ features are available. Fix it by creating the header
unconditionally before any checks on the available features.
2017-02-02 18:25:28 +01:00
Brad King
6f2e2c74ba Merge topic 'WCDH_allow_unsupported'
1679fecb CompileFeatures Test: make sure the target "CompileFeatures" is always defined
98e6d1e5 Tests/Module/WCDH: make it work with only C features defined
c8703e9d WCDH: optionally omit error code for unknown compilers or compiler versions
0de9c398 WCDH: add macro to write simple replacement defines
2017-02-01 09:21:44 -05:00
Brad King
6ec0c09a7a Merge topic 'topic-reproducible-build'
5181f1f8 Tests: make tests pass with SOURCE_DATE_EPOCH set
2017-01-31 09:04:21 -05:00
Brad King
f012a95836 Merge topic '16432-static-frameworks'
071f8e78 Apple: Add support for static frameworks
d525754e Xcode: Refactor RunCMake.Framework test to prepare for static frameworks
45405f00 Xcode: Ignore Xcode project warning until issue is fixed
50e1c105 Makefile: For static libraries remove only the "real" lib before creating
8643ca75 Makefile: Re-order list of files to clean
2017-01-31 09:04:16 -05:00
Gregor Jasny
071f8e78dd Apple: Add support for static frameworks
Closes: #16432
2017-01-31 08:59:15 -05:00
Rolf Eike Beer
1679fecb74 CompileFeatures Test: make sure the target "CompileFeatures" is always defined
Everything in there guards against unsupported compilers already, so no need to
skip the whole file if no features are defined. This in turn allows to have a
simpler fallback in case there is no C++ auto_type feature available.
2017-01-30 19:19:44 +01:00
Rolf Eike Beer
98e6d1e5e4 Tests/Module/WCDH: make it work with only C features defined 2017-01-30 19:19:44 +01:00
Rolf Eike Beer
c8703e9d7b WCDH: optionally omit error code for unknown compilers or compiler versions
This allows one to generate a header that will basically always work. In case
an unknown compiler or compiler version is encountered it simply falls back to
the unsupported case.
2017-01-30 19:19:44 +01:00
Bernhard M. Wiedemann
5181f1f86a Tests: make tests pass with SOURCE_DATE_EPOCH set
Fix tests to account for commit 243aed52 (cmTimestamp: Support
SOURCE_DATE_EPOCH to override current time, 2017-01-25).

In openSUSE we are running the test-suite as part of the build and that
failed in these two places when building everything with
`SOURCE_DATE_EPOCH` set.
2017-01-30 09:25:44 -05:00
Brad King
8df12fc9d4 Merge topic 'FeatureSummary_enhancement'
560574b0 FeatureSummary: Update release notes
3cfde818 FeatureSummary: Refactor to use global properties for package types
f0165eb6 FeatureSummary: Allow lists of dependencies in ADD_FEATURE_INFO
9da7bf08 FeatureSummary: Add QUIET_ON_EMPTY option to feature_summary
4cf4aceb FeatureSummary: Add unit tests
614a97a5 FeatureSummary: Do not force OPTIONAL type in SET_PACKAGE_PROPERTIES
65a0bfd8 FeatureSummary: Add deprecation warnings to deprecated commands
4da3cae9 FeatureSummary: Clean printed output
2017-01-30 08:43:23 -05:00
Brad King
5c6c766da1 Merge topic 'timestamp-percent'
6c54f7b3 string: Teach TIMESTAMP to treat %% as %
2017-01-30 08:43:21 -05:00
Brad King
e6659f6323 Merge topic 'test-preprocess-configs'
f01045ea Tests: Make Preprocess test work in RelWithDebInfo and MinSizeRel
2017-01-30 08:43:17 -05:00
Bernhard M. Wiedemann
6c54f7b365 string: Teach TIMESTAMP to treat %% as %
This encoding is documented by `strptime`.
2017-01-27 09:25:37 -05:00
Gilles Khouzam
f01045ea36 Tests: Make Preprocess test work in RelWithDebInfo and MinSizeRel 2017-01-27 09:09:15 -05:00
Brad King
325c615308 Merge topic 'genex-if'
895f7f16 Genex: Add `IF` generator expression
2017-01-27 09:04:58 -05:00
Brad King
86ec0aca05 Merge topic 'topic-reproducible-build'
243aed52 cmTimestamp: Support SOURCE_DATE_EPOCH to override current time
2017-01-27 09:04:53 -05:00
Brad King
fa9c12933f Merge topic 'test-GeneratorExpression-update'
c3a22518 Tests: Extend GeneratorExpression to work with more configurations
d4911724 Tests: Teach GeneratorExpression to cover spaces in include dirs
1a2a9b0d Tests: Simplify GeneratorExpression imported include directory check
2017-01-27 09:04:49 -05:00
Gregor Jasny
d525754eab Xcode: Refactor RunCMake.Framework test to prepare for static frameworks 2017-01-26 13:34:58 -05:00
Gregor Jasny
45405f00d2 Xcode: Ignore Xcode project warning until issue is fixed
Issue: #15272
2017-01-26 13:34:40 -05:00
Colby Pike
895f7f16a7 Genex: Add IF generator expression
This allows a single condition to be used to choose between two
alternatives.  Without this the condition must be duplicated with
one surrounded by `NOT`.

Closes: #15585
2017-01-26 11:18:50 -05:00
Brad King
b8db2ed796 Merge topic 'tests_auto_type'
ef47272b Tests: use cxx_auto_type only if actually available
2017-01-26 10:40:47 -05:00
Brad King
09cad30904 Merge topic 'FindGTK2_RunTwice'
4bc2c16b FindGTK2: Add unit test to check variables when run twice
9702b3ee FindGTK2: Fix GTK2_LIBRARIES and GTK2_TARGETS when called twice
2017-01-26 10:40:39 -05:00
Bernhard M. Wiedemann
243aed525a cmTimestamp: Support SOURCE_DATE_EPOCH to override current time
See https://reproducible-builds.org/ for why this is good and
https://reproducible-builds.org/specs/source-date-epoch/ for the
definition of this variable.
2017-01-26 10:21:41 -05:00
Brad King
c3a22518f8 Tests: Extend GeneratorExpression to work with more configurations
Add missing pieces for RelWithDebInfo and MinSizeRel.
2017-01-26 10:16:08 -05:00
Brad King
d491172445 Tests: Teach GeneratorExpression to cover spaces in include dirs
Add a space to the imported include directories used for the test.
This works around funny quoted-`;` interpretation by Visual Studio.
2017-01-26 10:11:25 -05:00
Brad King
1a2a9b0d08 Tests: Simplify GeneratorExpression imported include directory check
Do not duplicate the list of include directories 4 times.
2017-01-26 10:09:55 -05:00
Daniele E. Domenichelli
3cfde81835 FeatureSummary: Refactor to use global properties for package types
These new global properties were added:

* FeatureSummary_PKG_TYPES: Package types accepted by FeatureSummary
  (default REQUIRED RECOMMENDED OPTIONAL RUNTIME).
* FeatureSummary_REQUIRED_PKG_TYPES: Package types that will cause
  FeatureSummary to abort when called with
  FATAL_ON_MISSING_REQUIRED_PACKAGES and a package in these categories
  is missing (default REQUIRED).
* FeatureSummary_DEFAULT_PKG_TYPE: Default package type assigned when
  not explicitly assigned by the user (default OPTIONAL).

This allows to add and remove new package types that can be printed
selectively using the "WHAT" argument.
2017-01-26 12:28:12 +01:00
Daniele E. Domenichelli
f0165eb624 FeatureSummary: Allow lists of dependencies in ADD_FEATURE_INFO 2017-01-26 10:52:37 +01:00
Daniele E. Domenichelli
9da7bf0825 FeatureSummary: Add QUIET_ON_EMPTY option to feature_summary
This option suppresses the output when the list of packages that belong
to the selected category is empty.
2017-01-26 10:52:35 +01:00
Daniele E. Domenichelli
4cf4acebe3 FeatureSummary: Add unit tests 2017-01-26 10:52:09 +01:00
Daniele E. Domenichelli
4da3cae9ff FeatureSummary: Clean printed output
* Remove space before commas
* Do not add an empty line before the first type of packages

Also fix a typo in unit test.
2017-01-26 10:50:08 +01:00
Rolf Eike Beer
ef47272b07 Tests: use cxx_auto_type only if actually available
The presence of CMAKE_CXX_COMPILE_FEATURES doesn't mean cxx_auto_type is always
available.
2017-01-25 21:00:30 +01:00
Brad King
54790e77d7 Merge topic 'sanitizer-options'
e116f2a5 ctest_memcheck: Fix sanitizers when MemoryCheckSanitizerOptions is empty
522e1588 Tests: Use CTEST_MEMORYCHECK_SANITIZER_OPTIONS where appropriate
2017-01-25 08:41:21 -05:00
Brad King
4f37987e3f Merge topic 'lang_lint'
0618ddf6 Add properties to run the cpplint style checker with the compiler
2017-01-25 08:41:18 -05:00
Daniele E. Domenichelli
4bc2c16b5d FindGTK2: Add unit test to check variables when run twice 2017-01-25 10:20:35 +01:00
Brad King
c59d381065 Merge topic 'cpack-stgz-minimal-test'
624709c8 CPack/STGZ: minimalistic packages test
1c93eb68 CPack/STGZ prefer pax for extraction
2017-01-24 14:45:35 -05:00
Brad King
6122fc54a9 Merge topic '16253-xcode-effective-platform-name'
10c9c73d Xcode: Control emission of EFFECTIVE_PLATFORM_NAME
2017-01-24 14:45:24 -05:00
Jamie Snape
0618ddf6b1 Add properties to run the cpplint style checker with the compiler
Create a `<LANG>_CPPLINT` target property (initialized by a
`CMAKE_<LANG>_CPPLINT` variable) to specify a `cpplint` style checker
command line to be run along with the compiler.
2017-01-23 14:47:13 -05:00
Jamie Snape
e116f2a5de ctest_memcheck: Fix sanitizers when MemoryCheckSanitizerOptions is empty 2017-01-23 10:50:38 -05:00
Jamie Snape
522e1588ec Tests: Use CTEST_MEMORYCHECK_SANITIZER_OPTIONS where appropriate
Previously the ThreadSanitizer and MemorySanitizer tests erroneously
used `CTEST_MEMORYCHECK_COMMAND_OPTIONS`.
2017-01-23 09:13:26 -05:00
Domen Vrankar
624709c824 CPack/STGZ: minimalistic packages test 2017-01-22 22:07:16 +01:00
Gregor Jasny
10c9c73d58 Xcode: Control emission of EFFECTIVE_PLATFORM_NAME
When building with multiple SDKs within one project Xcode requires
the usage of ${EFFECTIVE_PLATFORM_NAME} to put temporary and build
outout into separate directories. For example an iOS device and
simulator build use two different SDKs (iphoneos and iphonesimulator).

In the past cmake tries to detect embedded toolchains that could
possibly use simulators and emitted EFFECTIVE_PLATFORM_NAME (EPN)
at the proper locations. In #16253 Mark noticed that if he
uses macosx and iphoneos in combination the necessary EPN is not
emitted. This is because CMake by default assumes macosx SDK which
does not trigger EPN emission.

The fist naive approach - enabling EPN unconditionally revealed that
then the EPN leaks into generator expressions like $<TARGET_FILE:xxx>
which might be a regression and thus is unacceptable.

The next approach was to add an CMake property to enable EPN emission
unconditionally. This solved the reported problem.

But the EPN leakage also happened for the embedded toolchains already
without anyone noticing. So the control property was turned into a
tri-state one:

 * No definition: EPN is activated for embedded toolchains like before
 * ON: EPN is always emitted
 * OFF: EPN is never emitted

That approach gives the user the chance to disable EPN for embedded
toolchains and restores generator expression functionality for those.

Closes: #16253
2017-01-20 13:51:48 -05:00
Brad King
910ef6d0a3 Merge topic '16165-manually-added-dependencies'
d9f836e9 Add a getter for manually added target dependencies
2017-01-20 11:54:31 -05:00