Commit Graph

414 Commits

Author SHA1 Message Date
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
Aaron C. Meadows ba89e92ba6 Visual Studio: Allow setting Single Byte Character Set (#12189)
For Visual Studio using the Preprocessor Define _SBCS. This behavior
is similar to the way that _UNICODE and _MBCS work already.

Added tests to confirm this behavior.
2012-02-17 11:30:23 -05:00
Bill Hoffman 067c1f44a8 VSGNUFortran: Disable test in special cases
The ifort compiler found on some test machines does not support Mac
universal binaries or the Linux Standard Base.
2012-02-09 08:36:27 -05:00
Bill Hoffman 538c3452ad Add CMakeAddFortranSubdirectory to use MinGW gfortran in VS
This patch adds a new module that allows for easy integration of MinGW
gfortran and the Visual Studio compiler. It is done in a function called
cmake_add_fortran_subdirectory. The patch also includes a test for this
feature.
2012-02-09 08:33:57 -05:00
Brad King daa4101619 Remove unused test code
We have not run tests with the "como" compiler or enabled the
experimental ConvLibrary test for years.
2012-02-03 15:55:27 -05:00
Peter Collingbourne 6dd410c2b9 Ninja: Add the Ninja generator 2012-02-02 23:40:21 +00:00
Rolf Eike Beer 8de3b3d13e CheckCXXCompilerFlag test: make it a CMakeOnly test 2012-01-30 19:42:51 +01:00
Brad King 9a20abf04a Add infrastructure for CMake-only tests
Some tests only need to run CMake to configure and generate a build
tree, but not actually perform the build.  Add a new "Tests/CMakeOnly"
directory dedicated for this purpose.  Add a helper script to drive each
test by creating a fresh build tree and running CMake on it.  Add macro
"add_CMakeOnly_test" to help create tests using the script.
2012-01-13 14:21:22 -05:00
David Cole be358c68c3 Merge topic 'test-Complex-cleanup'
53d31c2 complex: Remove unused option to test CMakeLib
c1789e6 complex: Remove test dependence on cmSystemTools
569cee1 complex: Move cmSystemTools::UpperCase test to CMakeLibTests
49d6dd6 complex: Simplify test for single-character exe name
76ac88b complex: Move GeneratedFileStream test to CMakeLibTests
137e597 complex: Remove dynamic loader tests
6337920 complex: Sync Tests/ComplexOneConfig with Tests/Complex
6a75821 complex: Remove ancient unused ComplexRelativePaths test
2012-01-09 14:09:11 -05:00
Brad King 53d31c2426 complex: Remove unused option to test CMakeLib
Now that the Complex tests do not depend on cmSystemTools or other
classes from CMakeLib the COMPLEX_TEST_CMAKELIB option is useless.
2011-12-23 16:16:57 -05:00
Brad King 6a7582124c complex: Remove ancient unused ComplexRelativePaths test 2011-12-23 16:16:45 -05:00
David Cole c24bdb05d0 Merge topic 'avoid-mfc-test'
0e598b7 Tests: Only really run MFC test if we can build MFC apps (#11213)
2011-12-20 14:21:21 -05:00
Bill Hoffman 5badf5f734 Fix the case where cmake --build failed with two project cmds in one file.
This adds a test that uses two project commands in the same CMakeLists.txt
file.  It also adds a fix so that cmake --build will work in that case.
The fix sets the name of the last project command in the top level
CMakeLists.txt in the cache variable CMAKE_PROJECT_NAME.  This variable
is used by cmake --build to find the project name.
2011-12-20 14:16:25 -05:00
David Cole 0e598b7bcd Tests: Only really run MFC test if we can build MFC apps (#11213)
Avoid problems on "undetected" VS Express build environments.
2011-12-16 16:30:10 -05:00
David Cole 1ec3801a3a Merge topic 'target-link-libraries-interfaces'
b1f12f8 target_link_libraries: Simplify argument processing state tests
5fc95df target_link_libraries: Add missing space in documentation
9143822 target_link_libraries: Add LINK_(PUBLIC|PRIVATE) options
cf64218 target_link_libraries: Trim trailing whitespace
2011-11-23 08:16:10 -05:00
Stephen Kelly 914382224d target_link_libraries: Add LINK_(PUBLIC|PRIVATE) options
Makes it possible to specify the link dependencies and link
interfaces in one command without repetition.
2011-11-22 16:52:35 -05:00
David Cole 608d05b469 Merge topic 'add-mfc-test'
c71f7ab Tests: Avoid MFC test automatically for Watcom WMake builds (#11213)
a42e3f2 Tests: Fix MFC test for old vs6 dashboards (#11213)
b297da6 Tests: Fix MFC test w/ Make-based generators (#11213)
54595e6 Tests: Avoid MFC test automatically for VCExpress builds (#11213)
36b0c43 Tests: Add the MFC test (#11213)
2011-11-15 14:38:52 -05:00
David Cole c71f7ab7db Tests: Avoid MFC test automatically for Watcom WMake builds (#11213) 2011-11-03 13:21:06 -04:00
David Cole 54595e6d89 Tests: Avoid MFC test automatically for VCExpress builds (#11213) 2011-11-01 16:27:24 -04:00
David Cole 36b0c432cf Tests: Add the MFC test (#11213)
Build a simple, do-nothing VS 7.1 MFC wizard generated app
with CMake.

Build it two different ways via ExternalProject, one with
CMAKE_MFC_FLAG set to 1 for linking to MFC statically, and
one with CMAKE_MFC_FLAG set to 2 for linking to the shared
MFC dlls.

Validate that the install tree of the static build has only
one *.exe file in it and nothing else. Also validate that the
install tree of the shared library build has multiple files in
it (no less than 3) and that they are only of the expected types
*.exe, *.dll and *.manifest.

This commit does not address the issue reported in #11213,
it merely adds a test that may be used to show that the
bug report is valid. After this commit, the MFC test should
fail on any dashboard machines that have MSVC defined, but
cannot build an MFC app. We can then analyze that failure
data as input to solving the issue.
2011-11-01 10:08:58 -04:00
Jean-Christophe Fillion-Robin 76ecdd8d16 CTest: Look for CTestConfig.cmake in build dir first, then source dir
Provide the ability to configure CTest with settings different from the ones
available in the source tree by checking first if CTestConfig.cmake
exists in the build tree.

The motivation is to allow build system checking out external project to
test and/or package them and submit the associated results to a different
dashboard than the one specified (or not) in the source of the external
project.

For example, the build system of Slicer can checkout, build, test
and package what I will  call "extensions". These extensions can be developed
by third parties who can test and submit to their own dashboard / project.
When checked out by Slicer build system, the default dashboard can now be
overwritten by adding a custom CTestConfig.cmake to the build directory.
And if not overwritten, it would avoid to create CTestConfig.cmake within
the source checkout of the extension.
2011-10-26 23:23:03 -04:00
David Cole bef996852e Merge topic 'FortranCInterface-VS'
67fcc83 Simplify IntelVSImplicitPath detection project
a7ce26d Move IntelVSImplicitPath project to better location
539a822 Enable Fortran tests for IDE builds.
555f589 For VS Intel Fortran IDE builds, add a check to find the Fortran library PATH.
71402eb FortranCInterface: Compile separate Fortran lib in VerifyC[XX]
2011-09-20 14:41:56 -04:00
David Cole fe8dc11389 Tests: Add the more modern Mac64 nightly build
We can remove the older ppc;i386 non-64-bit Mac nightly build
in a little while after this one proves itself reliable.
2011-09-14 12:45:55 -04:00
David Cole a0ec7a00d5 Merge topic 'add-kwstyle-test'
3a0d632 KWStyle Test: Activate by default if KWStyle is found
91704ef Tests: Add a KWStyle test, equivalent to the make StyleCheck target
2011-09-13 14:32:52 -04:00
Bill Hoffman 539a822c8c Enable Fortran tests for IDE builds. 2011-09-09 17:11:57 -04:00
David Cole 339a321e66 Tests: Look for "Illegal" or "SegFault" in the output
One of the dashmacmini5 runs of this test results in an
"Illegal exception" detected instead of a segfault. For
the purposes of this test, we're going to say that either
is a "crash."
2011-09-06 12:06:36 -04:00
David Cole 482a235bff Merge topic 'generate_export_header'
6a6393c Don't use a variable name that might be used in other files.
5ca8c56 Fix up verbatim code sections of the dox.
75596e6 Don't start a line with a dash(-)
826374a Remove blank line at the start of the file.
8b9b8e1 Add documentation about the prefix and no_deprecated options.
51bc63a Fix the feature of using a specific prefix for macros.
3449f6b Add quotes in case cmake is installed in a prefix with a space.
36d28f2 Fix Compiler id variable name.
99b2aab Disable the tests for Watcom.
7ac0ab1 Quote paths in case there is a space in one of them.
89108b9 Look for errors reported by PGI too.
e0cc024 Add missing NO_EXPORT macro variant.
1b031d1 More consistency in the macro options.
03d60c7 Try to make the macros do almost nothing for Watcom.
6adeda9 Possibly fix configuration test on AIX.
e253348 Possibly fix test on HPUX.
32eff0c Test for too-old-intel compilers.
42154ec Fix up the regex command for Intel.
a147a06 Add some settings for non-truncation of test output.
bf73e75 Hopefully add version extraction for Intel.
aa4f0b6 Fix the version extraction regex for clang.
a493d1a Test the correct cxx variable.
b6ee2ee Comment the test assertion for now
a9a8b9e Exclude win32 from hidden visibility checks.
afae7a9 Start testing expected values for compiler flags.
1ae3365 Exclude PGI from exports and deprecated.
f426496 Exclude cygwin from the hidden visibility feature.
f84c7db Don't enable deprecated on old GCC
9672b33 Don't enable deprecated on HP.
10d8c44 Disable testing of deprecated macros.
97392a7d Fixup forgotten part of aed84517c9
2aeab4f Borland can't do deprecated.
c41c68b Try to error on deprecated on Intel and SunCC.
aed8451 Test for deprecated attribute before declspec.
c448b09 Perform the -Werror test only once.
fb88c6e Add some messaging output to make remaining issues findable.
01e9e98 Test -Werror instead of enabling it per compiler.
9aab2aa Expect the tests to pass if hidden visibilty is not enabled.
856bdb3 Don't change the expected build result based on the platform.
df4615e Add the COMPILER_HAS_DEPRECATED only if it has a declspec variant
78a6e1c Exclude the XL compiler from the hidden-visibility test.
e1f7ee3 Test for compiler features, instead of for specific platforms.
9554e10 Split the deprecated available check from setting macro values.
1590d5f Don't export methods on already exported classes.
750b67c Don't use hidden visibility on non-mingw windows either.
1f3be45 Make sure the hidden visibility variables never get set on MINGW.
399f415 Only set the deprecated attribute if hidden visibilty is enabled.
1c6b41b Remember to surround the other deprecated test in the Borland check.
3f7e036 Export deprecated free methods too.
7fa5592 Add some debug output to narrow down deprecation test issues
7924c1d Another attempt at fixing Borland.
50460ea Fix off-by-not in test for Borland.
b443459 Use the correct project name compiletest not compilefail
fc3772e Another attempt to fix the tests on Borland.
bab4a22 Disable all export macros on Borland.
cff9493 Only set the COMPILER_HAS_HIDDEN_VISIBILITY if GCC >= 4.2
af443b8 Set the CMAKE_RUNTIME_OUTPUT_DIRECTORY for windows builds.
61726f8 Only run the failure tests with gcc >= 4.2
002ddf2 Fix typo and tests failing as a result.
4443037 Fix tests with clang.
ffaa127 Test expected no-op instead of aborting the build.
6aca0e2 Short-circuit the tests on unsupported compilers.
d123bce Add some debug output.
3574b75 Simplify the compiler feature check
c7a937b Simplify. We already know we have hidden visibility at this point.
3b188c8 Test for features, not specific compilers.
4718233 Remove the fatal_warnings option which is no longer used.
b19911e Add missing licence header.
706ed2b Add a newline at the end of the file.
8963716 Add a newline at the end of the file.
def0a54 Handle the case where the user changes the DEFINE_SYMBOL property.
3088070 Add the GenerateExportMacro with unit tests.
2011-09-01 15:14:01 -04:00
David Cole 28cba226b3 Merge topic 'UsingCMakeLikePkgConfig2'
59238dc Fix --find-package mode on Cygwin, where enable_language(RC) is called
98472e4 Require the current cmake version in --find-package mode
a6ccf3c Use $(CXXFLAGS) and $(LDFLAGS) in the --find-package test Makefile
4386918 Fix line length
7d69310 Only enable the test when using GNU make
3011149 Make the test harder by always having a space in the include dirs
ab57ff6 Make the --find-package test harder
626fc71 Much improved test, should now be executed on all UNIXes
ec6982d Disable any STATUS output in --find-package mode
e552ae7 Dont check for -isysroot and -mmacosx-version on OSX in --find-package mode
e589589 Rename helper macros print_compile_flags() to set_compile_flags_var()
aecfc1f Fix test on OpenBSD with BSD make
6bb4ca3 The makefile for the test was kindof wrong
fd15b5e Only run the test if we are using a makefile generator under UNIX
9fc87c6 Add a test for the new --find-package mode
d3ae0ff Improve documentation for --find-package mode
bf07375 Add a cmake.m4 for using cmake in autoconf projects instead of pkgconfig
b0e3578 Use the file-utility to test for 64bit if there is no /usr/lib64
53edfb2 Better support for lib64 and Debian multiarch
b8fdaa1 Fix copyright notice in new CMakeFindPackageMode.cmake
7690edf Replace cmake::GetScriptMode() with GetWorkingMode()
e4f603b Implement find-package mode of cmake
a91d662 Add find-package mode, which does nothing yet
b976e70 Make clLocalGenerator::GetTargetFlags() public
2011-08-25 15:40:49 -04:00
David Cole 39f0fa725e Merge topic 'AutomocForQt'
920a046 QtAutomoc: Eliminate compiler warning
b00463f QtAutomoc test: Pass QT_QMAKE_EXECUTABLE
e78ce44 Fix automoc with VS builds: apply patch from Bill
71165e9 Silence warning in automoc: use long instead of int
1879bcc Fix build: use std::ios::out|ios::trunc instead of std::ios_base::out
678e124 Only enable the automoc test after checking that Qt4 works
71c29d1 Fix bootstrap test with automoc
afb3edc Fix warnings
add30e9 Fix build: non-void function must return a value
7e6d845 Automoc.cmake is not needed anymore
2963d0b Fix logic which decides when to execute automoc test
77a5c6e Add documentation for AUTOMOC, add initialization via CMAKE_AUTOMOC
bf8ef77 Add a test for automoc
d045fd4 Nicer progress message for the automoc target
50cd6ce Move automoc processing from add_executable/library to cmGlobalGenerator
cbaac2a Remove trailing whitespace
c27607b Refactor SetupAutomocTarget() so it can be run after creating the target
24d9b7d Remove trailing whitespace
58b7fe6 Use cout instead of printf()
72caf4d Add the generated automoc.cpp file to the cleaned files
ddb517d Color output when running moc
9303295 Initialize verbose based onb the env.var.
ace1215 Move code for parsing a cpp-file from the big loop to separate function
735a5bb Fix line lengths
83b730c Add AUTOMOC to the add_library() command
126c6ea Add the cmake module required currently for automoc
de91feb Remove the need to check for .h/.cxx during buildtime
d65689a Add actual automoc code from automoc
d1c0a5f Start implementing skeleton for automoc in cmake
a65011b Start work on automoc: add empty cmQtAutomoc class
2011-08-25 15:40:29 -04:00
David Cole b00463f06c QtAutomoc test: Pass QT_QMAKE_EXECUTABLE
...in case qmake is not in the PATH
2011-08-19 12:31:38 -04:00
Alex Neundorf 678e124481 Only enable the automoc test after checking that Qt4 works
On some systems which contribute nightly builds there were strange
errors which seemed to hint that the installed Qt4 is not usable/
not usable with this compiler. So first check whether it works,
and only if this was successful, enable the test.

Alex
2011-08-18 00:16:02 +02:00
Stephen Kelly afae7a95a0 Start testing expected values for compiler flags.
Should help catch unhandled flag warnings so far not handled by
check_cxx_compiler_flag FAIL_REGEXen.
2011-08-17 02:36:22 +02:00
Alex Neundorf 2963d0b078 Fix logic which decides when to execute automoc test
Alex
2011-08-16 23:48:01 +02:00
David Cole a772f21a7d Merge topic 'intel_fortran_vs2010'
3c53fbb Fix custom commands in VS2010 Fortran projects using CFG_INTDIR and test.
2011-08-16 17:01:33 -04:00
Alex Neundorf bf8ef778a3 Add a test for automoc
The files are taken from the Qt examples. They are BSD licensed, so it
should be fine. I only edited main.cpp to use both widgets.

Alex
2011-08-16 02:13:26 +02:00
Alex Neundorf 9fc87c6343 Add a test for the new --find-package mode
Alex
2011-08-11 23:34:17 +02:00
Stephen Kelly 30880707c0 Add the GenerateExportMacro with unit tests.
Reviewed-by: Marcus D. Hanwell <marcus.hanwell@kitware.com>
2011-08-07 18:33:47 +02:00
David Cole 91704ef2de Tests: Add a KWStyle test, equivalent to the make StyleCheck target 2011-08-03 21:37:01 -04:00
Bill Hoffman 3c53fbb1f0 Fix custom commands in VS2010 Fortran projects using CFG_INTDIR and test.
For custom commands in VS2010 Fortran projects the INTDIR variable
is different than in the rest of the solution because Intel
fortran still uses the old VS project files even in VS2010. So,
we replace $(Configuration) directly in the project files. I have also
added a FortranOnly test that tests this feature and is run on any
generator that has Fortran abilities.
2011-08-03 17:24:43 -04:00
Brad King 2b16232d45 Merge topic 'asn_java_support'
1417a55 Java: Fix documentation format and indentation
0b7627d Java: Use set_property/get_property for target variables.
b01a505 Java: Create correct jar archive dependencies.
f99c312 Java: Added some dependency magic to avoid recompilations.
f3233ba Java: Create java_class_filelist only if it does't exist.
a22ed3d Tests: Check for the new Java exeutable variables.
c177c8e Tests: Java tests should test UseJava.cmake
5c2106c Modules: Added CMake Java support.
a4b6275 FindJava: Find missing java development executables.
2011-07-26 14:54:33 -04:00
Brad King a4ec24269b CTest: Report tests not run due to unknown configuration
When add_test(NAME) is called without the CONFIGURATIONS argument then
the test is intended to run in any configuration.  In multi-config
generators like the VS IDE and Xcode tests created by add_test(NAME) can
only be run when testing a known configuration (otherwise there is no
way to generate the test command line).  If no test command line is
known for a particular configuration, or if no configuration is given to
ctest, report the test as not run instead of silently skipping it.

Also fix CMake's own TestsWorkingDirectory test invocation to correct a
previously silent failure exposed by this change.
2011-06-10 09:52:18 -04:00
Brad King 40792a1a15 Merge topic 'fix-12034-fixup-bundle-with-non-dotapp-exe'
51e16c0 BundleUtilities: Avoid test on Watcom dashboards (#12034)
41f962a Revert "BundleUtilities: Run test on Windows if either MSVC or dumpbin was found."
e17135e BundleUtilities: Add rpath to loadable modules in test.
8064044 BundleUtilities: Print reason for not loading module.so
f3de459 BundleUtilities: Run test on Windows if either MSVC or dumpbin was found.
900bf98 BundleUtilities: Disable running test on Windows unless using MSVC.
fa4dc08 BundleUtilities: Fix issues with custom target DEPENDS in test (#12034)
e40b79e BundleUtilities: Fix test when using xcode (#12034)
b68d3dc BundleUtilities: Fix regex to extract dependents from ldd (#12034)
7ac7b43 BundleUtilities: Work w/ non .app exes on Mac (#12034)
2011-06-07 14:06:09 -04:00
David Cole 51e16c05f7 BundleUtilities: Avoid test on Watcom dashboards (#12034) 2011-06-04 19:54:49 -04:00
Clinton Stimpson 41f962a2cb Revert "BundleUtilities: Run test on Windows if either MSVC or dumpbin was found."
This reverts commit f3de459cec.
There are some platforms without MSVC where this test doesn't work well.  We can look
into these later.
2011-06-02 09:09:14 -06:00
Bill Hoffman 7815e90e21 Fix for bug#10798. VS10 did not append -I flags with COMPILE_FLAGS prop.
This fix adds a test for this case for all generators.
2011-06-02 10:28:10 -04:00
Clinton Stimpson f3de459cec BundleUtilities: Run test on Windows if either MSVC or dumpbin was found. 2011-06-01 10:53:06 -06:00
Clinton Stimpson 900bf98d01 BundleUtilities: Disable running test on Windows unless using MSVC. 2011-05-31 22:15:34 -06:00
Clinton Stimpson fa4dc08a1a BundleUtilities: Fix issues with custom target DEPENDS in test (#12034) 2011-05-31 15:33:39 -04:00
Clinton Stimpson 7ac7b437b8 BundleUtilities: Work w/ non .app exes on Mac (#12034)
Also add a test of BundleUtilities including an exe,
some shared libs, a plugin, and a framework-style lib.

This test presently runs (and this functionality works)
on Linux, Mac and Windows.

For now, the framework-style lib is built as a plain old
shared lib because there is another yet-unresolved issue
with local frameworks without rpaths on the Mac.
2011-05-27 16:11:43 -04:00
Brad King 7039d1fd9b Fix CompileCommandOutput test for Make tools not supporting spaces
Use underscores instead of spaces for such Make tools.
2011-05-19 07:38:06 -04:00
Manuel Klimek 8346a28a0a Only offer the compile command output feature on unix systems 2011-05-16 10:42:10 -04:00
Manuel Klimek 0e6b05fcba Adds a test for the compile command line output. 2011-04-25 13:27:59 -04:00
Brad King b7b9597b75 Merge topic 'drag-n-drop-components'
dd04608 Fix KWStyle warnings
2973c1f Add component support to DragNDrop generator.
2011-04-05 14:29:06 -04:00
Brad King fff3a742b2 Merge topic 'upload-built-files'
3e32db7 cmCTestUploadCommand::CheckArgumentKeyword should return false if not FILES
6b6f309 Add the FILES keyword to ctest_upload command
28cdd0a Don't tar/gz ctest_upload() files
fbe4356 Change 'Files' tag to 'Upload' in Upload.xml
350546d Implement ctest_upload command
2011-04-05 14:28:38 -04:00
Clinton Stimpson 2973c1fbeb Add component support to DragNDrop generator. 2011-03-31 13:33:10 -04:00
Brad King 0506e37499 Merge topic 'cleanup-unused-variable-check'
a4335a6 Fix unused cache warning after multiple configure iterations
a75ebe3 Refine unused cache variable warning
2011-03-31 13:22:54 -04:00
Andreas Schneider a22ed3d62d Tests: Check for the new Java exeutable variables. 2011-03-29 11:54:42 +02:00
Brad King a75ebe3ea4 Refine unused cache variable warning
List all unused variables in one warning.  Cleanup implementation to run
the check exactly once at the end of generation.
2011-03-24 09:45:33 -04:00
Eric NOULARD 6dfc818394 CPack fix #11930 and simplifies component packaging options 2011-03-23 18:28:05 +01:00
Brad King 80ccc9aafb Disable Java test with Xcode generator
The parent commit 46c0a583 (Enable Java test more carefully on Apple,
2011-03-18) failed to restore the exclusion of Xcode when enabling the
Java test that was originally removed by commit c8f39193 (Avoid problem
reading jni.h on Macs, 2010-10-25).  The Xcode generator does not work
with the current Java support at all.
2011-03-18 14:18:11 -04:00
Brad King 46c0a5832d Enable Java test more carefully on Apple
The CTEST_RUN_Java option added by commit c8f39193 (Avoid problem
reading jni.h on Macs, 2010-10-25) was a quick hack to disable the Java
test on Mac machines after an update from Apple created a broken jni.h
symlink.  Remove the option and instead test whether jni.h exists as a
readable file before reading it.  This restores the original Java test
enabling logic but makes it robust to the broken symlink.
2011-03-18 13:46:57 -04:00
Zach Mullen 350546db3a Implement ctest_upload command 2011-03-15 15:07:37 -04:00
M. Konrad bf7066c6ce CPackDeb add Component Support to DEB generator fix #0011655
Contribution by Martin Konrad
Signed-off-by: Eric NOULARD <eric.noulard@gmail.com>
2011-03-11 08:47:15 +01:00
Brad King 5148d0b92d Merge topic 'CPackRPM-enableCPackTests'
dc9965f CPackRPM  do not run test if build dir contains space
e4d4dfc CPackRPM  activate CPackRPM test on Linux systems where rpmbuild is found
2011-03-08 14:22:28 -05:00
Eric NOULARD dc9965f9a0 CPackRPM do not run test if build dir contains space 2011-03-04 22:17:10 +01:00
Brad King 077954d4cb Test static linking with LINK_SEARCH_START_STATIC
Add "LinkStatic" test that links a static executable against "libm.a".
Pass both "/usr/lib/libm.a" and "-lm" to target_link_libraries to
trigger the link type logic for both cases.  If CMake incorrectly
switches the link type to shared for "-lm" then the link will fail.
2011-03-04 08:37:57 -05:00
Eric NOULARD e4d4dfc6ef CPackRPM activate CPackRPM test on Linux systems where rpmbuild is found 2011-03-03 20:45:43 +01:00
Brad King 521d244531 Merge topic 'mingw-module-definition'
6a61a8a Honor module .def files with MinGW tools (#9997)
2011-02-22 14:33:04 -05:00
Brad King 64d997a78c Merge topic 'fix-11295-support-plugin-bundles-on-mac'
cabc407 CFBundle Test: Add PATHS for finding Rez (#11295)
5457b82 Add support for CFBundle targets on the Mac (#11295)
2011-02-22 14:30:58 -05:00
Brad King 70bd240e6c Merge topic 'increase-ep-test-timeout'
42b26ee ExternalProject Test: Increase test timeout value
2011-02-22 14:29:49 -05:00
Brad King 6a61a8a538 Honor module .def files with MinGW tools (#9997)
Since commit 024d05ad (Fix use of module .def files for MS tools,
2009-09-29) module .def files work for any platform that sets
CMAKE_LINK_DEF_FILE_FLAG correctly.  Set it in the Windows-GNU platform
information file to enable support with MinGW tools.  Also enable the
test added by commit 0db2c850 (Test use of module .def files for MS
tools, 2009-09-29) for MinGW and MSYS generators.
2011-02-21 14:34:54 -05:00
Eric NOULARD b8da1a1378 Avoid foreach IN LISTS syntax which is not supported by CMake 2.6 2011-01-31 17:25:29 +01:00
Eric NOULARD 92ced20fa1 CPack Tests the different ways of packaging components 2011-01-30 13:11:25 +01:00
Brad King 7457a0fd80 Merge topic 'MakeCMakeBuildWithCMakeLess263'
ccbdc24 Make cmake build again with cmake < 2.6.3
2011-01-28 14:17:12 -05:00