Commit Graph

487 Commits

Author SHA1 Message Date
Brad King ed2f59e614 Merge topic 'suppress-unused-cli-with-value-in-cache'
6a6cda5 Don't run the WarnUnusedCliUnused test on Windows.
2013-06-14 09:00:39 -04:00
Stephen Kelly 6a6cda5b4a Don't run the WarnUnusedCliUnused test on Windows.
Even with the NMake Makefiles generator, it is not able to properly
clean up after the test.

 http://open.cdash.org/testDetails.php?test=193424220&build=2934501

 Internal cmake changing into directory: C:/Dashboards/My Tests/CMake-nmake10-x64-continuous/Tests/WarnUnusedCliUnused
 Error: cmake execution failed
 CMake Error: Error: generator : NMake Makefiles
 Does not match the generator used previously: Visual Studio 10
 Either remove the CMakeCache.txt file or choose a different binary directory.
2013-06-12 17:21:10 +02:00
Brad King 21b1026541 Merge topic 'suppress-unused-cli-with-value-in-cache'
273ecab CLI: Suppress the unused warning if the key value pair is cached.
2013-06-05 09:39:18 -04:00
Stephen Kelly 273ecab96d CLI: Suppress the unused warning if the key value pair is cached.
It is common to specify a CMAKE_TOOLCHAIN_FILE and get a warning
for using it despite it not being used.

The WarnUnusedCliUnused test relies on the warning being emitted
each time cmake is run on an existing build. That behavior is changed
by this patch to warn only on the first invokation of CMake, and not
on subsequent invokations (because the variable is in the cache with
the same value). For that test, a clean target is added which clears
the cache and cause the warning to be emitted each time.

As the Ninja generator does not support the feature needed to test
this, it is not tested with that generator.
2013-06-04 12:38:56 +02:00
Brad King c9be17c860 Merge topic 'escape-regex-specials-in-path'
e4e0921 Merge branch 'master' into escape-regex-specials-in-path
c9b75dc Fix test failures caused by regexp-sensitive characters in the build paths
2013-06-03 13:51:31 -04:00
Rolf Eike Beer e4e09212c5 Merge branch 'master' into escape-regex-specials-in-path
Resolve conflicts in Tests/CTestTestMemcheck/CMakeLists.txt by combining
changes from both sides.
2013-06-03 13:43:52 -04:00
Modestas Vainius c9b75dcd73 Fix test failures caused by regexp-sensitive characters in the build paths
Checkout [1] as an example of the test failures. In that particular cases, the
failures is caused by the plus sign in the path being pass unescaped
(buildd-cmake_2.8.9-1~bpo60+1-armel-3Lvkef) to the regexp.

In addition to failures in the log, the following new tests also fail in 2.8.11:

  243 - CTestTestMemcheckUnknown (Failed)
  244 - CTestTestMemcheckUnknownQuoted (Failed)
  248 - CTestTestMemcheckDummyValgrindFailPre (Failed)
  249 - CTestTestMemcheckDummyValgrindFailPost (Failed)
  250 - CTestTestMemcheckDummyPurify (Failed)
  251 - CTestTestMemcheckDummyBC (Failed)
  253 - CMake.List (Failed)

[1] https://buildd.debian.org/status/fetch.php?pkg=cmake&arch=armel&ver=2.8.9-1~bpo60%2B1&stamp=1369243896
2013-06-03 16:51:21 +02:00
Brad King e57b6a2521 Merge topic 'target-COMPILE_OPTIONS'
24466f2 Add target_compile_options command.
80ca9c4 Add COMPILE_OPTIONS target property.
7cb2308 cmTarget: Rename LinkInterfaceIncludeDirectoriesEntries
47f80d9 cmTarget: Rename struct to be more re-usable.
1319a14 Add <LANG>_COMPILER_ID generator expressions.
3549676 Add cmLocalGenerator::GetCompileOptions.
f3ad863 VS6: Rename some variables to correspond to config values.
2013-06-03 09:57:44 -04:00
Brad King 6d4e79e2c3 Merge topic 'qt4-qt5-CMAKE_AUTOMOC'
fa55751 QtAutomoc: Get the Qt version through the target link interface
f776316 Use the qt5::moc imported target instead of a variable.
2013-06-03 09:57:01 -04:00
Brad King 3caf565d07 Merge topic 'rpath-on-mac'
dc1d025 OS X: Add test for rpaths on Mac.
8576b3f OS X: Add support for @rpath in export files.
00d71bd Xcode: Add rpath support in Xcode generator.
94e7fef OS X: Add RPATH support for Mac.
2013-06-03 09:56:44 -04:00
Clinton Stimpson dc1d025197 OS X: Add test for rpaths on Mac.
This also tests rpaths through export/import.
2013-06-03 09:42:06 -04:00
Stephen Kelly 24466f22c0 Add target_compile_options command.
This command populates the COMPILE_OPTIONS target property.
2013-06-02 11:56:37 +02:00
Stephen Kelly 80ca9c4b41 Add COMPILE_OPTIONS target property.
This method reads generator expressions from the COMPILE_OPTIONS
target property, as well as INTERFACE_COMPILE_OPTIONS from linked
dependents.
2013-06-02 11:56:37 +02:00
Stephen Kelly fa55751f83 QtAutomoc: Get the Qt version through the target link interface
In Qt 5.1, Qt5::Core has a INTERFACE_QT_MAJOR_VERSION property
of '5', and since CMake 2.8.11, Qt4::QtCore has an
INTERFACE_QT_MAJOR_VERSION of '4'. This was introduced in
commit 4aa10cd6 (FindQt4: Set the INTERFACE_QT_MAJOR_VERSION for
Qt4::QtCore, 2013-03-16), to produce an error if Qt 4 and Qt 5
are erroneously used by the same target. This can also be used
however to determine the Qt major version, and therefore the
particular moc executable to use during automoc steps. This means
that targets in a single buildsystem can use a selection of Qt 4
and Qt 5, and still take advantage of the CMAKE_AUTOMOC feature
without conflicting.
2013-05-28 01:19:37 +02:00
Brad King f292ffb62c Merge topic 'vs-windows-forms'
79ec786 VS: Add Windows Forms Support
2013-05-21 15:12:48 -04:00
Brad King 80f30aa6bf Merge topic 'Automoc-Qt4-Qt5'
6489015 Remove an endif() followed by an if() for the same condition.
e7813b1 Add a test for Qt5Automoc
27fb96b Make the QtAutomoc test compile with either Qt 4 or Qt 5
2013-05-21 15:12:35 -04:00
Brad King e1178478b7 Merge topic 'msbuild-targets-in-subdirs'
ac9a5f4 ctest_build: Pass projectDir to GenerateBuildCommand
a6c0299 CTest: Simplify ctest_* command source/build dir lookup
1ca9318 VS: Add test for building MSBuild project in subdir
3cd4000 VS: Use .sln parser to build targets in subdirs with msbuild (#13623)
df035e4 VS: Create parser for Visual Studio .sln files
de8be9e Add projectDir parameter to GenerateBuildCommand
2013-05-16 14:36:27 -04:00
John Farrier 79ec7868d0 VS: Add Windows Forms Support
Add support to maintain designer functionality for Visual Studio C++
Windows Forms projects.  Also add a test project showing how to use
the CMakeLists.txt file and, when successfully configured, will allow
use of the designer for the included form.
2013-05-16 13:06:44 -04:00
Petr Kmoch ac9a5f4d94 ctest_build: Pass projectDir to GenerateBuildCommand
This allows the ctest_build command's TARGET option to name a target
in a subdirectory and still build properly with msbuild.
Add test case covering use of ctest_build() with such a TARGET.
2013-04-12 11:35:36 -04:00
Petr Kmoch 1ca93182ad VS: Add test for building MSBuild project in subdir
Add test covering cmGlobalGenerator::GenerateBuildCommand for VS
solutions with MSBuild and building a target defined in a subdirectory
and not part of ALL.
2013-04-12 11:35:36 -04:00
Paul Kunysch 875eb8e158 CTest: Add test for running many tests in parallel
In particular, this checks that CTest's use of select() has a sufficient
file descriptor set size limit (FD_SETSIZE) to handle many child
processes at the same time.  Running 20 tests requires more than 64
descriptors, the Cygwin default that we override.
2013-03-22 09:02:12 -04:00
Stephen Kelly 6489015c75 Remove an endif() followed by an if() for the same condition. 2013-03-16 18:57:38 +01:00
Stephen Kelly e7813b15a6 Add a test for Qt5Automoc
The same source is used as for the Qt4Automoc test.
2013-03-16 18:57:01 +01:00
Brad King dd8a06bd65 Configure Tests/CMakeTests only with BUILD_TESTING ON
Since commit e03f83f3 (ProcessorCount test: fix path to cmsysTestsCxx
executable, 2013-01-24) the directory references a target that is not
built when BUILD_TESTING is OFF.  It makes no sense to add tests without
BUILD_TESTING anyway.

While at it, use add_subdirectory instead of subdirs to add CMakeTests.
2013-03-13 14:09:43 -04:00
Brad King 26bfece1af Merge topic 'fix-automoc-no-qt'
a223a3b Automoc: Don't create automoc targets if Qt is not used (#13999)
65b5c1e Merge branch 'property-link-depends-no-crash' into fix-automoc-no-qt
2013-03-13 13:34:24 -04:00
Stephen Kelly a223a3b65f Automoc: Don't create automoc targets if Qt is not used (#13999)
Commit 79568f95 (automoc: Add source file to target early to set the
linker language, 2013-02-20) changed automoc initialization to a two
step process. In the first step, the generated source file was added
to the target, which allows the link language to be determined.

However, this bypassed the check for the availability of Qt itself.
At build-time the automoc file could not be generated because the moc
tool was not available to create it.

The solution is to only add the automoc file to the target if Qt is
found.
2013-03-12 17:42:02 -04:00
Michael Tänzer 8eb2fe955a GetPrerequisites: Enable test for BundleUtilities on MinGW
Signed-off-by: Michael Tänzer <neo@nhng.de>
2013-03-01 16:26:07 +01:00
Brad King 55f0148d7b ExternalData: Test content link with a space in its name
Extend the Module.ExternalData test to cover a DATA{} reference whose
name contains a space.  Skip the case when the native build tool does
not support spaces.
2013-02-22 08:25:06 -05:00
Brad King d45eb35350 Tests: Generalize decision for 'make' tool supporting spaces
Some make tools do not support spaces inside the source tree paths.
Decide early whether to add tests that depend on support for spaces so
we can use the result in a decision for any test.
2013-02-22 08:25:05 -05:00
Brad King ef8b2fd101 Tests: Replace exec_program with execute_process
Drop use of the old exec_program command from CMake's own CMakeLists.txt
files.
2013-02-22 08:25:05 -05:00
Brad King 56ca8d4e63 Tests: Add generator toolset support
Propagate CMAKE_GENERATOR_TOOLSET through the test hierarchy so that all
tests can build with the selected generator toolset, if any.
2013-02-07 11:09:56 -05:00
Brad King f36c665df8 Tests: Consolidate ctest --build-and-test generator options
All ctest --build-and-test invocations require the options

  --build-generator ${CMAKE_GENERATOR}
  --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}

to be passed and have consistent values, except for a few special cases.
Collect the generator options in a variable instead of repeating the
options everywhere explicitly.
2013-02-07 11:09:24 -05:00
Brad King 020525845a Merge topic 'add-ExternalData-module'
5484c60 Merge branch 'vs6-rule-files' into add-ExternalData-module
1fd8d01 ExternalData: Attach download rules to content links in IDEs
a6d3ffc Fix Module.ExternalData test on VS 6
aed590a Fix Module.ExternalData test on Cygwin
06e8ded Merge branch 'fix-atomic-rename-on-Windows' into add-ExternalData-module
e2e0d2e ExternalData: Collapse ../ components in DATA{} paths
ee2abfd ExternalData: Add support for SHA 1 and 2 hash algorithms
aa8b228 ExternalData: Generalize hash algo/ext handling
9e518a8 ExternalData: Allow DATA{} syntax to reference directories
175ed02 ExternalData: Allow ()-groups in series match regex
4befecc ExternalData: Add tests covering interfaces and errors
bcd2580 ExternalData: Improve series matching using an explicit syntax
c0cebcb ExternalData: Remove unused private interface
5275993 ExternalData: Cleanup stray TODO and typo in comments
7bb8344 ExternalData: Do not match directory names when resolving DATA{}
00d801f ExternalData: Remove compatibility with CMake < 2.8.5
...
2013-02-05 14:46:40 -05:00
Brad King a6d3ffcb1f Fix Module.ExternalData test on VS 6
Run the test with the ctest --build-noclean option.  The test
CMakeLists.txt file already uses file(REMOVE_RECURSE) to clean out
downloaded data anyway.  Some file removed by "msdev ... /clean" causes
CMake to re-run in the middle of the build step and file(REMOVE_RECURSE)
wipes out already-generated files.
2013-02-04 15:19:56 -05:00
Brad King 19f3208a06 Tests: Avoid CTestLimitDashJ crash on Borland 5.8 builds
The test added by commit e378ba5f (Add CTestLimitDashJ test, 2012-12-26)
crashes with CTest compiled by Borland 5.8.  There seems to be interaction
among the large number of internal ctest runs.  It is probably related to
the undiscovered underlying issue mentioned in commit 32478069 (CTest:
Prevent creation of unbounded number of tests in ctest, 2012-12-18) when
fixing the symptom covered by the CTestLimitDashJ test.

Add --force-new-ctest-process to avoid the crash.  Further investigation
will still be needed to identify the true problem.
2013-01-31 10:58:16 -05:00
Brad King 4befecc77c ExternalData: Add tests covering interfaces and errors
Add a Module.ExternalData test to verify data retrieval and test
argument DATA{} references.

Add a RunCMake.ExternalData test to verify error handling and automatic
transformation of a raw data to a content link and staged object.
2013-01-30 10:04:54 -05:00
Stephen Kelly e98799105b Make INTERFACE determined properties readable in generator expressions.
The properties are evaluated as link-dependent interface properties when
evaluating the generator expressions.
2013-01-20 17:06:47 +01:00
Stephen Kelly fc61a7a746 Add the target_compile_definitions command.
This is a convenience API to populate the corresponding properties.
2013-01-10 09:46:58 -05:00
Stephen Kelly 8a37ebec78 Add the target_include_directories command.
This is a convenience API to populate the corresponding properties.
2013-01-10 09:46:57 -05:00
Brad King 0a097af097 Merge topic 'qt4-target-depends'
57a67bf Qt4: Add module dependencies to the IMPORTED targets
2013-01-07 14:19:36 -05:00
Stephen Kelly 57a67bf27e Qt4: Add module dependencies to the IMPORTED targets
This means for example, that consumers can use:

 target_link_libraries(foo ${QT_QTGUI_LIBRARIES})

instead of also needing to specify all 'public' dependencies:

 target_link_libraries(foo ${QT_QTGUI_LIBRARIES} ${QT_QTCORE_LIBRARIES} )

when using the IMPORTED targets.  Also populate the
IMPORTED_LINK_DEPENDENT_LIBRARIES property so CMake can help the linker
find shared library dependencies.
2013-01-07 14:00:47 -05:00
David Cole e378ba5f39 Add CTestLimitDashJ test (#12904)
Add a test that verifies that when ctest -j 4 is called, at most, 4 tests
are executed at any one time.

The test works by running the same script as each of 100 tests. And then setting
up test properties for DEPENDS, RUN_SERIAL, PROCESSORS and COST in order to get
the tests to run in a semi-deterministic ordering, even in parallel. The script
writes a file, sleeps for a bit, and then deletes the file. In the meantime, it
counts files that currently exist, and emits output that triggers a test failure
if the count of files is ever greater than 4.

Prior to the commit that fixed bug #12904, this would result in a failed test
because the output of some of the tests would indicate that more than 4 tests
were running simultaneously.

Now that this issue is resolved, this test will help guarantee that it stays
resolved moving forward.
2013-01-03 13:37:50 -05:00
David Cole 2bb2745fa8 Merge topic 'fix-11575-add-wix-support-to-cpack'
a74bd47 CPack: Fix dashboard errors and warnings (#11575)
ad0f735 CPack: Fix dashboard warnings (#11575)
0729ad4 CPack: Fix dashboard errors (#11575)
85baac1 CPack: Add a WiX Generator (#11575)
2012-12-05 10:31:05 -05:00
Nils Gladitz 85baac1503 CPack: Add a WiX Generator (#11575)
This new CPack generator produces an *.msi installer file.
Requires having the WiX Toolset installed in order to work
properly.

Download the WiX Toolset installer "WiX36.exe" here:

  http://wix.codeplex.com/releases/view/93929
2012-12-03 11:00:31 -05:00
David Cole 587b7b6f5e Tests: Use the right path to CPack value for running CPack tests
These tests were not running properly on Visual Studio or
Xcode dashboards before this commit because of the "Debug"
or "Release" sub-directory. The scripts already have
CMAKE_CPACK_COMMAND since the correct CMake executable is
used to run the scripts, so just use that, rather than
passing down an incorrect path to the CPack executable.
2012-11-29 15:49:36 -05:00
David Cole 078e35defb NMake: Add a test to demonstrate EmptyDepends issue (#13392) 2012-11-21 11:29:10 -05:00
Brad King 508504ab6f Merge topic 'per-config-EXCLUDE_FROM_DEFAULT_BUILD'
739f166 Serialize tests for EXCLUDE_FROM_DEFAULT_BUILD
e31d83b Define property EXCLUDE_FROM_DEFAULT_BUILD
d1f8828 Add property EXCLUDE_FROM_DEFAULT_BUILD_<CONFIG>
b777272 Add tests for EXCLUDE_FROM_DEFAULT_BUILD
2012-11-20 11:47:35 -05:00
Brad King bd52ff3ac9 Merge topic 'only-git-fetch-when-necessary'
a41d3a4 ExternalProjectUpdateTest: Only support Git 1.6.5 and greater.
de760c1 ExternalProject: Verify when a fetch occurs during update test.
0a34433 ExternalProject: Make sure the ExternalProjectUpdate setup is available.
9b66c8f ExternalProject: Always do a git fetch for a remote ref.
2619f4d ExternalProject: Add tests for UPDATE_COMMAND.
378aa12 ExternalProject: Do smoke tests for Git Tutorial builds.
d075829 ExternalProject: Only run 'git fetch' when required.
2012-11-13 14:31:58 -05:00
Matt McCormick 0a34433dfb ExternalProject: Make sure the ExternalProjectUpdate setup is available.
This prepares the numberous tests that occur in the ExternalProjectUpdate
test.  The tests were passing previously because a fresh build was not performed.
2012-11-13 13:34:44 -05:00
Matt McCormick 2619f4d87a ExternalProject: Add tests for UPDATE_COMMAND.
Tests are added for UPDATE_COMMAND to ensure it is working properly.  Testing
infrastructure is added along with tests for Git, but tests for other version
control systems could easily be added in the future.
2012-11-13 13:34:22 -05:00
Brad King 739f16653d Serialize tests for EXCLUDE_FROM_DEFAULT_BUILD
The tests share a single build directory and so should not run in
parallel.  While at it, add the build dir to the test_clean target.
2012-11-13 10:52:05 -05:00
Petr Kmoch b777272b0b Add tests for EXCLUDE_FROM_DEFAULT_BUILD
Add tests for EXCLUDE_FROM_DEFAULT_BUILD and its per-configuration
variants.
2012-11-13 09:08:42 -05:00
Stephen Kelly 9be64f34c2 GenEx: Use case insensitive comparison for $<CONFIG:...>
This fixes a regression introduced by commit f1eacf0e
(cmGeneratorExpression: Re-write for multi-stage evaluation).
2012-11-05 08:49:25 -05:00
David Cole a2871e93ee Merge topic 'test-ctest-memcheck'
995a35f CTest: add a check with a quoted memory checker
de8bffc CTest: add a test for CTEST_CUSTOM_MEMCHECK_IGNORE
d26c9b6 CTest: improve memory checker type detection
fcae1da CTest: add tests that simulate memcheck runs
6187876 CTest: fix pre and post test commands with spaces
95bc8aa CTest: fix usage of memory checker with spaces in path
2012-10-17 16:43:02 -04:00
Rolf Eike Beer fcae1dacea CTest: add tests that simulate memcheck runs 2012-10-04 23:07:31 +02:00
Brad King 2ccca05fad Run PDBDirectoryAndName test on MSVC and Intel
Move it out of the condition that also accepts MinGW/MSYS.
Teach the test to allow the Intel for Windows compiler but
do not verify the results because the compiler does not
seem to write PDB output in all cases.
2012-09-29 07:17:42 -04:00
Yuchen Deng 3f60dbf148 Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties (#10830)
This enables changing the name and output folder of the debug symbol
files produced by MS compilers.

Inspired-by: Thomas Bernard <thomas.bernard@ipetronik.com>
2012-09-25 15:23:35 -04:00
David Cole 05784dadc5 Merge topic 'compile-definitions-unique'
f0a1065 Rename files from main.cpp to more meaningful names.
ca7fb14 Fix the test setting COMPILE_DEFINITIONS target property
733deb6 Fix CompileDefinitions test on Visual Studio.
3dae652 Don't duplicate -D defines sent to the compiler.
2012-08-24 14:24:24 -04:00
Stephen Kelly 3dae652b4e Don't duplicate -D defines sent to the compiler.
There is no need to do so. Be consistent with include directories and
ensure uniqueness.

This requires changing the API of the cmLocalGenerator::AppendDefines
method, and changing the generators to match.

The test unfortunately can't test for uniqueness, but it at least verifies
that nothing gets lost.
2012-08-20 22:30:11 +02:00
David Cole 407ccb4957 Merge topic 'RemoveNonworkingKDE4Test'
11f23fe remove non-working KDE4 test
2012-08-20 15:41:06 -04:00
David Cole 14c8096ba8 Merge topic 'more-endif-closing-style-cleanups'
84b49be Remove CMake multiline block-end command arguments
2012-08-20 15:39:26 -04:00
Alex Neundorf 11f23fee52 remove non-working KDE4 test
Alex
2012-08-16 23:28:52 +02:00
Marcin Wojdyr 84b49be8f0 Remove CMake multiline block-end command arguments
removing arguments omitted in 9db3116226
2012-08-15 16:50:29 -04:00
Brad King ebf05abda1 Add boolean generator expressions
Add generator expressions that combine and use boolean test results:

 $<0:...>         = empty string (ignores "...")
 $<1:...>         = content of "..."
 $<AND:?[,?]...>  = '1' if all '?' are '1', else '0'
 $<OR:?[,?]...>   = '0' if all '?' are '0', else '1'
 $<NOT:?>         = '0' if '?' is '1', else '1'

These will be useful to evaluate (future) boolean query expressions and
condition content on the results.  Include tests and documentation.
2012-08-15 11:44:49 -04:00
Brad King 3c0488d7d3 Fix WarnUnusedUnusedViaUnset test pass/fail regex
After conversion of Modules .cmake files to lower case the
FAIL_REGULAR_EXPRESSION for this test matched warnings in modules other
than the test line itself.  Make the pass and fail regular expressions
specific to the file containing the lines they are testing.
2012-08-14 08:06:19 -04:00
Kitware Robot 9db3116226 Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot 77543bde41 Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:

cmake --help-command-list |
grep -v "cmake version" |
while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
David Cole a51e1529e7 Merge topic 'ninja-fix-macosx'
1fc8df9 Add missing this->.
7a3ecf5 Fix memory leak in Makefile generator.
9f7dc83 Ninja: also bootstrap ninja files
5d365b2 Ninja: enable ninja support everywhere
d569f3e Ninja: void function can't return a value
52160bf Ninja: enable ninja on Mac so all Mac CDash-builds are tested, cleanup later
56aeac6 Ninja: fixes for bcc
7a6bc9e Ninja: remove 'this' from member initializer list
44ba4cf Ninja: remove warnings
7751966 Ninja: remove 'friend' in ninja code
c3988ee Re-factor OS X content generator start up.
f8e0a51 Re-factor framework directory computation.
f36c7b0 Re-factor Mac OS X content directory computation.
5d885db Re-factor bundle content copying rules generation.
3b2a01e Ninja: Use same echo message as makefiles.
7bb56c5 Re-factor CFBundle generation.
...
2012-07-24 17:03:46 -04:00
David Cole c1bbdbff57 Merge topic 'DoNotInvokeCPackAtCMakeTime-forCMakeTests'
b47cffa CPack: Use bin subdir when looking for dpkg and rpmbuild
a8c659c Find dpkg and rpmbuild in usual Fink and MacPort paths
848f220 Do not run cpack at CMake time it is not available.
2012-07-24 17:03:37 -04:00
Nicolas Despres 03bdaf5453 Enable BundleTest with CLang too. 2012-07-17 14:03:09 +02:00
Eric NOULARD 848f2201c5 Do not run cpack at CMake time it is not available.
cpack was used to get the list of available i.e. ACTIVE CPack generators
in the CMake tests suite. This was done in order to get dynamically
available CPack generators like DEB or RPM that may or may not be
available on some platform like MacOSX depending on the fact that
some command are installed or not. We may do that but not during
initial configuration.
The current patch fixes the problem and we may do better in the future
like configuring CPack tests later.
2012-06-28 13:49:49 +02:00
David Cole 361696ae20 CTest: Add test to verify -D variable definitions work 2012-06-25 08:25:51 -04:00
David Cole c95d1baa19 Merge topic 'position-independent-targets'
bd34963 Refactor generation of shared library flags
55d7aa4 Add platform variable for flags specific to shared libraries
31d7a0f Add platform variables for position independent code flags
2012-06-12 16:01:04 -04:00
Stephen Kelly bd34963002 Refactor generation of shared library flags
CMAKE_SHARED_LIBRARY_<lang>_FLAGS has flags on various platforms for a
variety of purposes that are correlated with shared libraries but not
exclusive to them.  Refactor generation of these flags to use new
purpose-specific platform variables

  CMAKE_<lang>_COMPILE_OPTIONS_DLL
  CMAKE_<lang>_COMPILE_OPTIONS_PIC
  CMAKE_<lang>_COMPILE_OPTIONS_PIE

Activate the DLL flags specifically for shared libraries.  Add a new
POSITION_INDEPENDENT_CODE target property to activate PIC/PIE flags, and
default to true for shared libraries to preserve default behavior.
Initialize the new property from CMAKE_POSITION_INDEPENDENT_CODE to
allow easy global configuration in projects.

Although the default behavior is unchanged by this refactoring, the new
approach ignores CMAKE_SHARED_LIBRARY_<lang>_FLAGS completely.  We must
leave it set in case projects reference the value.  Furthermore, if a
project modifies CMAKE_SHARED_LIBRARY_<lang>_FLAGS it expects the new
value to be used.  Add policy CMP0018 to handle compatibility with
projects that modify this platform variable.

Add a PositionIndependentCode test on platforms where we can get
meaningful results.
2012-06-12 15:38:48 -04:00
Stephen Kelly 3545645c1b Exclude the CompileCommandOutput test on WIN32. 2012-06-05 00:12:16 +02:00
Stephen Kelly db839bec7d Make the CMAKE_EXPORT_COMPILE_COMMANDS option work with Ninja. 2012-06-04 23:42:37 +02:00
David Cole 3e23da0688 Merge topic 'CPack-activateRPM-DEB-onMacOS'
801ea70 Calm down Borland compiler warning about "always true"
2a34b57 CPack allow RPM and DEB generator to be used on OSX.
2012-05-24 13:38:13 -04:00
Eric NOULARD 2a34b57938 CPack allow RPM and DEB generator to be used on OSX.
More generally add the check for possible generator "activation" at
runtime depending on a generator specific check.
The dynamic behavior is currently implemented only for MacOS
and should be fully backward compatible for other system.

Inspired-By Tom Hughes <tomtheengineer@gmail.com>
2012-05-20 22:04:32 +02:00
Bill Hoffman b0c07a13d1 Disable bullseye coverage for mumps coverage test. 2012-05-04 11:41:15 -04:00
Bill Hoffman 220afcaf84 Use <TARGET_FILE> expression to run ctest so it works with Xcode and VS IDE.
Also add -crlf to the .gitconfig to handle the coverage data.
2012-05-02 11:51:38 -04:00
Bill Hoffman 62f6bce7a5 Use a script to run the test because WORKING_DIRECTORY is not in 2.8.2.
add_test with WORKING_DIRECTORY is too new to use in cmake.  This change
uses a configured script to run the command in the right directory.
2012-05-02 10:45:06 -04:00
Bill Hoffman 7955e995ec Add support for Cache coverage.
This adds support for Cache coverage parsing. A test is added
that does a basic run of the coverage on a small bit of data.
2012-05-01 17:00:43 -04:00
Bill Hoffman 319eeb0247 Add test for mumps coverage. Also refactor code to prepare for cache coverage.
Add a simple test to make sure the GTM mumps coverage is working.
Also refactor the code so that cache coverage can be added.
2012-05-01 13:35:07 -04:00
Brad King 2693dbe085 Merge branch 'object-library' into ninja-object-library 2012-03-16 10:20:20 -04:00
Brad King c68cc06612 Merge branch 'object-library' into ninja-object-library 2012-03-16 10:18:01 -04:00
Brad King 69d3d1835c Test OBJECT library success cases
Add "ObjectLibrary" test to build and use OBJECT libraries.  Build
multiple object libraries in separate directories with different flags.
Use a custom command to generate a source file in one OBJECT library.

Reference the OBJECT libraries for inclusion in a STATIC library, a
SHARED library, and an EXECUTABLE target.  Use the static and shared
libraries each in executables that end up using the object library
symbols.  Verify that object library symbols are exported from the
shared library.
2012-03-16 10:12:30 -04:00
Brad King 55b2aa884c Use generalized RunCMake test infrastrucure for build_command test
The CMakeCommands.build_command test performs output/error checking
so move it over to RunCMake to re-use the generalized infrastrucure.
This is the only test left using Tests/CMakeCommands/CMakeLists.txt
so remove it.
2012-03-12 09:33:21 -04:00
Brad King 42a81e7119 Add stronger infrastructure for CMake-only tests
The CMakeOnly directory added by commit 9a20abf0 (Add infrastructure for
CMake-only tests, 2012-01-11) was sufficient only for tests that always
run CMake to successfully configure a project.  Later commit eeaaffcb
(find_package: Test error and warning messages in failure cases,
2012-02-28) added a sample test that covers failure cases.

Generalize the above to create new "RunCMake" test infrastructure that
can run CMake multiple times for a single project with different
variations and check for expected result/stdout/stderr.  Allow for both
successful and failing CMake project configuration cases.  This will be
useful to test error messages and failure behavior.
2012-03-12 09:33:21 -04:00
David Cole f55119e63b Merge topic 'fix-12189-support-SBCS-in-VS'
b28e7fa VS6: Avoid SBCS test on VS6 (#12189)
df19b9c VS6: Avoid _MBCS define when _SBCS is defined (#12189)
ba89e92 Visual Studio: Allow setting Single Byte Character Set (#12189)
2012-03-08 15:14:03 -05:00
David Cole b28e7fa174 VS6: Avoid SBCS test on VS6 (#12189)
The previous commit, df19b9ca, assumed that the corresponding
_UNICODE functionality in the VS6 generator actually worked.
That turns out not to be the case. Unicode definition does not
actually suppress _MBCS definition, so neither does this new
code...

Don't test it here, since the patch submitter for _SBCS does
not need VS6 support.

If somebody needs _UNICODE and _SBCS support to suppress the
definition of _MBCS in the VS6 generator, it is work yet to do.
Patches welcome.
2012-03-06 18:45:51 -05:00
David Cole b22f2f18c1 Merge topic 'qt4-deploy'
4689eed reflect that the QtAutomoc depends on QtGui
ab9661c Remove QtGui dependency in Qt4Deploy test and verify QtSql existance.
52e8279 Fix for Qt4Deploy on some test machines.
672e3bb Add test for DeployQt4.cmake
4853e1e Fix plugin installation issues.
35cbf23 Ensure libs are passed to BundleUtilities.
0ac1535 Fix bad plugin paths.
a2123e8 Fix mismatched arguments.
fc6f340 Don't use QT_LIBRARIES_PLUGINS by default.
2012-03-06 15:25:02 -05:00
David Cole a1860aaf1a Merge topic 'test-CMakeCommands'
5e1a5c4 Add infrastructure for CMakeCommands tests
2012-03-02 11:48:22 -05:00
Rolf Eike Beer 4689eedcc0 reflect that the QtAutomoc depends on QtGui 2012-02-29 21:35:20 +01:00
Clinton Stimpson ab9661c1dd Remove QtGui dependency in Qt4Deploy test and verify QtSql existance. 2012-02-29 07:55:31 -07:00
Brad King 5e1a5c44da Add infrastructure for CMakeCommands tests
Generalize the build_command test framework as a macro to add the
test.  Process the CMakeCommands subdirectory explicitly.
2012-02-28 11:34:10 -05:00
Modestas Vainius f5cf8f9897 Tests: Escape metachars before embedding paths into the regex (#12999)
${CMake_SOURCE_DIR} and ${CMake_BINARY_DIR} cannot be embedded into regex
directly. If they contain special regex metacharacters like +, the regex
will break. So just escape such metacharacters with a backslash before
embedding the path into the regex.

The issue affected the following tests: CTestTestConfigFileInBuildDir1 and
CTestTestConfigFileInBuildDir2.
2012-02-27 09:01:10 -05:00
Clinton Stimpson 52e8279648 Fix for Qt4Deploy on some test machines.
Use the same check for whether Qt4 works for Qt4Automoc test before trying to do the Qt4Deploy test.
Also pass down to Qt4Deploy which Qt to use.
2012-02-24 08:09:17 -07:00
Clinton Stimpson 672e3bb70f Add test for DeployQt4.cmake 2012-02-23 15:48:47 -07:00
David Cole bada88e8e4 Merge branch 'target-include-directories' into ninja-generator 2012-02-22 16:21:48 -05:00
Eric NOULARD 67494502f5 Do not build RPM if path of the build tree contains space 2012-02-19 20:50:27 +01:00