Commit Graph

4052 Commits

Author SHA1 Message Date
Brad King 53930877b3 Merge topic 'simplify-CTest.UpdateGIT-test'
972849fb Tests: Simplify CTest.UpdateGIT repo path construction
2015-12-11 09:43:58 -05:00
Roger Leigh 99afe23513 Tests: Add tests for FindGTest 2015-12-10 23:09:16 +00:00
Ruslan Baratov 565d080a9a Xcode: Add support for combined install on iOS
This patch solves the problem of installing both: Device and Simulator
libraries on iOS. Before only one of them was installed.

If the IOS_INSTALL_COMBINED property is set on a target, a
special install hook will be activated which builds the corresponding
target and combines both at the install location.

The original patch was contributed by Ruslan Baratov, and polished by
Gregor Jasny.
2015-12-10 22:36:12 +01:00
Brad King 972849fbb7 Tests: Simplify CTest.UpdateGIT repo path construction
Avoid constructing full paths to .git repositories in the test.  Use
relative paths and let Git convert them to absolute paths internally.
This is simpler and also avoids trouble with various absolute path root
component conventions on Windows (`c:/`, `/c/`, `/cygdrive/c/`).
2015-12-10 13:54:54 -05:00
Bartosz Kosiorek 7984ac5e58 cmake: Teach -E make_directory to support multiple input directories 2015-12-10 09:07:38 -05:00
Brad King dc873f6eef Merge topic 'cmake-E-copy-multiple-inputs'
bc35087d cmake: Teach -E copy_directory to support multiple input directories
98be140f cmake: Refine -E copy[_if_different] documentation
93cc80ae cmake: Refine -E copy_if_different implementation indentation
0903812b cmake: Refine -E chdir documentation
2015-12-09 08:36:56 -05:00
Domen Vrankar 27e6f74f29 CPack: Added tests for package name and group controll fields 2015-12-07 20:15:49 +01:00
Bartosz Kosiorek bc35087da3 cmake: Teach -E copy_directory to support multiple input directories 2015-12-07 10:51:27 -05:00
Brad King 128d569af0 Merge topic 'FindTIFF-imported-targets'
ebaca629 FindTIFF: Add imported targets and update documentation
2015-12-07 09:22:56 -05:00
Roger Leigh ebaca6290d FindTIFF: Add imported targets and update documentation
- Add TIFF::TIFF imported target
- Document imported target
- Add testcase to test the standard variables and the imported
  target

Also:

- Add TIFF_INCLUDE_DIRS to match common practice
- Update documentation generally, including documenting
  TIFF_INCLUDE_DIRS
2015-12-07 09:20:08 -05:00
Bartosz Kosiorek 384ae5514e cmake: Teach -E copy[_if_different] to support multiple files (#15703)
If multiple input files are provided then the destination must be a
directory.  If only one input file is provided then destination may be
either a file or directory.
2015-12-04 10:26:34 -05:00
Bartosz Kosiorek 0be5020bf8 cmake: Improve '-E' help message formatting 2015-12-04 10:12:02 -05:00
Brad King 5875801293 Merge topic 'improve-embarcadero'
7a327727 Embarcadero: Fix erroneous interpretation of __CODEGEARC_VERSION__.
25211d75 Compiler ID: Compiler versions must be a valid, numeric version string.
060442c2 Embarcadero:  Check code using CMAKE_CXX_COMPILER_ID and CMAKE_C_COMPILER_ID.
f3b3219c Embarcadero/Watcom: Properly skip VSResource test for other generators.
ddbda722 Embarcadero: Fix bug where duplicate Ninja job pools would be created.
2015-12-04 09:54:18 -05:00
Brad King 65dc4170f8 Merge topic 'FindBoost-imported-targets'
d60cef77 Help: Add notes for topic 'FindBoost-imported-targets.rst'
9fd98750 Tests: Add FindBoost testcase for imported targets
3f9b081f FindBoost: Add imported targets
01c80acd FindBoost: Automatically add missing component dependencies
5183c6e5 FindBoost: Embed component dependency table
8a60e696 Utilities: Add BoostScanDeps script
2015-12-04 09:54:13 -05:00
James Johnston 25211d756f Compiler ID: Compiler versions must be a valid, numeric version string.
This test helps catch errors in compiler identification.
2015-12-03 21:37:07 +00:00
James Johnston 060442c2e8 Embarcadero: Check code using CMAKE_CXX_COMPILER_ID and CMAKE_C_COMPILER_ID.
The CMAKE_CXX_COMPILER_ID and CMAKE_C_COMPILER_ID variables are set to
"Borland" for older versions of the compiler.  Newer CodeGear/Embarcadero
compilers will have those variables set to "Embarcadero".  Search for lines of
code referencing both the variable name and Borland to be sure that they also
refer to Embarcadero.
2015-12-03 21:37:06 +00:00
James Johnston f3b3219c96 Embarcadero/Watcom: Properly skip VSResource test for other generators.
This test should be skipped based on the chosen compiler, not the chosen
generator.
2015-12-03 21:37:06 +00:00
Bartosz Kosiorek e76ee2c006 iOS: Fix framework resource directory layout (#15848)
A typical iOS application bundle (also Framework Bundle) contains the
application executable and any resources used by the application (for
instance, the application icon, other images, and localized content) in
the top-level bundle directory.  The same rule applies to Framework
Bundles.
2015-12-03 08:52:09 -05:00
Roger Leigh 9fd9875076 Tests: Add FindBoost testcase for imported targets
Enable by setting CMake_TEST_FindBoost to TRUE.
2015-12-02 09:40:17 -05:00
Michael Scott aac633d5e5 Explicitly enable deprecated warnings by default.
Explicitly enable deprecated warnings by default, via the
cmake::GetSuppressDeprecatedWarnings method, which signals
suppression is turned off unless the CMake variables are set
as required.

Add tests and update the documentation for the new
functionality.
2015-12-01 10:22:51 -05:00
Michael Scott e8974b62d7 Modify dev warning options to affect deprecated warnings.
Change the '-Wdev' and '-Wno-dev' options to also enable and
suppress the deprecated warnings output, via the
'CMAKE_WARN_DEPRECATED' CMake variable, by default. This
action does not happen if the user specifies a deprecated
warning message option.

Add tests and update the documentation for the new
functionality.
2015-12-01 10:22:45 -05:00
Michael Scott da688bcb3b Add -W options to control deprecated warning messages.
Add 'deprecated' warning options type, to allow setting
CMAKE_WARN_DEPRECATED via the -W '-Wdeprecated' and
'-Wno-deprecated' options.

Add tests for new options and updated documentation.
2015-12-01 10:21:57 -05:00
Michael Scott 07388f83b6 Refactor the -W options parser to be generic.
Refactor the -Wdev and -Wno-dev options parser to use a generic -W
parser that follows the GCC pattern, excluding support for
-Werror=TYPE and -Wno-error=TYPE formats for now.
2015-12-01 09:40:43 -05:00
Michael Scott 246b0bfbfd Explicitly enable author (dev) warnings by default.
Explicitly enable author warnings by default, via the
cmake::GetSuppressDevWarnings method, which signals suppression
is turned off unless the CMake variables are set as required.

Add test cases for author and deprecated messages displayed by
default.
2015-12-01 09:35:53 -05:00
Michael Scott deec3a3f06 Make message suppression more consistent.
Make the message suppression more consistent, by adding a check
for the message related CMake variables in cmake::IssueMessage,
which allows callers of IssueMessage other than the message
command to behave as expected. Also added a check for
CMAKE_SUPPRESS_DEVELOPER_WARNINGS in the message command to
mirror the deprecated message type behaviour.

Added a 'force' flag to the cmake::IssueMessage method, to
make the message suppression consistent, when setting the
message related CMake variables directly in a CMake file.

Expand message command tests to cover the AUTHOR_WARNING message
type as well.
2015-11-30 15:00:08 -05:00
Michael Scott aa427a4239 Tests: Revise message in RunCMake.CommandLine -Wdev case
Use more prose-like capitalization.
2015-11-30 15:00:08 -05:00
Brad King 99533c8e34 Merge topic 'fix-find_package-version-file-error-stack'
62126b67 Merge branch 'test-cmake_policy-unmatched' into fix-find_package-version-file-error-stack
2e28c619 cmState: Skip variable scope snapshots to avoid call stack duplicates
b219ff94 Tests: Add case for package version file unmatched policy scope
2015-11-25 09:21:49 -05:00
Brad King 2b24fbf48c Merge topic 'test-cmake_policy-unmatched'
378185fb Tests: Add case for unmatched cmake_policy({PUSH,POP})
2015-11-25 09:21:45 -05:00
Brad King 62126b67e0 Merge branch 'test-cmake_policy-unmatched' into fix-find_package-version-file-error-stack 2015-11-24 14:09:54 -05:00
Brad King b219ff94ac Tests: Add case for package version file unmatched policy scope 2015-11-24 14:01:21 -05:00
Brad King 378185fb7f Tests: Add case for unmatched cmake_policy({PUSH,POP}) 2015-11-24 09:30:16 -05:00
Brad King f66f6e2490 Merge topic 'FindXercesC-imported-targets'
5dcc833b FindXercesC: Add imported targets and unit test
2015-11-24 09:26:42 -05:00
Brad King db7457452c Merge topic 'test-add_subdirectory-in-function'
010c5959 Tests: Add case for add_subdirectory inside a function
2015-11-24 09:26:37 -05:00
Roger Leigh 5dcc833b28 FindXercesC: Add imported targets and unit test 2015-11-23 14:28:05 -05:00
Brad King ed08d1d489 Merge topic 'expand_cobertura_search'
32268810 CTest: Expand directories for Cobertura search
2015-11-23 13:47:25 -05:00
Joseph Snyder 32268810d9 CTest: Expand directories for Cobertura search
Change the Cobertura handler to look for an environment variable
called "COBERTURADIR" which contains the directory where the
coverage.xml file is found.  If that variable doesn't exist,
continue to use the default of the binary directory.

Update the test to use an appropriate value in the environment
variables.
2015-11-23 12:41:36 -05:00
Brad King 010c595986 Tests: Add case for add_subdirectory inside a function 2015-11-23 10:52:51 -05:00
Brad King b6f471773d Merge topic 'ninja-symbolic-custom-command'
3477b26f Ninja: Always re-run custom commands that have symbolic dependencies
7d64a059 Ninja: Add 'restat' parameter to custom command generation method
866c75de Ninja: Refactor generation of 'restat' on custom commands
2015-11-20 08:53:17 -05:00
Bill Hoffman 75004280af Fix auto export symbols for Dlls containing /bigobj for 64bit builds.
This fixes a bug where 64 bit builds with /bigobj incorrectly determined
that the object files were not 64 bit. This manifested itself with
printf type functions showing up as undefined because the leading
underscore was being removed and should not be removed.
2015-11-19 17:21:03 -05:00
Brad King 3477b26ff6 Ninja: Always re-run custom commands that have symbolic dependencies
If a custom command has a SYMBOLIC output (that is never actually
created) then do not mark the custom command build statement as
'restat'.  Otherwise other custom commands that depend on the symbolic
output may not always re-run because after running the first custom
command Ninja 'restat' will detect that the output timestamp did not
change and skip its dependents.

This was observed with the ExternalProject BUILD_ALWAYS option where
Ninja would not re-run the 'install' step each time 'build' re-runs.
2015-11-19 15:47:41 -05:00
Brad King 65b9d1f228 Merge topic 'fix-ms-manifest-no-linker'
ca263d1d MSVC: Fix linking with /MANIFEST:NO option
2015-11-19 09:10:23 -05:00
Brad King ca263d1d71 MSVC: Fix linking with /MANIFEST:NO option
Refactoring in commit v3.4.0-rc1~74^2~1 (MSVC: Rewrite manifest file
handling with Makefile and Ninja, 2015-09-15) broke handling of this
option.  Fix it and add a test case.
2015-11-18 09:31:56 -05:00
Gregor Jasny f6f03ed4cc Add test for OSX/iOS Framework directory structure (#15833) 2015-11-13 13:58:53 +01:00
Stephen Kelly 4ce9742ae3 Alias: Fix access at generate-time (#15832)
Commit c389f8bb (cmLocalGenerator: Port Find method away from
GetGeneratorTarget, 2015-10-25) ported the implementation of
FindGeneratorTargetToUse away from the FindTargetToUse method,
but neglected to handle alias targets.

The latter method has a parameter to determine whether to
include alias targets in the search, but as that is only
needed at configure time, this generate-time equivalent does
not need the condition.
2015-11-08 13:54:49 +01:00
Brad King 39e830a98e Merge topic 'cpack-deb-config-file-source-field'
e5b70ed0 CPackDEB: added config file optional Source field
f2d98e2d CPackDEB: minor documentation and debug logging fixes
2015-11-06 14:58:11 -05:00
Raffi Enficiaud e5b70ed013 CPackDEB: added config file optional Source field 2015-11-04 21:46:22 +01:00
Raffi Enficiaud 341cd93489 CPackDeb: ctest tests for compression scheme leak
Test that changing compression of debian package
content does not affect DEBIAN/ files which must
be gzipped
2015-11-03 18:18:35 +01:00
Brad King b7b3b675fd Merge topic 'fix-find_program-regression'
31e6571c find_program: Fix regression in finding an already-known path
2015-11-02 09:09:46 -05:00
Brad King 1178b53662 Merge branch 'fix-find_program-regression' into release 2015-10-30 08:38:13 -04:00
Brad King 31e6571cca find_program: Fix regression in finding an already-known path
Changes in commit v3.4.0-rc1~124^2~1 (cmFindProgramCommand: Re-implement
search using more flexible approach, 2015-09-01) did not preserve the
behavior of looking for the given name with no search path at all.
Fix this and add a test case covering finding an absolute path with
no search directories.
2015-10-30 07:40:46 -04:00
Benjamin Chrétien 1bfb527f56 FindPkgConfig: return actual error when a package is not found (#15810)
In some cases, CMake returned the following error:

-- Checking for module 'foo'
--   Package 'foo' not found

When the actual error returned by pkg-config was:

  Package 'bar', required by 'foo', not found

Now, the actual error is forwarded to the user.

-- Checking for module 'foo'
--   Package 'bar', required by 'foo', not found

For the standard case (i.e. the package was indeed not found), the
CMake error was:

-- Checking for module 'foo'
--   Package 'foo' not found

But it now prints:

-- Checking for module 'foo'
--   No package 'foo' found

The associated test was also updated. ${last} refers to the last
CLI argument.
2015-10-28 10:18:15 -04:00
Stephen Kelly 6a56c8247f Tests: Disable parallel test execution while running ctest_test 2015-10-27 21:44:04 +01:00
Stephen Kelly 5f14040c34 Tests: Don't overwrite RunCMake_TEST_FAILED variable 2015-10-27 21:42:24 +01:00
Brad King d71920c457 Merge topic 'xcode-watch-and-tvos'
a91eebeb Xcode: Recognise Watch and TV OS as embedded platforms
2015-10-26 13:13:02 -04:00
Brad King 4c4da56b2e Merge topic 'xcode-optimization-flags'
601e6e1a Xcode: Use regular expression to extract all optimisation flags (#15794)
2015-10-26 13:12:59 -04:00
Brad King f054552124 Merge topic 'fix-test-RUN_SERIAL-failure-regression'
e61973e1 CTest: Fix regression in handling of a RUN_SERIAL test that fails
2015-10-26 13:12:50 -04:00
Gregor Jasny a91eebebdb Xcode: Recognise Watch and TV OS as embedded platforms 2015-10-23 22:19:43 +02:00
Gregor Jasny 601e6e1ad1 Xcode: Use regular expression to extract all optimisation flags (#15794) 2015-10-23 19:29:09 +02:00
Brad King e61973e1ab CTest: Fix regression in handling of a RUN_SERIAL test that fails
Refactoring in commit v3.4.0-rc1~390^2~1 (cmCTestMultiProcessHandler:
Refactor RUN_SERIAL implementation, 2015-06-01) forgot to update a code
path for cleaning up after a failed RUN_SERIAL test.  This causes an
infinite loop after a RUN_SERIAL test fails.  Fix it and add a test.
2015-10-23 09:55:25 -04:00
Brad King 740f85a204 Merge topic 'cmLocalGenerator-generator-target-storage'
a4bbdc5e cmLocalGenerator: Remove cmGeneratorTargetsType from setter API.
04b6bb16 cmLocalGenerator: Simplify semantic of adding generator targets.
400e3d19 cmLocalGenerator: Don't store imported generator targets
726e461b CMP0063: Split unit test by target type.
2015-10-21 09:16:56 -04:00
Brad King e2d4bfef3f Merge topic 'fix-CMP0054-elseif-warning'
d6a03b47 cmIfCommand: Issue CMP0054 warning with appropriate context. (#15802)
2015-10-21 09:16:49 -04:00
Stephen Kelly 726e461b38 CMP0063: Split unit test by target type.
Don't rely on the order of warnings for targets being deterministic.
2015-10-20 23:58:48 +02:00
Stephen Kelly d6a03b475e cmIfCommand: Issue CMP0054 warning with appropriate context. (#15802)
Commit v3.4.0-rc1~494^2~4 (cmMakefile: Add API for elseif to create
backtrace., 2015-05-29) removed the use of cmMakefileCall to push/pop
execution context in favor of a new way to create backtraces.

However, a call to cmMakefile::GetExecutionContext is still invoked to
issue a contextual CMP0054 warning through cmConditionEvaluator.  As
the elseif is not part of the call stack, this resulted in trying to
access an empty vector.

Avoid the attempt at getting execution context when evaluating elseif by
constructing a context and backtrace on behalf of the cmConditionEvaluator
in all cases.
2015-10-20 23:40:12 +02:00
Joseph Snyder 3cd2e0e2d5 Tests: Fix DelphiCoverage test file selection
The HTML file for the Delphi Code coverage was being found by the
Dashboard coverage run of CMake itself.  Switch it to be a configured
file to eliminate this extra reading.
2015-10-20 11:13:25 -04:00
Stephen Kelly 2bf7de167f Subdirs: Initialize from parent before configuring.
Add new API for the subdirs command to cmState.

This fixes a regression introduced in commit f716460e (cmMakefile: Move
invokation to initialize snapshot., 2015-10-06).
2015-10-14 00:34:11 +02:00
Brad King 4df5c3d131 Merge branch 'revert-compiler-features-solaris' into release 2015-10-12 10:29:36 -04:00
Brad King 9b05b14fef Merge topic 'revert-compiler-features-solaris'
340d0897 Revert topic 'compiler-features-solaris'
2015-10-12 10:25:59 -04:00
Brad King 340d0897fa Revert topic 'compiler-features-solaris'
Revert commit v3.4.0-rc1~10^2~2 (Features: Disable support for Oracle
SolarisStudio on non-Linux, 2015-09-29) and two follow-up commits.
The support of compile features and language standards on Orcale
SolarisStudio needs more investigation so for CMake 3.4 we should
just act as 3.3 did.
2015-10-08 13:18:39 -04:00
Brad King 45e9f48f9c Merge topic 'cmake-script-mode-directory-vars'
8bb908b1 Document and test CMAKE_[CURRENT_](BINARY|SOURCE)_DIR in script mode
2015-10-08 10:31:50 -04:00
Brad King b520b1ca4e Tests: Add a nightly Linux 64-bit binary 2015-10-06 13:58:45 -04:00
Brad King 26a0b52dfe Tests: Rename Linux nightly release binary test to Linux32
Distinguish the name from a future 64-bit nightly binary.
2015-10-06 13:56:19 -04:00
Tamas Kenez 8bb908b108 Document and test CMAKE_[CURRENT_](BINARY|SOURCE)_DIR in script mode 2015-10-06 09:34:28 -04:00
Brad King 992c43d2ed Tests: Rename OS X nightly release binary test
The "Mac64" build is now the primary and only OS X build, so just name
it "OSX".
2015-10-05 13:09:36 -04:00
Brad King 9cbab63ee1 Tests: Drop nightly OS X ppc/i386 binary
Users with OS X 10.5 or below can build from source or use an older
CMake version.
2015-10-05 13:09:04 -04:00
Brad King 6c25ceb6a8 Merge topic 'vs-win10-store'
2402bb8c Help: Document Windows 10 Universal Applications in cmake-toolchains(7)
1be2f12c VS: Add support for Windows 10 Universal (Store) Applications
2798dbda VS: Refactor indentation of LinkLibraryDependencies
8c426183 MSVC: Add system libs for WindowsStore on VS 2015
d1b87d72 VS: Select Windows 10 Store SDK and toolset for VS 2015
2015-10-05 10:04:11 -04:00
Gilles Khouzam 1be2f12cf2 VS: Add support for Windows 10 Universal (Store) Applications
Teach the VS 2015 generator to support WindowsStore 10.0 applications.
Add target properties to customize them:

* VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION: Specifies the minimum version
  of the OS that the project can target.

* VS_DESKTOP_EXTENSIONS_VERSION, VS_MOBILE_EXTENSIONS_VERSIONS,
  VS_IOT_EXTENSIONS_VERSION: Add a reference to the version of the SDK
  specified to the target allowing to target the extended functionality in
  a universal project.

* VS_IOT_STARTUP_TASK: Specifies that the target should be
  built as an IOT continuous background task.
2015-10-05 09:48:11 -04:00
Brad King 7555babbcf Merge topic 'compiler-features-solaris'
5fdf7594 Tests: Suppress WriteCompilerDetectionHeader failure on SunPro
c824b23d Features: Fix C++98 flags on Oracle SolarisStudio 12.4 on Linux
61bc0f73 Features: Disable support for Oracle SolarisStudio on non-Linux
2015-10-02 10:56:52 -04:00
Brad King 9b5554cda1 Merge topic 'test-FindPackageModeMakefileTest-flags'
85d7a610 Tests: Use consistent C++ flags FindPackageModeMakefileTest
2015-10-02 10:56:50 -04:00
Brad King 487fe8c97d Merge topic 'test-VSGNUFortran-oracle-link'
7bc202cc Tests: Simplify VSGNUFortran Oracle-specific link lines
2015-10-02 10:56:48 -04:00
Brad King 7bc202ccd4 Tests: Simplify VSGNUFortran Oracle-specific link lines
On an Oracle 12.4 build the c_using_fortran executable cannot find the
"fsu" library at runtime.  Since this is an implementation detail of the
"hello" library, link that library to it privately so that "-lfsu" does
not propagate to the executables consuming it.
2015-10-01 10:48:38 -04:00
Brad King 85d7a610a2 Tests: Use consistent C++ flags FindPackageModeMakefileTest
Rather than using the CXXFLAGS environment variable in the make-only
build, copy the CMAKE_CXX_FLAGS used to build the files on the CMake
side.  This will account for any changes made by CompileFlags.cmake
or cache-provided flags.
2015-10-01 10:26:55 -04:00
Domen Vrankar 1b13af46ac Tests: Fix RunCMake.CPack_* tests to use proper CMake generator
Use the run_cmake() function to generate the test build tree with
the proper CMake generator and also to verify that it succeeds.
Drop our PreTestError helper as it is no longer needed.
2015-10-01 09:48:04 -04:00
Brad King 981068b79f Tests: Avoid OS X 10.5 limitation warning in RunCMake.CPack* tests
The DEPENDENCIES test case uses install(TARGETS) and so generates a warning:

 CMake Warning in CMakeLists.txt:
   WARNING: Target "test_prog" has runtime paths which cannot be changed
   during install.  To change runtime paths, OS X version 10.6 or newer is
   required.  Therefore, runtime paths will not be changed when installing.
   CMAKE_BUILD_WITH_INSTALL_RPATH may be used to work around this limitation.

Set CMAKE_BUILD_WITH_INSTALL_RPATH to avoid the warning since we do not
need to run the binaries from the build tree anyway.
2015-10-01 09:47:41 -04:00
Brad King e8954d0b3b Tests: Add trailing newlines to generated sources in RunCMake.CPack_* tests
This avoids compiler warnings on stderr while building them.
2015-10-01 09:47:41 -04:00
Brad King 5fdf759478 Tests: Suppress WriteCompilerDetectionHeader failure on SunPro
We do support SunPro 5.13 compiler features, but only on Linux.
Suppress the portion of the test that fails on Solaris until
the larger problem can be addressed.
2015-09-30 09:53:52 -04:00
Brad King 130f116340 Merge topic 'fix-qtautogen-with-object-library-Ninja'
9bc6eb8e cmGlobalGenerator: Initialize generator targets on construction (#15729)
2015-09-29 10:08:13 -04:00
Brad King 6a072563d2 Merge topic 'cpack-package-empty-dirs'
9298f56d CPack: allow packaging of empty directories
ecd71c9c SystemTools: time operations on directories
19c6f4ee SystemTools: set time file permissions
749a140a CPackDeb: allow empty directories in component packages
2015-09-29 10:08:06 -04:00
Brad King 1d11f3ca68 Merge topic 'link-https-cmake.org'
da7276cf Replace http://www.cmake.org URLs with https://cmake.org
2015-09-29 10:08:02 -04:00
Stephen Kelly 9bc6eb8e1f cmGlobalGenerator: Initialize generator targets on construction (#15729)
The Ninja generator and Visual Studio generators are special-cased for the
QtAutogen feature.  In order to reduce the number of custom targets, the Visual
Studio generators prefer to create custom commands instead, and in order to
create appropriate Ninja files, generated rcc files are listed as byproducts.

This requires the use of the GetConfigCommonSourceFiles API of the
cmGeneratorTarget for those generators when initializing the autogen target.
The initializer method is called from Compute() after the cmGeneratorTarget
objects are created, however the initialization of the object directory occurs
later in the InitGeneratorTargets method.  That means that the resulting object
locations are computed incorrectly and cached before the object directory is
determined, so the generated buildsystem can not find the object files.

The initialization of the object directory was split from the creation of
cmGeneratorTarget instances in commit 0e0258c8 (cmGlobalGenerator: Split
creation of generator object from initialization., 2015-07-25).  The motivation
for the split was to do only what is essential to do early in cases where
cmGeneratorTargets need to be created at configure-time.  That is required for
the purpose of implementing policies CMP0024 and CMP0026, and for
try_compile(LINK_LIBRARIES).  However, the split was not really necessary.

Compute the object directory in the cmGeneratorTarget constructor instead.

The QtAutogen unit test already tests the use of TARGET_OBJECTS with AUTOMOC,
and that test already passes on Ninja.  The reason it already passes is that
the QtAutogen target also uses the AUTORCC feature, and specifies several qrc
files in its SOURCES.  Later in the Compute algorithm (after the
InitGeneratorTargets call), the rcc files are determined and target->AddSource
is called.  The AddSource call clears the previously mentioned cache of source
files, causing it to be regenerated when next queried, this time taking account
of the object directory.

Extend the test suite with a new target which does not make use of AUTORCC with
qrc files so that the test added alone would break without the fix in this
commit.
2015-09-29 09:56:34 -04:00
Domen Vrankar 9298f56dce CPack: allow packaging of empty directories 2015-09-29 01:18:18 +02:00
Raffi Enficiaud 749a140a0c CPackDeb: allow empty directories in component packages 2015-09-29 01:18:04 +02:00
Brad King 664fd4d1da Merge topic 'test-Wno-dev'
bc3e1e4b Tests: Add case for -Wdev and -Wno-dev with non-message() warnings (#15747)
2015-09-28 10:44:55 -04:00
Brad King 5ed2292d3a Merge topic 'ninja-cleanup-path-conversion'
6e2a4087 Ninja: Centralize path conversion in global generator (#15757)
993d0641 Ninja: Fix OBJECT_DIR placeholder substitution in link rules
2015-09-28 10:44:48 -04:00
Brad King ac5ead4a9c Merge topic 'test-fix-C-comments'
4eb77a1c Tests: Use C-Style comments in C sources and headers
2015-09-28 10:44:46 -04:00
Brad King cfcd5e8518 Merge topic 'genex-SHELL_PATH'
ca6ba3fe Genex: Add a SHELL_PATH expression
7de868c4 Tests: Simplify GeneratorExpression check implementation
2015-09-28 10:44:43 -04:00
Brad King b0b255aaa7 Merge topic 'test-RunCMake-BuildDepends-Borland'
67040500 Tests: Fix RunCMake.BuildDepends filesystem delay for Borland Makefiles
2015-09-28 10:44:41 -04:00
Stefan Kislinskiy ca6ba3fee5 Genex: Add a SHELL_PATH expression
Some commands on Windows do not understand forward slash paths and
require backslashes.  In order to help projects generate shell
invocations of such commands, provide a generator expression to convert
paths to the shell-preferred path format for the current generator.
This will allow custom commands to generate paths the same way CMake
does for compiler command invocations.
2015-09-28 10:37:33 -04:00
Brad King 64b7baac4a Merge topic 'revert-cpack-package-empty-dirs'
4fa17553 Revert topic 'cpack-package-empty-dirs'
2015-09-26 10:40:40 -04:00
Michael Scott bc3e1e4b55 Tests: Add case for -Wdev and -Wno-dev with non-message() warnings (#15747) 2015-09-25 16:21:17 -04:00
Brad King 414cc18a9a Merge topic 'revert-cmake-W-options'
2e606306 Merge branch 'improve-variable-help-formatting' into revert-cmake-W-options
81739e92 Revert topic 'cmake-W-options' (#15747)
2015-09-25 16:16:17 -04:00