Commit Graph

3470 Commits

Author SHA1 Message Date
Brad King 7cebc5acac Merge topic 'rpm_package_architecture'
b6f94e6b Help: Add notes for topic 'rpm_package_architecture'
f174b919 Tests: CpackRPM test component architecture
3aa9f89d CPackRPM: Support rpm architecture in components
761562fe CPackRPM: Fix CPACK_RPM_PACKAGE_ARCHITECTURE
2015-02-23 11:06:05 -05:00
Joshua A Clayton f174b919d6 Tests: CpackRPM test component architecture
Test creating rpms of type "noarch", native, and "armv7hf"
2015-02-23 10:48:36 -05:00
Brad King 67fa9462ad Merge topic 'rpm_run_tests_on_other_platforms'
8c0474cd CPackRPM: run tests on more platforms than just Linux
2015-02-23 10:26:46 -05:00
Brad King cc3611023d Merge topic 'use-algorithms'
bb9d71b4 Replace loops with algorithms.
4afe6c26 cmAlgorithms: Add cmReverseRange adaptor.
a3a0a8c2 cmAlgorithms: Add cmFindNot algorithm.
8c74a41f cmRST: Replace two erase with a rotate and larger erase.
61fe1919 cmAlgorithms: Update concept requirement to FowardIterator
09d6125b cmAlgorithms: Move cmRotate out of 'implementation detail' namespace.
8ed6ecac cmRST: Move two algorithms beside each other.
dfe49c20 cmRST: Use std::min where appropriate.
21b0654a cmGlobalGenerator: Convert set insert algorithm to vector algorithms.
416df93a Convert some raw loops to cmWrap.
37b88d34 cmAlgorithms: Add cmWrap.
a2818093 Use cmJoin where possible.
76207b08 cmCacheManager: Replace loop with algorithm.
60c3bb73 cmGlobalGenerator: Replace loop with algorithm.
05fec779 cmTarget: Port loop to algorithm.
9c225767 cmGlobalGenerator: Replace set::insert algorithm with cmRemoveDuplicates.
...
2015-02-23 10:26:38 -05:00
Brad King 1eb192905d Merge topic 'private-FindJsonCpp'
a41d621d bootstrap: Add --(no-)system-jsoncpp options
a5768442 FindJsonCpp: Drop new module due to upstream jsoncpp providing package
2015-02-23 10:26:30 -05:00
Domen Vrankar 8c0474cd2c CPackRPM: run tests on more platforms than just Linux
Lift the restriction that limits use of CPackRPM tests to Linux OS only
because RPM can also be used on e.g. AIX which is Unix OS.
2015-02-23 10:19:29 -05:00
Stephen Kelly 21b0654ace cmGlobalGenerator: Convert set insert algorithm to vector algorithms.
Adjust test for new error output.
2015-02-20 21:36:57 +01:00
Brad King a576844263 FindJsonCpp: Drop new module due to upstream jsoncpp providing package
Since jsoncpp 0.7.0 (2014-11-20) the upstream may provide a CMake
package configuration file such that find_package(jsoncpp) will find a
jsoncppConfig.cmake file.  In order to avoid conflicting with this
(especially on case-insensitive filesystems), and since we always prefer
projects to provide package config files (that they maintain), it is
better to not provide FindJsonCpp publicly.

Move FindJsonCpp into a private source directory that is not installed
so that we can still use it for building CMake itself.

Reported-by: Ryan Pavlik <ryan.pavlik@gmail.com>
2015-02-20 08:22:02 -05:00
Brad King c4c570f9cc Merge topic 'find-command-prefix-from-PATH'
ffc06c12 Teach find_(library|file|path) to get prefixes from PATH (#15370)
2015-02-20 08:10:50 -05:00
Brad King ffc06c1239 Teach find_(library|file|path) to get prefixes from PATH (#15370)
The find_package command already knows how to compute installation
prefixes from PATH.  Use the same approach to establish prefixes for
find_library, find_file, and find_path to use to look in directories
like "<prefix>/lib[/<arch>]" and "<prefix>/include" for libraries and
headers.  This will reduce the amount of configuration end users need to
do to establish a work environment rooted under a specific prefix.
2015-02-19 10:03:17 -05:00
Brad King f611406fe9 Fortran: Test that CMAKE_Fortran_COMPILER_VERSION is set (#15372)
Update the CMakeOnly.CompilerIdFortran test to require that the variable
is set instead of just warning.  We already require it for C and CXX.
2015-02-19 09:26:28 -05:00
Brad King d891d47434 Tests: Consolidate detection of 'rpmbuild'
Several tests use slight variations of the same logic to enable CPack
RPM tests.  Consolidate this logic into one check before any tests are
added.  Look for 'rpmbuild' only on Linux and only when the test build
tree does not have spaces in the path.  In particular, this will make
the result available in time for the RunCMake.CPackRPM test to be
activated even if CMake is configured exactly once.
2015-02-13 11:50:38 -05:00
Gregor Jasny bf8f9c29e7 Xcode: Teach XCODE_ATTRIBUTE target properties about generator expressions
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-02-12 13:35:31 -05:00
Brad King f30022eb07 install: Allow generator expressions in TARGETS DESTINATION (#14317)
This will allow per-config destinations for targets in EXPORT sets.
Using multiple install(TARGETS) with separate CONFIGURATIONS is
rejected as a target appearing more than once in an export set.
Now instead one can write

 install(TARGETS foo EXPORT exp DESTINATION lib/$<CONFIG>)

to get a single logical membership of the target in the export set
while still having a per-config destination.
2015-02-11 15:15:33 -05:00
Brad King 108e94ecf1 Merge topic 'export-interface-source-files'
f7e33820 Add release notes for export-interface-source-files.
6da65b39 Allow export of targets with INTERFACE_SOURCES.
736bcb96 Tests: Move IfacePaths test stderr files.
d9f8390d Tests: Run IfacePaths tests with a parameter.
cc152094 Tests: Split part of include_directories test to a generic location.
2015-02-11 09:59:30 -05:00
Stephen Kelly 6da65b3907 Allow export of targets with INTERFACE_SOURCES.
Use the same rules for paths in source and binary dirs in
installed INTERFACE_SOURCES as are used for
INTERFACE_INCLUDE_DIRECTORIES.
2015-02-11 00:51:34 +01:00
Stephen Kelly 736bcb9664 Tests: Move IfacePaths test stderr files.
Rename the files with a property-specific name, so that additional
properties can be easily tested.
2015-02-11 00:51:30 +01:00
Brad King 2fd44b082b Merge topic 'test-RunCMake-updates'
c0d8e715 RunCMake: Allow specifying the stderr file for a test.
68d29f51 RunCMake: Allow specifying the directory to run tests in.
1c3918ff RunCMake: Remove unneeded files.
2015-02-10 10:09:47 -05:00
Brad King db9a2e8966 Merge topic 'no-global-setlocale'
0f870234 Merge branch 'backport-no-global-setlocale' into no-global-setlocale
cd408d93 Add setlocale() calls around use of libarchive APIs (#14934, #15377)
87be2e14 Do not call setlocale() globally in CMake applications (#15377)
2015-02-10 09:37:50 -05:00
Stephen Kelly d9f8390db6 Tests: Run IfacePaths tests with a parameter.
Run the tests for the INCLUDE_DIRECTORIES INTERFACE property
in a specific build location, and update the stderr expectation
to match the new output.
2015-02-09 19:34:27 +01:00
Stephen Kelly cc15209476 Tests: Split part of include_directories test to a generic location.
The moved tests are related to paths in INTERFACE_INCLUDE_DIRECTORIES
in general, and when exporting, and covering cases of the install
location being within the build or source prefix etc.  Other build
properties containing paths should have similar tests, so this
allows some parameterization while keeping the preparation of the
various directory structures.
2015-02-09 19:23:47 +01:00
Stephen Kelly c0d8e71591 RunCMake: Allow specifying the stderr file for a test. 2015-02-09 19:15:04 +01:00
Stephen Kelly 68d29f5190 RunCMake: Allow specifying the directory to run tests in. 2015-02-09 19:15:04 +01:00
Stephen Kelly 1c3918ff02 RunCMake: Remove unneeded files.
The default expectation of RunCMake tests is empty content, so there
is no need to specify it.
2015-02-09 19:15:04 +01:00
Brad King 0f870234fe Merge branch 'backport-no-global-setlocale' into no-global-setlocale
Resolve conflict in Source/CMakeLists.txt by taking both changes.
2015-02-06 13:35:21 -05:00
Brad King 87be2e1427 Do not call setlocale() globally in CMake applications (#15377)
Revert the changes made by commit v3.1.0-rc1~406^2~1 (Encoding: Add
setlocale() to applications, 2014-05-30) and commit v3.1.0-rc1~406^2
(Encoding: Change to only set LC_CTYPE, 2014-06-11), and other setlocale
calls added later in their spirit.  CMake has not been taught how to
deal with non-C locales everywhere.  We do not define any functionality
for character conversions for non-ASCII strings.  Another solution will
be needed to address the original problem motivating addition of
setlocale() calls.
2015-02-06 13:32:26 -05:00
Brad King 54e900abfb CheckFortranCompilerFlag: Add test case
Extend the FortranOnly test with a case covering this module.
2015-02-05 11:18:13 -05:00
Brad King 9042c875dc Merge topic 'fix-C-standard-features'
fb3487a9 Features: Fix C90 feature detection.
6027798a Features: Allow setting standard dialect below the default.
9d767810 Features: Populate CMAKE_<LANG>_STANDARD_DEFAULT only for supported compilers.
72537e44 Features: Add dialect compile flags only if default is known.
82c9d686 AppleClang: Remove redundant UNIX condition.
2015-02-05 09:25:14 -05:00
Stephen Kelly fb3487a997 Features: Fix C90 feature detection.
This bug caused c_function_prototypes to not be recorded at configure
time when compiling with -std=gnu99 or similar. In the case of feature
recording, that was not a problem, because the logic in
CMakeDetermineCompileFeatures.cmake currently assumes that a feature
present for an earlier standard is present for a later standard.

However, the detection strings are also used in WriteCompilerDetectionHeader,
so the feature macro has been defined to '0' when using a later language
dialect.

Fix that by not checking the existence of the __STDC_VERSION__ macro at
all when detecting C90 features.
2015-02-04 18:38:21 -05:00
Brad King 8f82004368 Merge topic 'CTestCoverageCollectGCOV-refinements'
809a5a5e Help: Add notes for topic 'CTestCoverageCollectGCOV-refinements'
03c0812c CTestCoverageCollectGCOV: Fix handling of international characters
8caa4e72 CTestCoverageCollectGCOV: Add test case
5c828cc8 CTestCoverageCollectGCOV: Allow custom flags to gcov
30cb628e CTestCoverageCollectGCOV: Fix handling of large file counts
2015-02-04 12:30:10 -05:00
Bill Hoffman 8caa4e72ab CTestCoverageCollectGCOV: Add test case 2015-02-03 10:40:58 -05:00
Brad King aec11372a5 Merge topic 'rpm_multi_prefix'
3ec02547 CPackRPM: Allow multiple path relocation prefixes for one package
2015-02-03 09:46:21 -05:00
Robert Maynard d3489bdb0b Features: Record for MSVC 2010-2015
Also, in WCDH add MSVC Compatibility for cxx_align{of,as}.

Co-Author: Stephen Kelly <steveire@gmail.com>
Co-Author: Brad King <brad.king@kitware.com>
2015-01-30 09:57:33 -05:00
Brad King 3228fc5049 Features: Define meaning for no language standard default
Define an empty string in CMAKE_<LANG>_STANDARD_DEFAULT to mean that
the toolchain has no notion of lanuage standard levels.  In this case
the <LANG>_STANDARD[_REQUIRED] properties will have no effect.

Update the RunCMake.CompileFeatures test to exclude the
LinkImplementationFeatureCycle test when there is no standard default.
It can never fail because no use of specific features will adjust the
CXX_STANDARD level required for any target since the standard levels
have no meaning in this case.
2015-01-29 15:01:40 -05:00
Domen Vrankar 3ec0254727 CPackRPM: Allow multiple path relocation prefixes for one package 2015-01-29 10:48:58 -05:00
Brad King 326cfe2b30 Merge topic 'xcode-revise-make-program'
ab9fa54d Xcode: Switch to internal CMAKE_MAKE_PROGRAM lookup by generator (#15324)
11e2e6ca Xcode: Select make program at build time
e4055a61 Xcode: Add internal API to find xcodebuild
2015-01-29 09:14:00 -05:00
Brad King 98659aecfd Merge topic 'vs-shader-flags'
4775c901 VS: Add source file property to set extra hlsl shader flags
2015-01-29 09:13:58 -05:00
Brad King abec4213d6 Merge topic 'fix-OBJECT_DEPENDS-after-path-normalization'
9259d778 Normalize OBJECT_DEPENDS paths to match custom commands (#15366)
2015-01-29 09:13:53 -05:00
Brad King ab9fa54d48 Xcode: Switch to internal CMAKE_MAKE_PROGRAM lookup by generator (#15324)
The "cmakexbuild" wrapper is not needed for Xcode 4 and above, and the
path to it may change when CMake moves.  Avoid storing a specific path
to a build program in CMakeCache.txt and instead compute the value for
CMAKE_MAKE_PROGRAM on demand.  However, if a user does set the value
explicitly then honor it.

This does for Xcode what commit v3.0.0-rc1~260^2~4 (VS: Switch to
internal CMAKE_MAKE_PROGRAM lookup by generators, 2013-11-15) did for
Visual Studio generators.
2015-01-29 09:11:11 -05:00
Brad King 6a0a4079ef Merge topic 'shorten-test-paths'
70c50962 Tests: Shorten paths in ExternalProjectLocal
539c5c25 Tests: Shorten paths in RunCMake.CompileFeatures
494f6e8d Tests: Shorten paths in CompileDefinitions
2015-01-28 09:33:38 -05:00
Robert Goulet 4775c90145 VS: Add source file property to set extra hlsl shader flags
Create a VS_SHADER_FLAGS source file property so that we can set all
other Visual Studio .hlsl shader file compilation flags.
2015-01-28 09:29:50 -05:00
Brad King 9259d77881 Normalize OBJECT_DEPENDS paths to match custom commands (#15366)
Custom command path normalization added in commit v3.1.0-rc1~471^2
(add_custom_command: Normalize OUTPUT and DEPENDS paths, 2014-05-28)
broke use of OBJECT_DEPENDS to bring in custom commands because the
latter paths were not normalized too.  Normalize them and add a test
case.

Reported-by: Daniel v. Gerpen
2015-01-28 09:06:21 -05:00
Brad King a47b904db2 Merge topic 'file-strings-utf-16'
1f77a700 file: Teach STRINGS to support UTF-16 and UTF-32 encodings
2015-01-27 11:36:45 -05:00
Justin Borodinsky 1f77a7001b file: Teach STRINGS to support UTF-16 and UTF-32 encodings 2015-01-27 11:30:26 -05:00
Brad King c1f5d6e6f5 Merge topic 'test-features-enforce-expectation'
67e76e82 Features: Fix test to reject missing expectation definitions
3046be77 Features: Emit a test failure if 'override' is present but not expected
2015-01-27 11:22:12 -05:00
Brad King af9cf04647 Merge topic 'cmake-E-tar-files-from'
44fd71de cmake: Teach "-E tar" command a "--files-from=" option
2015-01-27 11:22:08 -05:00
Brad King 33daec1ae9 Merge topic 'test-rerun-cmake'
7f2dc8dc configure_file: Test that CMake re-runs on input change or output missing
daf95a38 try_compile: Test that CMake re-runs on input change
2015-01-27 11:22:06 -05:00
Brad King 34ce0dd22f Merge topic 'tests-RunCMake-normalize-newlines'
bf05938b Tests/RunCMake: Normalize newlines before checking actual output
2015-01-27 11:22:04 -05:00
Brad King 7f2dc8dc54 configure_file: Test that CMake re-runs on input change or output missing
With the Makefile generators we expect that touching or modifying the
input file of a configure_file, or removing its output, will cause CMake
to re-run on the next build.  Extend the RunCMake.configure_file test
with a case covering this.  Also check that CMake does not re-run if
nothing has changed.
2015-01-27 11:18:37 -05:00
Brad King bf05938b8f Tests/RunCMake: Normalize newlines before checking actual output
We read the expected output with file(STRINGS) which converts CRLF
newlines to LF.  Do the same with the actual output before comparing.
2015-01-27 11:18:36 -05:00