Commit Graph

3578 Commits

Author SHA1 Message Date
Brad King 0320993456 Merge topic 'cpack_rpm_old_version_tests'
140a53a8 CPack/RPM architecture test fixup
4552bc88 CPack/RPM relocation paths test fixup
2015-03-17 10:14:54 -04:00
Brad King 8915cddcde Merge topic 'FindMatlab-rewrite'
49c8dcf7 FindMatlab: Rewrite module and provide a usage API
2015-03-17 10:14:52 -04:00
Zach Mullen 874fdd914a CTest: Output test-specific env vars in verbose mode (#15446)
Any environment vars that were configured for a test via the
ENVIRONMENT property will now be output when the test is run
with verbose logging enabled.
2015-03-17 10:11:33 -04:00
Raffi Enficiaud 49c8dcf7bb FindMatlab: Rewrite module and provide a usage API
Implement a brand new FindMatlab module:

- Add support for versions and components.
- Find Matlab and its version in a more precise and multiplatform way.
- Add API to create a new mex extension with documentation.
- Add API to add matlab unit tests (with or without the unit test framework).
- Find as much as possible based on a single Matlab_ROOT_DIR cache entry
  and allow the user to change it to re-find everything.
2015-03-17 09:47:04 -04:00
Domen Vrankar 140a53a810 CPack/RPM architecture test fixup
Fixed architecture test that was
missing architecture in regular
expressions - bug was detected
on older rpm versions where the
check failed.
Extended architecture test that takes
into account older versions of rpm.
This patch is related to 15442.
2015-03-15 21:08:19 +01:00
Domen Vrankar 4552bc886d CPack/RPM relocation paths test fixup
Patch fixes bug in test reported with
id 15442 - older versions of rpm print
out package info a bit differently so
we should ignore white spaces
2015-03-15 20:37:16 +01:00
Brad King 7b185d5017 Merge topic 'main_dependency_diagnostic'
242c3966 add_custom_command: Diagnose MAIN_DEPENDENCY limitation.
2015-03-12 15:26:26 -04:00
Brad King addf4db06c Merge topic 'fix_jacoco_coverage_process'
c771f9d9 CTest: Fix Jacoco Coverage
2015-03-12 15:26:24 -04:00
Brad King ad6fbb88bb Merge topic 'target-language-genex'
232a6883 Help: Add release notes for target-language-genex.
9e168941 File(GENERATE): Process genex evaluation files for each language.
b734fa44 Genex: Allow COMPILE_LANGUAGE when processing include directories.
0b945ea9 Genex: Allow COMPILE_LANGUAGE when processing compile definitions.
5c559f11 Genex: Enable use of COMPILE_LANGUAGE for compile options.
e387ce7d Genex: Add a COMPILE_LANGUAGE generator expression.
4a0128f4 VS6: Compute CMAKE_*_FLAGS and COMPILE_DEFINITIONS* only when needed
2015-03-10 09:12:34 -04:00
Brad King cce9671b4f Merge topic 'ExternalProject-byproducts-tokens'
86032ae0 ExternalProject: Replace placeholder tokens in BYPRODUCTS
2015-03-10 09:12:32 -04:00
Brad King fa4617b7ea Merge topic 'configure_file-NEWLINE_STYLE-no-warn'
024e25e4 Tests: Add more signature tests to RunCMake.configure_file test
3ef776fc configure_file: Do not warn about newline style arguments
2015-03-10 09:12:24 -04:00
Stephen Kelly 9e1689413f File(GENERATE): Process genex evaluation files for each language. 2015-03-09 20:49:17 +01:00
Stephen Kelly b734fa4471 Genex: Allow COMPILE_LANGUAGE when processing include directories.
Issue an error if this is encountered by an IDE generator.
2015-03-09 20:49:17 +01:00
Stephen Kelly 0b945ea9a6 Genex: Allow COMPILE_LANGUAGE when processing compile definitions.
Issue an error if this is encountered by an IDE generator.
2015-03-09 20:49:16 +01:00
Stephen Kelly 5c559f1113 Genex: Enable use of COMPILE_LANGUAGE for compile options.
Follow-ups will allow the use of the generator expression
for compile definitions and include directories for non-IDE
generators.
2015-03-09 20:48:57 +01:00
Gaëtan Lehmann 86032ae0eb ExternalProject: Replace placeholder tokens in BYPRODUCTS
This allows the developer to specify the byproducts relative to the
binary directory without the need to set the binary directory location
explicitly.
2015-03-09 10:04:44 -04:00
Brad King 024e25e485 Tests: Add more signature tests to RunCMake.configure_file test
Move the test cases from Tests/CMakeTests/ConfigureFileTest.cmake.in
over to use the RunCMake.configure_file infrastructure.  This does much
more robust verification of CMake output for each test case, and would
have caught the regression fixed in our parent commit.
2015-03-09 09:17:59 -04:00
Nils Gladitz 242c396656 add_custom_command: Diagnose MAIN_DEPENDENCY limitation.
The new policy CMP0057 diagnoses reuse of the same MAIN_DEPENDENCY across
multiple custom commands.
2015-03-09 12:45:38 +01:00
Stephen Kelly e387ce7d68 Genex: Add a COMPILE_LANGUAGE generator expression. 2015-03-07 13:19:45 +01:00
Joseph Snyder c771f9d945 CTest: Fix Jacoco Coverage
Rename the example jacoco.xml file to be jacoco.xml.in to stop CMake
from apptempting to calculate Jacoco Coverage when running over itself.

Enclose a push of -1 to the coverage vector to only happen if there is a
fin to calculate for. This prevents a crash if the target file doesn't
exist.
2015-03-06 11:18:19 -05:00
Brad King 17b4423c45 Merge topic 'fix-crash-on-bad-LANG_STANDARD'
00d66557 Diagnose invalid <LANG>_STANDARD value instead of crashing (#15426)
2015-03-02 08:36:24 -05:00
Brad King 00d66557d4 Diagnose invalid <LANG>_STANDARD value instead of crashing (#15426) 2015-02-28 12:14:42 -05:00
Brad King 29b5ca108e Merge topic 'remove_error_read_script'
6bf13097 CTest: Drop "Error in read script" message at end of testing
2015-02-27 10:34:38 -05:00
Brad King 0bf6c7fa7b Merge topic 'cmake-build-ninja-verbose'
d1082448 Tests: Extend RunCMake.CommandLine to cover 'cmake --build' for 'ninja -v'
ce935ebe cmake: Teach --build to honor CMAKE_VERBOSE_MAKEFILE for Ninja
2015-02-27 10:34:36 -05:00
Zack Galbreath 6bf130979e CTest: Drop "Error in read script" message at end of testing
A more-specific error message is always displayed earlier in the
output if any real error occurred.  This final summary message
is distracting to readers searching through the output for the
word "error".  Simply drop it.
2015-02-27 10:31:02 -05:00
Domen Vrankar 3db740cb31 CPackRPM: Consolidate CPackComponentsForAll test case coverage
Use test infrastructure added by commit 1cbb1562 (Fix handling of
relocation prefix parent directories, 2015-02-26) to cover the same use
cases from tests added by commit 5857ca5e (CPackRPM: Drop explicit
handling of '@' symbols that breaks them, 2015-01-07) and drop the
latter.
2015-02-27 08:45:57 -05:00
Domen Vrankar 3cf86d9e7b Merge branch 'cpack_rpm_mulit_prefix_fixup' into cpack_rpm_mulit_prefix_fixup-for-master
Resolve conflict in Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
by combining the changes from both sides.
2015-02-27 08:42:29 -05:00
Domen Vrankar 1cbb156253 CPackRPM: Fix handling of relocation prefix parent directories
In commit 3ec02547 (CPackRPM: Allow multiple path relocation prefixes
for one package, 2015-01-21) a regression was introduced that causes
parent directories of relocation paths to be incorrectly included in
the rpm.  Fix this and make the test case more strict to cover it.
2015-02-27 08:37:24 -05:00
Brad King d1082448a8 Tests: Extend RunCMake.CommandLine to cover 'cmake --build' for 'ninja -v' 2015-02-26 10:21:09 -05:00
Brad King e4419c9f88 Merge topic 'ExternalData-url-algo-map'
f7f4ca55 ExternalData: Add support for custom algorithm-to-URL mapping
2015-02-26 08:51:52 -05:00
Brad King f7f4ca55bd ExternalData: Add support for custom algorithm-to-URL mapping
Allow URL templates to contain a %(algo:<key>) placeholder that is
replaced by mapping the canonical hash algorithm name through a map
defined by the <key>.

Extend the Module.ExternalData test to cover the behavior.
Extend the RunCMake.ExternalData test to cover error cases.
2015-02-25 08:28:05 -05:00
Brad King b10310e6e6 Tests: Drop CTestTestFailedSubmit-* tests
Everything they cover is now covered by RunCMake.ctest_submit test cases
(except ctest_coverage LABELS which were not actually checked anyway).
Drop these redundant tests.
2015-02-24 10:03:27 -05:00
Brad King 41a16f07c3 Merge topic 'osx-framework-search-platform-SDKs'
0ee2a004 OS X: Add platform-specific Frameworks search path
2015-02-24 09:12:45 -05:00
Brad King 13f9f848de Merge topic 'FeatureSummary-no-duplicates'
38ef2b73 FeatureSummary: Print each feature info only once
2015-02-24 09:12:43 -05:00
Brad King 133ab7a447 Merge topic 'rpm_at_in_path'
5857ca5e CPackRPM: Drop explicit handling of '@' symbols that breaks them (#14782)
2015-02-24 09:12:39 -05:00
Brad King 206ce77781 Merge topic 'ctest-output-options'
ff1ddd2a ctest_upload: Add QUIET option
0b87b2a3 ctest_memcheck: Add QUIET option
fc58bdb9 ctest_coverage: Add QUIET option
876a680d ctest_test: Add QUIET option
49ba4545 ctest_build: Add QUIET option
f999dc0b ctest_configure: Add QUIET option
645ad117 ctest_update: Add QUIET option
19d1a559 ctest_start: Add QUIET option
1643b905 ctest_submit: Add QUIET option
12db1139 CTest: Add cmCTestOptionalLog macro
2015-02-24 09:12:33 -05:00
Brad King 8366b1bd4f Merge topic 'test-RunCMake-refactor-ctest'
e2b9e7f7 Tests: Drop unnecessary stderr matching from RunCMake.ctest_memcheck
7ce9f6e2 Tests: Teach RunCMake to tolerate 'Error kstat returned' lines in test output
69de0f7e Tests: Teach RunCMake to tolerate Guard Malloc lines in test output
57f2aa7c Tests: Teach RunCMake to tolerate BullseyeCoverage lines in test output
b04c8ec3 Tests: Match curl error in RunCMake.ctest_submit FailDrop-* cases
1d82105e Tests: Rename RunCMake.{CTestMemcheck => ctest_memcheck}
d7662141 Tests: Rename RunCMake.{CTestSubmit => ctest_submit}
9b50388b Tests: Split RunCTest helper out of RunCMake.CTest(Submit|Memcheck)
76e7c22b Tests: Rename RunCMake.CTestMemcheck internals to match CTestSubmit
2015-02-24 09:12:31 -05:00
Domen Vrankar 5857ca5e0d CPackRPM: Drop explicit handling of '@' symbols that breaks them (#14782)
The change in commit v2.8.12~218^2 (CPackRPM protect '@' character in
filename processed in the spec file, 2013-07-05) was not necessary after
commit v2.8.12~439^2 (Add support for componentized USER spec file,
2013-04-01).  The latter replaced ${VAR} references in the spec file
template string with \@VAR\@ references, thus protecting '@' symbols
automatically.  This caused CPackRPM to break paths with @ symbols.
Revert the change to fix the behavior, and add a test case.
2015-02-24 08:44:36 -05:00
Gregor Jasny 0ee2a004e7 OS X: Add platform-specific Frameworks search path
Otherwise find_library is unable to lookup the XCTest framework which
is not located in the SDK serach path:

In the 10.10 SDK the SDK frameworks are located here:

  $DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks

whereas the Platform SDKs are located here:

  $DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/Library/Frameworks

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-02-23 13:10:52 -05:00
Gregor Jasny 38ef2b7363 FeatureSummary: Print each feature info only once
If a feature is added multiple times via ADD_FEATURE_INFO it should
appear only once in FEATURE_SUMMARY.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-02-23 11:39:17 -05:00
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
Zack Galbreath ff1ddd2a73 ctest_upload: Add QUIET option 2015-02-23 10:02:00 -05:00
Zack Galbreath 0b87b2a339 ctest_memcheck: Add QUIET option 2015-02-23 10:02:00 -05:00
Zack Galbreath fc58bdb9ad ctest_coverage: Add QUIET option 2015-02-23 10:02:00 -05:00
Zack Galbreath 876a680d48 ctest_test: Add QUIET option 2015-02-23 10:01:59 -05:00
Zack Galbreath 49ba4545c2 ctest_build: Add QUIET option 2015-02-23 10:01:59 -05:00
Zack Galbreath f999dc0bbf ctest_configure: Add QUIET option 2015-02-23 10:01:59 -05:00
Zack Galbreath 645ad117e1 ctest_update: Add QUIET option 2015-02-23 10:01:59 -05:00
Zack Galbreath 19d1a5599a ctest_start: Add QUIET option
This suppresses all non-error messages that would have otherwise
been printed by this function.
2015-02-23 10:01:59 -05:00
Brad King e2b9e7f7bc Tests: Drop unnecessary stderr matching from RunCMake.ctest_memcheck
The Dummy*-stderr.txt files were needed only to match platform-specific
memcheck tooling output and verify that stderr is otherwise empty.  Now
that the RunCMake infrastructure knows how to strip such lines before
matching, we can simply drop these files and use the default empty
string match.
2015-02-23 10:01:58 -05:00
Zack Galbreath 1643b905e0 ctest_submit: Add QUIET option
Specifying this option prevents CTest from printing any non-error
messages to the console for this call to ctest_submit().
2015-02-23 10:01:58 -05:00
Brad King 7ce9f6e29e Tests: Teach RunCMake to tolerate 'Error kstat returned' lines in test output
When RunCMake tests run on Solaris, the output may contain unexpected
lines of the form "Error kstat returned...".  These lines are printed by
SystemInformationImplementation::RunProcess when called from
SystemInformationImplementation::ParseValueFromKStat (see issue #12066).
Until someone investigates why kstat returns values outside the range it
documents, simply remove such lines from the actual output before
matching it against the expected output.
2015-02-23 10:01:58 -05:00
Brad King 69de0f7ea4 Tests: Teach RunCMake to tolerate Guard Malloc lines in test output
When RunCMake tests run under Xcode Guard Malloc, Guard Malloc may add
lines of the form "<tool>(<pid>) malloc:..." to the output.  Remove such
lines from the actual output before matching it against the expected
output.
2015-02-23 10:01:57 -05:00
Brad King 57f2aa7c37 Tests: Teach RunCMake to tolerate BullseyeCoverage lines in test output
When RunCMake tests run under dynamic analysis, Bullseye may add lines
of the form "BullseyeCoverage..." to the output.  Remove such lines from the
actual output before matching it against the expected output.
2015-02-23 10:01:57 -05:00
Brad King b04c8ec3f8 Tests: Match curl error in RunCMake.ctest_submit FailDrop-* cases
Port the regexes over from the CTestTestFailedSubmit tests for ftp,
http, and https.  No such match is needed for the other protocols.
2015-02-23 10:01:57 -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 1d82105e29 Tests: Rename RunCMake.{CTestMemcheck => ctest_memcheck}
Follow the convention of naming tests after the command they test.
2015-02-19 11:35:51 -05:00
Brad King d7662141a7 Tests: Rename RunCMake.{CTestSubmit => ctest_submit}
Follow the convention of naming tests after the command they test.
2015-02-19 11:33:32 -05:00
Brad King 9b50388b09 Tests: Split RunCTest helper out of RunCMake.CTest(Submit|Memcheck)
Provide the "run_ctest" macro for use in other tests that also
want to cover running "ctest" scripts.
2015-02-19 11:26:44 -05:00
Brad King 76e7c22b3c Tests: Rename RunCMake.CTestMemcheck internals to match CTestSubmit 2015-02-19 11:26:43 -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