Commit Graph

2247 Commits

Author SHA1 Message Date
David Cole 8c1f041239 Merge topic 'allfindmodules-versions'
9271d2f AllFindModules test: once again expand version checking
2012-03-02 11:50:37 -05:00
David Cole 1073d50508 Merge topic 'inject_code_via_variable'
2557a08 Fix typo in error message, and remove redundent test.
9090572 Add ability to include a file in a project via a cache variable.
2012-03-02 11:49:35 -05:00
David Cole 0ee7b8ea03 Merge topic 'find_package-improve-messages'
eeaaffc find_package: Test error and warning messages in failure cases
52dffb9 Merge branch 'test-CMakeCommands' into find_package-improve-messages
d365104 find_package: Optionally warn when implicitly using Config mode
31ead5f find_package: Reject mixed use of MODULE- and CONFIG-only options
6d83083 find_package: mention requested version number in error message
9c39bbd find_package: add CONFIG mode keyword alias for NO_MODULE
f310f67 find_package: add MODULE mode to use only Find-modules
7d67dcf find_package: improve error message when no Find module is present
978d89b find_package: rename NoModule to UseFindModules
2012-03-02 11:48:38 -05:00
David Cole a1860aaf1a Merge topic 'test-CMakeCommands'
5e1a5c4 Add infrastructure for CMakeCommands tests
2012-03-02 11:48:22 -05:00
Brad King 9012be20c5 CheckSourceTree: Remove CVS checkout support (#13001)
We no longer support CVS checkouts from the Git repository.
Drop the case from the CheckSourceTree test.  This will also
prevent the test from running and failing when CVS is found
but Git is not.
2012-03-02 10:24:43 -05:00
Brad King 0916cc888a CTest.UpdateHG: Fix repo URL for local filesystem (#13001)
Use "file:///c:/" instead of "file://c:/" because the latter
looks like a machine:port URL instead of a local file URL.
2012-03-02 08:07:47 -05:00
Rolf Eike Beer 944b90be60 add testcases for while()/endwhile() errors 2012-03-01 21:20:49 +01:00
Rolf Eike Beer 9271d2f697 AllFindModules test: once again expand version checking 2012-03-01 18:11:52 +01:00
Bill Hoffman 2557a08054 Fix typo in error message, and remove redundent test. 2012-02-29 22:28:06 -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 eeaaffcb2f find_package: Test error and warning messages in failure cases
Add a "CMakeCommands.find_package" test to run CMake on a bunch of cases
in which find_package fails.  Check that the process return code and
warning/error messages are as expected.  Record expected test output in
corresponding files for reference by the check.  These files will also
serve as a reference for the message text in each case.
2012-02-28 13:34:53 -05: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
Stephen Kelly 9106b564ae Extract and use the INCLUDE_DIRECTORIES target properties.
Eliminate callers of cmMakefile::GetIncludeDirectories.

All callers of GetIncludeDirectories should go through the local generator
object.

Only the local generator calls cmTarget::GetIncludeDirectories directly.
2012-02-22 06:31:50 -05:00
David Cole 8ef15df700 Merge topic 'HandleTargetsInCMakeRequiredLibraries'
35c48e1 Check*.cmake: Expand imported targets in CMAKE_REQUIRED_LIBRARIES
61cb4ea bootstrap: move while() and endwhile() into the bootstrap build
c9f2886 -don't pull in CheckTypeSize.cmake from the cmake which is being built
628f365 -remove trailing whitespace
2012-02-21 15:58:27 -05:00
David Cole b187a3a816 Merge topic 'doBuildRPM-withSpaceInTree'
6749450 Do not build RPM if path of the build tree contains space
2012-02-21 15:57:30 -05:00
David Cole 0b5c086693 Merge topic 'expect-more-versions'
540db7e AllFindModules test: expect more modules to have a version number available
2012-02-21 15:56:43 -05:00
David Cole 8a665fa363 Merge topic 'findlibrary-versioned-libraries'
70f3623 Find_library(): allow searching for versioned shared objects
2012-02-21 15:56:26 -05:00
David Cole 751e492840 Merge topic 'fix-typos-12975'
7ec2ebd fix the same typos as found by Debian in other places, too
d36d29f various typo and formatting fixes in manual pages (#12975)
2012-02-21 15:56:13 -05:00
Alex Neundorf 35c48e1270 Check*.cmake: Expand imported targets in CMAKE_REQUIRED_LIBRARIES
Add the function cmake_expand_imported_targets() to expand imported
targets in a list of libraries into their on-disk file names for a
particular configuration.  Adapt the implementation from KDE's
HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES which has been in
use for over 2 years.  Call the function from all the Check*.cmake
macros to handle imported targets named in CMAKE_REQUIRED_LIBRARIES.

Alex
2012-02-21 15:38:15 -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
Rolf Eike Beer 540db7e5b9 AllFindModules test: expect more modules to have a version number available
For all current build machines the modules FindPkgConfig, FindFreetype, and
FindLibXslt return a version number. Enforce this to early catch when this
is not always the case.
2012-02-18 16:25:41 +01:00
Rolf Eike Beer 70f362305f Find_library(): allow searching for versioned shared objects
This did not work because find_library() did only treat the given name as
complete filename if is matched "PREFIX.*SUFFIX":

find_library(MYLIB libfoo.so.2)

Now it is also taken as a whole if the name matches "PREFIX.*SUFFIX\..*".
2012-02-18 16:19:29 +01:00
Rolf Eike Beer 7ec2ebdbcf fix the same typos as found by Debian in other places, too 2012-02-18 16:13:34 +01:00
Rolf Eike Beer 378f229159 Tests: document where to put tests 2012-02-17 21:02:08 +01:00
Bill Hoffman 9090572f5c Add ability to include a file in a project via a cache variable.
If a variable exists called CMAKE_PROJECT_<projectName>_INCLUDE,
the file pointed to by that variable will be included as the last step
of the project command.
2012-02-17 12:41:39 -05: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
David Cole 96fd0be193 Merge topic 'allfindmodules-no-force-gnuplot'
2f306a9 AllFindModules test: do not enforce GNUPLOT version
2012-02-14 16:17:45 -05:00
Rolf Eike Beer 2f306a9992 AllFindModules test: do not enforce GNUPLOT version
Ancient Gnuplot versions like 3.7.1 don't know about "--version". Disable this
check so it doesn't break on machines with this version.
2012-02-13 18:45:38 +01:00
Brad King 1e16406dc9 CMakeAddFortranSubdirectory: Add NO_EXTERNAL_INSTALL option
We do not yet support "make install" in the external project case.
Document this explicitly in the interface.  Require the caller to use an
option to "disable" the unsupported behavior.  This will allow us to add
the behavior by default in the future without clobbering existing
projects that handle the installation themselves.
2012-02-09 08:38:56 -05:00
Bill Hoffman 48a09f82cc CMakeAddFortranSubdirectory: Make IMPORTED targets GLOBAL
cmake_add_fortran_directory uses imported targets when using the
mingw fortran compiler. This change makes those targets global
in scope so they act just like the real targets that exist when
a fortran compiler exists and regular add_subdirectory is used.
2012-02-09 08:38:52 -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 bd69e1c567 VSGNUFortran: Add special case for SunPro Fortran runtime library
The SunPro compiler does not add the fortran runtime library when
creating a shared fortran library.  Link to the SunPro Fortran runtime
libraries explicitly.
2012-02-09 08:35:56 -05:00
Brad King e4ae038f5d CMakeAddFortranSubdirectory: Allow full paths to directories
Fix the implementation to allow full paths with spaces.  Change the
interpretation of relative paths to be with respect to the current binary
directory.  This matches the convention used in ExternalProject.  Test
both full and relative paths in the VSGNUFortran test.
2012-02-09 08:34:06 -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 5db99e8708 Add CheckLanguage module
Define a "check_language(<lang>)" macro to test whether <lang> can be
enabled.  Cache the result in CMAKE_<lang>_COMPILER.  Add a test case
covering expected results.
2012-02-08 10:48:34 -05:00
David Cole 3921f1a559 Merge topic 'remove-unused-test-code'
daa4101 Remove unused test code
2012-02-07 15:35:21 -05:00
David Cole 986981ea03 Merge topic 'lang-enable-order-issue-12929'
7495845 Fix CXX/Fortran MODULE flags when enabled before C (#12929)
2012-02-07 15:35:11 -05:00
David Cole 0d7727d1cc Merge topic 'change-trilinos-submit-url'
bf2e385 Tests: Update drop site value for the Trilinos contract test
2012-02-07 15:34:49 -05:00
David Cole 66145a3e3b Merge topic 'AllFindModules-test'
ed1b126 CMakeOnly.AllFindModules: require version for some modules
2dee929 CMakeOnly.AllFindModules: suppress two modules from testing
3c4b4ff CMakeOnly.AllFindModules: always check FindQt
9d72b25 CMakeOnly.AllFindModules: clean up the Qt3/Qt4 code
2012-02-07 15:33:43 -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
Brad King 749584509e Fix CXX/Fortran MODULE flags when enabled before C (#12929)
If CXX or Fortran is enabled before C then the values of

  CMAKE_SHARED_MODULE_C_FLAGS
  CMAKE_SHARED_MODULE_CREATE_C_FLAGS

may not be available.  On platforms where MODULE library (plugin) creation
is the same as SHARED library creation initialize the MODULE creation
flags from the SHARED creation flags of the matching language instead of
assuming that C has been enabled first.

Teach the COnly and CxxOnly tests to build MODULE libraries.  The latter
covers this specific case.
2012-02-03 15:45:13 -05:00
David Cole bf2e385397 Tests: Update drop site value for the Trilinos contract test 2012-02-03 11:52:54 -05:00
Peter Collingbourne 6dd410c2b9 Ninja: Add the Ninja generator 2012-02-02 23:40:21 +00:00
Peter Collingbourne 7eb8d9036c Provide dependency file flags to generator
Causes compiler modules (currently only GNU) to set a
CMAKE_DEPFILE_FLAGS_${lang} variable, which communicates to
the generator the flags required to cause the compiler to create
dependency files.
2012-02-02 23:36:49 +00:00
David Cole a4e0257840 Merge topic 'check_cxx_compiler_flag_cmakeonly'
8de3b3d CheckCXXCompilerFlag test: make it a CMakeOnly test
2012-02-01 14:51:36 -05:00
Rolf Eike Beer ed1b12624d CMakeOnly.AllFindModules: require version for some modules 2012-02-01 18:12:19 +01:00
Rolf Eike Beer 8de3b3d13e CheckCXXCompilerFlag test: make it a CMakeOnly test 2012-01-30 19:42:51 +01:00
Rolf Eike Beer 2dee929496 CMakeOnly.AllFindModules: suppress two modules from testing
FindPackageHandleStandardArgs and FindPackageMessage match the glob
expression but are nothing that will usually be fed into find_package().
2012-01-26 22:33:33 +01:00
Rolf Eike Beer 3c4b4fffd0 CMakeOnly.AllFindModules: always check FindQt 2012-01-26 22:33:33 +01:00
Rolf Eike Beer 9d72b25a86 CMakeOnly.AllFindModules: clean up the Qt3/Qt4 code 2012-01-26 22:33:33 +01:00
Brad King f9c1c6225c Add test covering imported target scope rules 2012-01-25 14:43:07 -05:00
David Cole 30620e7477 Merge topic 'uninitialized-var-in-if'
54fd9e3 fix uninitialized var in if(NOT foo bar STREQUAL "foo bar")
2012-01-25 11:17:46 -05:00
David Cole 476679afaf Merge topic 'GetPrerequisites-rpath-OSX'
98d2031 Fix BundleUtilities test failure with space in build path.
36d6641 Fix new BundleUtilities test failure on Mac 10.4.x
0d96dec GetPrerequisites: Add test for @rpath support.
880139a GetPrerequisites: Add support for @rpath on Mac OS X.
9a6b102 GetPrerequisites: Add support for @rpath on Mac OS X.
2012-01-25 11:17:12 -05:00
David Cole 352279cdc2 Merge topic 'loadcommand-test-cleanup'
1531c11 LoadCommand test: cleanup
2012-01-25 11:16:52 -05:00
David Cole 3c5489bd0f Merge topic 'test_find_modules'
8d83043 AllFindModules test: also check Qt3 modules if Qt4 is not found
e797e7f AllFindModules test: keep complete output
ec631d5 add a test that loops through most Find* modules
2012-01-25 11:15:47 -05:00
Rolf Eike Beer 54fd9e38bb fix uninitialized var in if(NOT foo bar STREQUAL "foo bar")
Also adds test to verify this.
2012-01-22 12:15:57 +01:00
Clinton Stimpson 98d20316bd Fix BundleUtilities test failure with space in build path. 2012-01-20 22:02:01 -07:00
Rolf Eike Beer 1531c11168 LoadCommand test: cleanup
This removes some useless checking. The results of these things are never
properly checked so they should not count as testcases. At the end they only
needlessly clutter the output.
2012-01-20 18:31:32 +01:00
Clinton Stimpson 36d66416f4 Fix new BundleUtilities test failure on Mac 10.4.x 2012-01-20 06:59:17 -07:00
Clinton Stimpson 0d96decdd0 GetPrerequisites: Add test for @rpath support. 2012-01-19 22:03:06 -07:00
Rolf Eike Beer 8d830436a4 AllFindModules test: also check Qt3 modules if Qt4 is not found 2012-01-18 18:23:21 +01:00
Rolf Eike Beer 0541a03a4c GenerateExportHeader test: add newlines before end of file 2012-01-18 00:01:08 +01:00
David Cole a6518c30e0 Merge topic 'check_symbol_exists'
6856b4d Merge topic 'link-shared-depend-cycle-issue-12647' into check_symbol_exists
8e1f376 add a test for Check{,CXX}SymbolExists
813eca6 CheckSymbolExists: force the compiler to keep the referenced symbol
2012-01-17 16:25:38 -05:00
David Cole 05fbfd494e Merge topic 'link-shared-depend-cycle-issue-12647'
8e756d2 Tolerate cycles in shared library link interfaces (#12647)
2012-01-17 16:25:19 -05:00
David Cole 4cfaa91ef0 Merge topic 'add_CMakeOnly_test-infrastructure'
9a20abf Add infrastructure for CMake-only tests
2012-01-17 16:25:01 -05:00
David Cole 4dd47eb6c3 Merge topic 'compiler-version'
0df1942 Detect SGI MIPSpro compiler version with its id
a5e892c Document compiler version macro formats used for detection
d7c6f41 Detect HP compiler version with its id
3dd9fa9 Detect SunPro compiler version with its id
c198730 Detect Watcom compiler version with its id
5899b98 Detect Clang compiler version with its id
b8cfa65 Detect PGI compiler version with its id
6dae666 Detect IBM XL compiler version with its id
4080d55 Detect Borland compiler version with its id
2cc205a Detect Intel compiler version with its id (#11937)
a6d83cc Detect MSVC compiler version with its id
a662855 Detect GNU compiler version with its id (#6251)
fa7141f Add framework to detect compiler version with its id (#12408)
2012-01-17 16:22:53 -05:00
Rolf Eike Beer e797e7fb41 AllFindModules test: keep complete output 2012-01-17 19:14:56 +01:00
Rolf Eike Beer ec631d5043 add a test that loops through most Find* modules
This allows easy spotting of modules that output crappy messages and the
like.
2012-01-16 23:37:13 +01:00
Rolf Eike Beer 6856b4d19d Merge topic 'link-shared-depend-cycle-issue-12647' into check_symbol_exists 2012-01-16 21:03:23 +01:00
Rolf Eike Beer 8e1f376782 add a test for Check{,CXX}SymbolExists
Now that we think that CheckSymbolExists really works for all cases it is time
to prove that. If this code fails too many other things will break.
2012-01-16 20:52:29 +01:00
Brad King 8e756d2b9b Tolerate cycles in shared library link interfaces (#12647)
Since commit 183b9509 (Follow all dependencies of shared library private
dependencies, 2011-12-14) we honor LINK_INTERFACE_LIBRARIES when
following dependent shared libraries.  The link interface properties may
form a cycle if set incorrectly by a project.  Furthermore, the property
LINK_DEPENDENT_LIBRARIES may form a cycle if set incorrectly by hand
(though CMake should never generate one).  In either case, do not follow
the cycle forever when following the dependent shared library closure.
We only need to add dependency edges to the constraint graph once.

Add "LinkInterfaceLoop" test to cover this case.
2012-01-13 14:22:24 -05: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 c1789e6986 complex: Remove test dependence on cmSystemTools
Use C standard 'remove' and POSIX standard 'stat'.
2011-12-23 16:16:56 -05:00
Brad King 569cee1d9e complex: Move cmSystemTools::UpperCase test to CMakeLibTests
This test belongs in the CMakeLibTests test driver executable which
correctly links to CMakeLib.
2011-12-23 16:16:54 -05:00
Brad King 49d6dd67f1 complex: Simplify test for single-character exe name
Run the test executable as a custom command instead of depending on
cmSystemTools::RunSingleCommand.
2011-12-23 16:16:52 -05:00
Brad King 76ac88b730 complex: Move GeneratedFileStream test to CMakeLibTests
This test belongs in the CMakeLibTests test driver executable which
correctly links to CMakeLib.  Fix incorrect library link order in the
Complex tests exposed by this change.
2011-12-23 16:16:50 -05:00
Brad King 137e5974bc complex: Remove dynamic loader tests
Everything covered by these tests is now covered by the KWSys
DynamicLoader test and the Plugin test.
2011-12-23 16:16:49 -05:00
Brad King 63379207e1 complex: Sync Tests/ComplexOneConfig with Tests/Complex
The two test sources must remain identical.  Apply to ComplexOneConfig
the change that commit f578381e (Fix vs2010 project generation error
when HEADER_FILE_ONLY is set, 2010-12-20) made to Complex.
2011-12-23 16:16:47 -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
David Cole d6a33f6d38 Merge topic 'fix_double_project_cmake_build'
5badf5f Fix the case where cmake --build failed with two project cmds in one file.
2011-12-20 14:21:06 -05:00
David Cole 16dacf3a6a Merge topic 'AutomocFineTuning'
e474dcb automoc: improved warning message in relaxed mode
96fc5d5 automoc: default to strict mode, use CMAKE_AUTOMOC_RELAXED_MODE
2011-12-20 14:20:32 -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 52d5f67ec7 Merge topic 'test-Fortran-compiler-compat'
fcb2a27 Fix and simplify Fortran test compiler compatibility check
2011-12-16 10:15:32 -05:00
Brad King fcb2a27982 Fix and simplify Fortran test compiler compatibility check
Since commit 38aab379 (Set CMAKE_<lang>_COMPILER_ID for VS generators,
2011-09-02) the VS IDE generators set the C and C++ compiler id to MSVC
and the Fortran compiler id to Intel.  This caused the Fortran test to
fail compatible compiler detection because the if() test

  "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC"

is evaluated as the "var MATCHES regex" signature which evaluates the
compiler id "MSVC" as a variable which is defined to 1 which does not
match "MSVC".

Combine tests for non-identical but compatible compiler vendors into a
single regex match whose left hand side will not be defined as a
variable.
2011-12-15 09:25:49 -05:00
Brad King 183b95098e Follow all dependencies of shared library private dependencies
In cmComputeLinkDepends we compute the transitive closure of private
shared library dependencies.  When a shared library is added to this
closure we must follow all of its dependencies whether they are private
or public.  Previously we only followed the private dependencies.  Fix
the implementation to follow the public dependencies too.  Also extend
the ExportImport test to cover this case.
2011-12-14 11:33:01 -05:00
Alex Neundorf 96fc5d5d07 automoc: default to strict mode, use CMAKE_AUTOMOC_RELAXED_MODE
automoc now defaults to strict mode, also with Qt4, i.e. it behaves as
the documentation says by default. I also inverted the switch
CMAKE_AUTOMOC_STRICT_MODE to CMAKE_AUTOMOC_RELAXED_MODE.
Docs and test adapted accordingly.

Alex
2011-12-13 22:11:47 +01:00
David Cole 2d1195123e Merge branch 'master' into AutomocIncludedDotMocFileHandling
Conflicts:
	Source/cmTarget.cxx
2011-12-07 16:29:13 -05:00
Brad King fa7141f5ad Add framework to detect compiler version with its id (#12408)
Teach CMakePlatformId.h to construct an "INFO:compiler_version[]" string
literal from macros COMPILER_VERSION_(MAJOR|MINOR|PATCH|TWEAK) to be
defined in CMake(C|CXX)CompilerId.(c|cpp) for each compiler.  Provide
conversion macros DEC() and HEX() to decode decimal or hex digits from
integer values.  Parse the version out of the compiler id binary along
with the other INFO values already present.

Store the result in variable CMAKE_<LANG>_COMPILER_VERSION in the format
"major[.minor[.patch[.tweak]]]".  Save the value persistently in
CMake(C|CXX)Compiler.cmake in the build tree.  Document the variable for
internal use since we do not set it everywhere yet.

Report the compiler version on the compiler id result line e.g.

  The C compiler identification is GNU 4.5.2

Report CMAKE_(C|CXX)_COMPILER_(ID|VERSION) in SystemInformation test.
2011-12-07 08:59:51 -05:00
David Cole 386cf3c593 Merge topic 'GNU-to-MS'
ae62a1c Test CMAKE_GNUtoMS option in ExportImport on MinGW and MSys
afb00fe Add CMAKE_GNUtoMS option to convert GNU .dll.a to MS .lib
61e8629 Factor makefile generator link rule lookup into helper function
a603250 Load platform files that need to know the ABI when possible
ecd8414 Fortran: Detect pointer size in gfortran on MinGW
2011-12-06 15:07:39 -05:00
David Cole f9144380f1 Merge topic 'fix-ExternalProject-svn-issue'
f529ddc Tests: ExternalProject: Remove unnecessary 'svn --version' call
2011-12-06 15:07:17 -05:00
Brad King ae62a1cd35 Test CMAKE_GNUtoMS option in ExportImport on MinGW and MSys 2011-12-05 18:20:35 -05:00
Rolf Eike Beer f529ddcea0 Tests: ExternalProject: Remove unnecessary 'svn --version' call
This test will fail to get a proper version number if running on a (e.g.
German) localized system because the regular expression used to match the
Subversion version output does not match. Instead of duplicating code just
remove the local test altogether and use the version that FindSubversion.cmake
already detects.
2011-12-05 11:49:31 -05:00
Brad King fea3e84ee3 export(): Document undefined behavior of location properties
Since the export() command needs to know the final location of a target
in the build tree we cannot allow properties affecting the location or
name of a target file to be set after the target is passed to export().

Fix a violation of this rule in the SimpleInstall test.
2011-12-01 16:00:12 -05:00
David Cole 97142c7603 Merge topic 'newline-style'
ac2e45d Provide std::ios_base typedef on GCC < 3
28c46ca cmNewLineStyle: Use cmStandardIncludes.h
75e83e9 cmNewLineStyle: Remove trailing comma in enum
be6502c bootstrap: Include cmNewLineStyle in build
a087490 Add NEWLINE_STYLE option to configure_file (#3957)
2011-12-01 14:03:24 -05:00
Peter Kuemmel a087490697 Add NEWLINE_STYLE option to configure_file (#3957) 2011-11-28 13:48:59 -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
Stephen Kelly 47457159c7 Add a test case for the use of Q_PRIVATE_SLOT. 2011-11-22 22:26:42 +01:00
Alex Neundorf bde4edb6ab automoc: add special handling for including basename_p.moc, with test
Alex
2011-11-22 22:01:13 +01:00
Alex Neundorf bc7560e6e5 automoc: add test for including a moc_abc_p.cpp file
Alex
2011-11-22 20:52:21 +01:00
Alex Neundorf 30fd8e603a automoc: add test for including the moc file from another header
including moc_xyz.cpp in abc.cpp should run moc on xyz.h (and
include the file in abc.cpp)

Alex
2011-11-22 20:52:13 +01:00
Alex Neundorf 80dfbc99f4 automoc: add a test for including both abc.moc and moc_abc.cpp
Alex
2011-11-22 20:51:59 +01:00
Brad King 8302608a74 Fix CMake.File hash test for CRLF checkouts
Use a dedicated test input file for the file() hash API tests.
Set attribute crlf=input so it is always checked out correctly.
2011-11-16 11:26:10 -05:00
Brad King 2e9c26cf96 Add string(MD5) and string(SHA*) commands to compute hashes
Provide a CMake-language binding to these cryptographic hashes.  Add a
string() command API for MD5, SHA1, SHA224, SHA256, SHA384, and SHA512.
2011-11-16 10:29:35 -05:00
Brad King 38771d3bdf Add file(SHA*) commands to compute cryptographic hashes
Add a file() command API for SHA1, SHA224, SHA256, SHA384, and SHA512.
2011-11-16 10:15:44 -05:00
Brad King 042f7965c3 Add file(MD5) command to compute cryptographic hash
Provide a CMake-language binding to the md5sum function previously
available only by "cmake -E md5sum".
2011-11-16 10:15:01 -05:00
David Cole f1197ff0da Merge topic 'fix-11213-vs10-mfc-support'
537020f Tests: Nudge MFC test to pass on VS 6 dashboards (#11213)
51f442e VS11: Update InstallRequiredSystemLibraries.cmake for VS11 (#11213)
d85ab7a Tests: Add environment logging to the MFC test (#11213)
011694c VS10: Use expected values for UseOfMfc (#11213)
a2e6d24 Tests: Fix MFC test to work with VS 10 and later (#11213)
2011-11-15 14:38:56 -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
Alex Neundorf 69cf480cd6 automoc: add more test cases
Alex
2011-11-10 22:12:03 +01:00
David Cole 537020f958 Tests: Nudge MFC test to pass on VS 6 dashboards (#11213)
InstallRequiredSystemLibraries does not install any dlls when
used with VS 6 dashboards. Modify the ValidateBuild script to
expect only 1 file when building with VS 6.

Using "-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>" does not work when
<INSTALL_DIR> evaluates to a long enough string. However, using
"-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>" does work, even with
the longer strings. So: make sure to include the ":PATH" when using
this construct with ExternalProject calls so that they may install
to the proper location on VS 6 builds. All existing calls that match
"CMAKE_INSTALL_PREFIX.*INSTALL_DIR" include the ":PATH" after this
commit.

By the way: https://twitter.com/DLRdave/status/134339505397309440
2011-11-09 13:35:28 -05:00
David Cole d85ab7a412 Tests: Add environment logging to the MFC test (#11213)
Simply to ease analyzing still-occurring dashboard failures.
2011-11-08 15:13:52 -05:00
David Cole a2e6d2482e Tests: Fix MFC test to work with VS 10 and later (#11213)
The mfc app in the test was generated by the VS 7.1 wizard,
and due to changes in VS since then, the values used for WINVER
and _WIN32_WINNT caused compile errors when built with VS 10
or later. Change them to values appropriate for targeting
Windows XP or later when building with VS 10 or later.

See http://msdn.microsoft.com/en-us/library/6sehtctf.aspx
for more info.
2011-11-04 13:07:38 -04:00
David Cole c71f7ab7db Tests: Avoid MFC test automatically for Watcom WMake builds (#11213) 2011-11-03 13:21:06 -04:00
David Cole a42e3f2bf9 Tests: Fix MFC test for old vs6 dashboards (#11213)
The MFC test's mfc1 directory was a "VS-MFC-wizard-generated"
starter MFC app, using VS 7.1 as the generator. There's one define
used in the generated rc file that was not available back in the
VS6 days... Put a conditional define in here based on _MSC_VER
to enable the test app to build on VS6 dashboards.
2011-11-03 08:37:23 -04:00
David Cole b297da615a Tests: Fix MFC test w/ Make-based generators (#11213)
An explicit add_definitions of _AFXDLL is required for shared
library builds with non-Visual Studio generators.
2011-11-02 08:03:12 -04:00
David Cole 54595e6d89 Tests: Avoid MFC test automatically for VCExpress builds (#11213) 2011-11-01 16:27:24 -04:00
David Cole 09dfcfb6cb Merge topic 'CPackRPM-perComponentHeader'
e20c59a CPackRPM support component specific variables for spec files
2011-11-01 14:26:31 -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
Eric NOULARD e20c59ae50 CPackRPM support component specific variables for spec files
This is a modified version of a user patch
Inspired-By: informant
2011-10-30 20:13:20 +01: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 a17709974f Merge topic 'test-update-svn-1.7-issue-12535'
6d79b50 Teach CTest.UpdateSVN to detect svn add --depth before using it
74eb86c Fix CTest.UpdateSVN with Subversion 1.7 (#12535)
2011-10-25 15:34:37 -04:00
Brad King 6d79b50518 Teach CTest.UpdateSVN to detect svn add --depth before using it
Older svn versions do not have the --depth option for "svn add".
Fortunately we do not need it for versions that old.  Look for the
option and use it only when available.
2011-10-24 17:34:55 -04:00
Brad King 74eb86c4a3 Fix CTest.UpdateSVN with Subversion 1.7 (#12535)
The test adds a subdirectory with

 svn add subdir
 svn add ... subdir/foo.txt subdir/bar.txt

Subversion 1.7 fails on the second command with

 svn: warning: W150002: '.../subdir/foo.txt' is already under version control
 svn: warning: W150002: '.../subdir/bar.txt' is already under version control
 svn: E200009: Could not add all targets because some targets don't exist

because it considers adding an already-versioned file to be an error.
Avoid the problem by using

 svn add --depth=empty subdir

to add the subdirectory without the files it contains.
2011-10-24 17:03:34 -04:00
Alex Neundorf ea8ac9f5dc Add copyright notices
Alex
2011-10-22 19:43:34 +02:00
Alex Neundorf 56aa6ffae7 automoc:run moc on the header if the source file contains include "foo.moc"
This fixes #12533.
Before automoc did not check the header if the source file contained a
statement, now it does.
Additionally, moc is now only run on explicitely listed headers which
contain a Q_OBJECT macro.

Alex
2011-10-22 19:38:39 +02:00
Alex Neundorf 0d44ce2bf4 Silence make on OpenBSD in FindPackageModeTest(#12508)
BSD make doesn't use -v for printing its name and version, and so
complains on stderr that this is a bad command line option, used
in Tests/FindPackageModeMakefileTest/CMakeLists.txt .
Silence stderr to make that ugly output go away.
Patch by David Coppy.

Alex
2011-10-12 22:20:18 +02:00
Stephen Kelly 08271ec7d3 Build each library only once instead of once for each test. 2011-10-09 17:41:47 +02:00
Stephen Kelly c83cfd7a01 Remove unused define. 2011-10-09 17:39:24 +02:00
Brad King 3b5256e19e Teach our tests about special cases for VS 11
Teach the CheckCompilerRelatedVariables test to verify MSVC11.  Update
the special cases already in the Preprocess and VSExternalInclude tests
for VS 10 to work for VS 11 too.
2011-09-23 11:07:24 -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 98d5623a7b Merge topic 'effective-platform-name'
64c9b31 Xcode: Add test to demonstrate iOS project in Xcode
59a2265 Xcode: Use EFFECTIVE_PLATFORM_NAME reference in ComputeOutputDir
2011-09-13 14:33:21 -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
David Cole 64c9b318bf Xcode: Add test to demonstrate iOS project in Xcode
Presently, this test is only run manually because not all machines
have an iOS SDK, complications associated with certificates and code
signing, having a device attached, ...

If you're setup to do iOS dev work, you can easily run this test
manually on your Mac using the Xcode generator and run the result
in the simulator or on your attached device.
2011-09-12 15:46:24 -04:00
Bill Hoffman 539a822c8c Enable Fortran tests for IDE builds. 2011-09-09 17:11:57 -04:00
David Cole 07eb08439d Merge topic 'fix-ctesttestcrash-test'
339a321 Tests: Look for "Illegal" or "SegFault" in the output
2011-09-07 15:38:57 -04:00
David Cole 54730d7604 Merge topic 'generate_export_header'
dbd776d Don't put what some compilers consider junk at the end of the line.
93d8d19 Add some more unit tests.
2011-09-07 15:38:00 -04:00
David Cole d9ad72542a Merge topic 'fortran-format'
90efed6 Xcode: Honor Fortran_FORMAT target and source file property
5c0c635 Fortran: Add support for free- and fixed-form flags
47a0c75 VS: Map Fortran free- and fixed-format flags to IDE options
d6e2a06 VS: Map per-source Fortran flags to IDE options
2011-09-07 15:37:27 -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
Stephen Kelly 93d8d1992e Add some more unit tests. 2011-09-02 10:18:24 +02: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
Brad King 5c0c635a09 Fortran: Add support for free- and fixed-form flags
Define a "Fortran_FORMAT" target and source file property.  Initialize
the target property from a "CMAKE_Fortran_FORMAT" variable.  Interpret
values "FIXED" and "FREE" to indicate the source file format.  Append
corresponding flags to the compiler command line.
2011-08-31 10:24:43 -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
Stephen Kelly 36d28f2e6b Fix Compiler id variable name. 2011-08-24 20:21:30 +02:00
Stephen Kelly 99b2aabd46 Disable the tests for Watcom.
They are timing out and showing up on the dashboard.
2011-08-24 19:58:00 +02:00
Stephen Kelly 7ac0ab1f88 Quote paths in case there is a space in one of them. 2011-08-24 19:50:31 +02:00
Stephen Kelly e253348ecd Possibly fix test on HPUX. 2011-08-23 19:49:52 +02: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 a6ccf3cb65 Use $(CXXFLAGS) and $(LDFLAGS) in the --find-package test Makefile
This should make the test succeed in the coverage builds, where CXXFLAGS
and LDFLAGS are set accordingly.

Alex
2011-08-18 18:43:33 +02:00
Stephen Kelly 42154ec01c Fix up the regex command for Intel. 2011-08-18 13:29:06 +02: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
Alex Neundorf 7d693108fa Only enable the test when using GNU make
The makefile used in the test uses $(shell ...), which is
AFAIK a GNU extension, and will probably not work e.g. with OpenBSD make.
According to the FreeBSD make manpage their make has a != assignment,
which seems to do something similar, but I don't have such a system
around for testing.
Also, the point of this test is not to write a portable makefile,
but to check whether cmake --find-package prints a correct string.

Alex
2011-08-17 23:44:34 +02:00
Alex Neundorf 3011149947 Make the test harder by always having a space in the include dirs
The commit message for the previous commit was wrong, it should
have been: fix the test by using $(shell ...) syntax instead
of backticks in the Makefile.
With backticks I couldn't get the quoting right.
Printing -I"/some/path with space" did not work, the compiler
complained that there is not file "with". Also backslashes in
different numbers did not make it work.

Alex
2011-08-17 22:53:35 +02:00
Alex Neundorf ab57ff6156 Make the --find-package test harder
Now it is guaranteed that the include paths always contain a space.
This should make the cont. build fail.

Alex
2011-08-17 22:51:57 +02:00
Stephen Kelly a147a069a5 Add some settings for non-truncation of test output. 2011-08-17 14:03:12 +02:00
Stephen Kelly bf73e75941 Hopefully add version extraction for Intel. 2011-08-17 13:37:57 +02:00
Stephen Kelly aa4f0b6ba8 Fix the version extraction regex for clang. 2011-08-17 13:32:48 +02:00
Stephen Kelly a493d1a353 Test the correct cxx variable. 2011-08-17 13:32:20 +02:00
Stephen Kelly b6ee2ee03a Comment the test assertion for now
At least until I know which gcc versions do not pass.
2011-08-17 02:42:09 +02:00
Stephen Kelly a9a8b9e8d1 Exclude win32 from hidden visibility checks. 2011-08-17 02:40:56 +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 674be27a7f Merge topic 'WriteConfigVersionFile_2TemplateFiles'
c9761de Improve documentation for WriteBasicConfigVersionFile.cmake
208bb90 Set UNSUITABLE instead of not COMPATIBLE
bb03c2d Really fix copyright notice
d50a61a Fix copyright notice
4ba09bc Add some tests for write_basic_config_version_file()
02b1e4b Add example to documentation
d216a67 Provide macro write_basic_config_version_file()
2011-08-16 17:03:00 -04: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 626fc717c6 Much improved test, should now be executed on all UNIXes
Instead of relying on that some development package is installed on the
system, now a tiny library is built, which is the searched and used
during the test.

Alex
2011-08-16 22:31:26 +02: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 aecfc1fd10 Fix test on OpenBSD with BSD make
BSD make doesn't seem to support -C, so do not use it,
According to the documentation the working directory is set
to CMAKE_CURRENT_BINARY_DIR anyway, so it should work just the same.

Alex
2011-08-16 00:08:43 +02:00
Stephen Kelly 10d8c446d5 Disable testing of deprecated macros.
It is not possible to test for it sanely across multiple ancient
compilers supported by cmake.
2011-08-14 15:45:36 +02:00
Alex Neundorf 6bb4ca3802 The makefile for the test was kindof wrong
Alex
2011-08-14 15:38:24 +02:00
Stephen Kelly c41c68bfa4 Try to error on deprecated on Intel and SunCC. 2011-08-13 23:49:17 +02:00
Stephen Kelly c448b09ad3 Perform the -Werror test only once.
This way, the output of the test should be visible on CDash.
2011-08-13 22:57:55 +02:00
Stephen Kelly fb88c6e32a Add some messaging output to make remaining issues findable. 2011-08-12 11:39:21 +02:00
Stephen Kelly 01e9e983e3 Test -Werror instead of enabling it per compiler.
Maybe the Intel compiler supports it too.
2011-08-12 10:47:08 +02:00
Stephen Kelly 9aab2aa77f Expect the tests to pass if hidden visibilty is not enabled. 2011-08-12 10:42:16 +02:00
Stephen Kelly 856bdb317b Don't change the expected build result based on the platform.
Hopefully the compiler feature tests will cover those cases.
2011-08-12 00:30:31 +02:00
Alex Neundorf fd15b5e1c4 Only run the test if we are using a makefile generator under UNIX
Alex
2011-08-11 23:34:25 +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 e1f7ee3de7 Test for compiler features, instead of for specific platforms. 2011-08-11 19:06:23 +02:00
Stephen Kelly 9554e1013e Split the deprecated available check from setting macro values. 2011-08-11 18:17:12 +02:00
Stephen Kelly 1590d5fe4f Don't export methods on already exported classes.
This is always a mistake.
2011-08-11 10:55:12 +02:00
Stephen Kelly 1c6b41bee7 Remember to surround the other deprecated test in the Borland check. 2011-08-11 00:19:53 +02:00
Stephen Kelly 3f7e03643d Export deprecated free methods too.
That way they can be linked to even after being deprecated.
2011-08-11 00:18:33 +02:00
Stephen Kelly 7924c1d6a8 Another attempt at fixing Borland.
Apparently it still needs to be exported, but only declspec(deprecated)
does not work.
2011-08-10 22:19:39 +02:00
Stephen Kelly b4434591fb Use the correct project name compiletest not compilefail
Should fix windows VS solution based builds.
2011-08-10 21:50:06 +02:00
Stephen Kelly cff9493598 Only set the COMPILER_HAS_HIDDEN_VISIBILITY if GCC >= 4.2
Hearsay has it that before that version it didn't work properly.

Hopefully this will fix more dashboard builds.
2011-08-10 21:14:46 +02:00
Stephen Kelly af443b830b Set the CMAKE_RUNTIME_OUTPUT_DIRECTORY for windows builds. 2011-08-10 21:01:42 +02:00
Stephen Kelly 61726f867e Only run the failure tests with gcc >= 4.2 2011-08-10 15:17:01 +02:00
Stephen Kelly 002ddf253c Fix typo and tests failing as a result. 2011-08-10 14:58:00 +02:00
Stephen Kelly 44430379b7 Fix tests with clang. 2011-08-10 13:43:48 +02:00
Stephen Kelly ffaa127b19 Test expected no-op instead of aborting the build.
Aborting causes make clean to fail if the executable is not created.
2011-08-10 11:54:35 +02:00
Stephen Kelly 6aca0e257b Short-circuit the tests on unsupported compilers. 2011-08-10 10:41:38 +02:00
Stephen Kelly 706ed2b1b0 Add a newline at the end of the file.
Hopefully fix the test execution reported on CDash.
2011-08-09 15:02:48 +02:00
Stephen Kelly 8963716615 Add a newline at the end of the file.
Hopefully fix the test execution reported on CDash.
2011-08-09 00:18:00 +02:00
Stephen Kelly def0a54e0a Handle the case where the user changes the DEFINE_SYMBOL property.
This eases porting of KDE code.
2011-08-08 02:08:10 +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
Alex Neundorf 208bb9009b Set UNSUITABLE instead of not COMPATIBLE
Alex
2011-08-05 22:42:57 +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
David Cole 7824885960 Merge topic 'adjust-path-for-all-generators-test'
0baf565 Ensure libgmp-10.dll is in the PATH for CMakeTestAllGenerators
2011-08-02 15:10:15 -04:00
David Cole 330577ce87 Merge topic 'fix-updategit-test'
0375865 Fix machine-specific UpdateGIT test failures
2011-08-02 15:10:12 -04:00
Alex Neundorf 4ba09bc6a2 Add some tests for write_basic_config_version_file()
Alex
2011-08-01 23:29:27 +02:00
David Cole 0baf5659c6 Ensure libgmp-10.dll is in the PATH for CMakeTestAllGenerators
But only if it exists at the default location:
C:/MinGW/bin/libgmp-10.dll

This is so that the pop-up dialog about not being able to load
that dll does not hang the test when there's nobody watching.
2011-07-29 11:13:33 -04:00
David Cole 0375865a4e Fix machine-specific UpdateGIT test failures
Generated Update.xml file is larger than the previously
hard-coded limit of 4096. Introduce variable max_update_xml_size
and bump it up to 16k for reliable test runs.
2011-07-29 10:24:06 -04:00
David Cole df9577259c Add support for Visual Studio project-specific globals (#8707)
Thanks to Pau Garcia i Quiles for the inspiration for the patch.
I've tweaked it a bit compared to what's in the bug tracker: this
commit does not allow empty global variable names.

I also added usage of the new feature to an existing test. Although
it has no effect on the resulting Visual Studio projects, you can
verify that the VSResource test produces a non-empty globals section
in the generated .vcproj(x) files.
2011-07-29 10:04:36 -04:00
Brad King 2305b575f1 Merge topic 'fix-tests-failing-with-Xcode4'
1a53fb7 Use correct default multiple architecture values in test
5f7acc8 Base architecture choice logic on Xcode version
c050c59 Fix BuildDepends test to work with Xcode 4
923b030 Fix Architecture test to work with Xcode 4
2011-07-26 14:57:38 -04:00
Brad King 119dce33d3 Merge topic 'SetPropertyAppendString'
9dbba1b Fix #12342: Add APPEND_STRING option to set_property()
2011-07-26 14:57:32 -04:00
Brad King ccd4c8b202 Merge topic 'PushCheckState'
d64ba0b Fix copyright notice test
1325260 Add macros cmake_push/pop_check_state() as discussed on the list.
2011-07-26 14:57:05 -04:00
Brad King 25a35f5686 Merge topic 'DisableSwitchForFindPackage'
4a50b5f Add a basic test for CMAKE_DISABLE_FIND_PACKAGE_<package>
a66df08 Add documentation for the CMAKE_DISABLE_FIND_PACKAGE_<Name> switch
6e1d3ed Add a switch to disable a find_package() call completely
2011-07-26 14:56:22 -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
David Cole 1a53fb7537 Use correct default multiple architecture values in test
Even if CMAKE_OSX_ARCHITECTURES value is a single value...
2011-07-19 11:53:31 -04:00
David Cole 5f7acc8d75 Base architecture choice logic on Xcode version
Not on Darwin version.
2011-07-18 09:59:58 -04:00
David Cole c050c592ee Fix BuildDepends test to work with Xcode 4
ppc tools are no longer available in the Xcode 4 installation.
Eliminate the use of the hard-coded 'ppc' in the test when
running on Snow Leopard or later.
2011-07-15 15:34:17 -04:00
David Cole 923b030ed9 Fix Architecture test to work with Xcode 4
ppc tools are no longer available in the Xcode 4 installation.
Eliminate the use of the hard-coded 'ppc' in the test when
running on Snow Leopard or later.
2011-07-15 15:02:59 -04:00
Alex Neundorf 9dbba1b464 Fix #12342: Add APPEND_STRING option to set_property()
set_property() has APPEND, which creates a list. E.g. when
appending to COMPILE_FLAGS a string is needed, not a list.
With the APPEND_STRING option the value is append as string,
not as list.

Alex
2011-07-15 20:57:33 +02:00
Alex Neundorf 1325260a66 Add macros cmake_push/pop_check_state() as discussed on the list.
This patch adds two macros cmake_push_check_state() and
cmake_pop_check_state(), which can be used to save and restore
the contents of the CMAKE_REQUIRED_xxx variables.

Alex
2011-07-07 22:09:44 +02:00
Alex Neundorf 4a50b5f2aa Add a basic test for CMAKE_DISABLE_FIND_PACKAGE_<package>
Alex
2011-06-23 11:09:54 +02:00
Brad King cc746a6eb7 Merge topic 'library-multiarch-issue-12037'
1ed19bc multiarch: Set CMAKE_LIBRARY_ARCHITECTURE_REGEX for Linux|Hurd|kFreeBSD
52a6ed2 Test find_package multiarch support (#12037)
b41ad3b Teach find_(library|package) about Linux multiarch (#12037)
2011-06-14 13:23:51 -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 52a6ed2aed Test find_package multiarch support (#12037) 2011-06-08 10:28:20 -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
Brad King 313a633b85 Merge topic 'vs10_include_fix'
27aa446 One more try.  Use full path by default, and relative on broken compilers.
2dfc121 Use bin tree for inclues to avoid -I with spaces in the path.
6d29b4b Append and do not clobber CMAKE_CXX_FLAGS in the test.
7815e90 Fix for bug#10798.  VS10 did not append -I flags with COMPILE_FLAGS prop.
2011-06-07 14:04:00 -04:00
David Cole 51e16c05f7 BundleUtilities: Avoid test on Watcom dashboards (#12034) 2011-06-04 19:54:49 -04:00
Bill Hoffman 27aa446352 One more try. Use full path by default, and relative on broken compilers. 2011-06-03 16:16:50 -04:00
Bill Hoffman 2dfc121b89 Use bin tree for inclues to avoid -I with spaces in the path. 2011-06-03 15:05:28 -04:00
Bill Hoffman 6d29b4bfe6 Append and do not clobber CMAKE_CXX_FLAGS in the test. 2011-06-03 13:00:05 -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
Clinton Stimpson e17135e882 BundleUtilities: Add rpath to loadable modules in test. 2011-06-02 09:08:49 -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 8064044c94 BundleUtilities: Print reason for not loading module.so 2011-06-01 10:59:34 -06: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 e40b79e79f BundleUtilities: Fix test when using xcode (#12034) 2011-05-31 13:12:58 -04:00
Sean McBride a27edd8a05 Fix XCode -> Xcode typos, notably in man page (#12231) 2011-05-31 09:13:00 -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 e51bbc14f6 Merge topic 'output-compile-lines'
cdc2b41 Fix CompileCommandOutput test build on Windows
7039d1f Fix CompileCommandOutput test for Make tools not supporting spaces
4268e3d run_compile_commands: Cast istream::get() result to char
c45c60b run_compile_commands: Avoid extra stl vector conversion
7c5be51 run_compile_commands: Avoid shadow in std::map<>::at workaround
169bb05 Provide std::map<>::at for use in run_compile_commands
4e2185c Make std::map usage more portable in language=>flags/defines maps
a7e7a04 Fix run_compile_commands build on Apple GCC 3.3
c9174c0 Fix signed/unsigned comparison in EscapeJSON
8346a28 Only offer the compile command output feature on unix systems
0e6b05f Adds a test for the compile command line output.
5674844 make compile command output optional
fe07b05 implement cxx command output
65c0c24 cache flags and defines
3f064ef refactor flags and defines
2011-05-24 14:48:14 -04:00
Brad King 1605784f47 Merge topic 'absoft-fortran-compiler'
8bd3e51 Absoft: Enable FortranCInterface check in Fortran test
d7b376b Absoft: Detect implicit link libraries on Linux and Mac
ac5b999 Add Absoft Fortran compiler id and basic flags
2011-05-24 14:34:40 -04:00
Brad King 8bd3e51a1c Absoft: Enable FortranCInterface check in Fortran test
Exclude module symbol mangling because Absoft mangles with ".in." so the
symbols cannot be referenced from C.
2011-05-20 09:00:21 -04:00
Brad King d7b376b3a7 Absoft: Detect implicit link libraries on Linux and Mac
Use the "-X -v" flag to the Absoft front-end to pass "-v" to the gcc it
invokes under the hood.  Teach CMakeParseImplicitLinkInfo to exclude
linker version lines from consideration as link lines.  Fix parsing of
Sun's linker search path option "-Y..." to avoid conflict with the Mac
linker option "-Y<num>".
2011-05-20 08:57:51 -04:00
Brad King cdc2b41cc2 Fix CompileCommandOutput test build on Windows
Add dllexport markup for the shared library.
2011-05-20 08:06:35 -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
Brad King 4268e3d7e9 run_compile_commands: Cast istream::get() result to char
We perform error checking on the stream after reading so this conversion
is safe.
2011-05-19 08:02:21 -04:00
Brad King c45c60b24f run_compile_commands: Avoid extra stl vector conversion
The Sun compiler does not provide the proper vector constructor to
initialize it from an iterator pair of a non-matching type.  Extend the
ParseUnixCommandLine API to provide a vector of the proper type so no
conversion is needed.
2011-05-18 09:44:28 -04:00
Brad King 7c5be5114c run_compile_commands: Avoid shadow in std::map<>::at workaround
The map has a member called "empty" so use a different name for the
local variable in our approximate at() method.
2011-05-17 09:25:44 -04:00
Brad King 169bb05f90 Provide std::map<>::at for use in run_compile_commands
Many compilers we support do not provide the at() member of std::map.
Use the workaround added by commit a7e7a04a (Fix run_compile_commands
build on Apple GCC 3.3, 2011-05-16) for all compilers.
2011-05-17 08:56:08 -04:00
Brad King a7e7a04aaf Fix run_compile_commands build on Apple GCC 3.3
This compiler does not provide the "at" method of std::map.  Approximate
it well enough for our needs.
2011-05-16 12:05:49 -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 19a4b8856d Merge topic 'find_package-system-registry'
08b9397 find_package: Fix system package registry test path conversion
93021ad find_package: Test system package registry when possible
b95f3ca find_package: Check both 32-bit and 64-bit registry views
a0d76c1 find_package: Search a "system package registry"
549458f find_package: Document user package registry locations
c9563db find_package: Cleanup user package registry less aggressively
4df1197 find_package: Rename implementation of user package registry
2011-04-19 14:08:23 -04:00
Brad King 4d2d9d44e6 Merge topic 'add-svn-trust-cert-to-ExternalProject'
12a3699 ExternalProject: Always use --non-interactive with svn
3a5a402 ExternalProject: Add SVN_TRUST_CERT argument
2011-04-19 14:08:18 -04:00
Brad King 08b93977cf find_package: Fix system package registry test path conversion
Do not use file(TO_NATIVE_PATH) to compute the value to store in the
registry.  It is meant for constructing values to be put in shells.
Since find_package() can use the value with CMake-normalized slashes do
not bother with any conversion.
2011-04-14 09:35:21 -04:00
Brad King 93021adb73 find_package: Test system package registry when possible
Teach the FindPackagTest to try creating the appropriate HKLM system
package registry value.  If it works then add a test to verify that
find_package() reads it as expected.  Then delete the value to cleanup.
2011-04-13 14:28:00 -04:00
David Cole 3a5a402a53 ExternalProject: Add SVN_TRUST_CERT argument
Which adds --non-interactive and --trust-server-cert to the svn
checkout and update command lines. This allows ExternalProject
clients to pull from an https:// based svn server even though
the server may not have a valid or trusted certificate.

Caveat emptor: I would NOT recommend using this except as a
short-term work-around. Rather, the server should have a valid,
trusted certificate, or the client should be using "http" instead
of "https".
2011-04-11 16:34:58 -04:00
Brad King 9fc7ea4c62 find_package: Forward component list for recursive calls in modules
Some find modules call find_package recursively to locate a package
configuration file for the package instead of searching for individual
pieces.  Commit 79e9b755 (Help recursive find_package calls in modules,
2008-10-03) taught find_package to forward the version number and EXACT
arguments through the recursive call automatically.  Do the same for the
component list.
2011-04-07 15:36:05 -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 e560bf4ba3 Merge topic 'fix_vs10_object_files'
9a6ff95 Fix for bug where VS2010 did not use .obj files as part of the build.
2011-04-05 14:28:55 -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
Bill Hoffman 9a6ff95072 Fix for bug where VS2010 did not use .obj files as part of the build.
For VS2010 if a precompiled .obj file was the output of a custom commad,
it was used as part of the build.  If it was not, then VS did not
use it as part of the build.  This commit updates the test to check
for this issue, and fixes the problem. This fixes bugs #0011891 and
2011-04-01 16:28:41 -04:00
Eric NOULARD 126c993d03 Fix #11964 Handle lib64 library on Linux
The AMD64 ABI document http://www.x86-64.org/documentation/abi.pdf
does specify that 64bits binary libraries should end up in <prefix>/lib64
and 32bits ones in <prefix>/lib. All but debian based distros do so,
and some like OpenSUSE even enforce the rule when packaging with RPM
and refuse to build the RPM if this is not the case.
After some discussion (see the bug notes) we cannot do that behind
the scene and the current fix supposes that the user shall use
the CMAKE_INSTALL_LIBDIR variables content in its INSTALL rules if
he wants to put the lib in the right place. CMAKE_INSTALL_LIBDIR
shall have the appropriate value depending on the Linux distribution
found and 32/64bitness of the host.
The cross-compiling case (even 32bits compile on a 64bits host)
is not handled.
2011-03-31 14:45:48 -04:00
Clinton Stimpson 2973c1fbeb Add component support to DragNDrop generator. 2011-03-31 13:33:10 -04:00
Brad King 148b528f9d Merge topic 'custom-command-slashes'
1286050 Normalize slashes of add_custom_(command|target) DEPENDS (#11973)
2011-03-31 13:23:32 -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
Brad King 128605054a Normalize slashes of add_custom_(command|target) DEPENDS (#11973)
All commands accepting file paths should normalize the slashes so that
the string-represented names can be compared reliably.  The commands
add_library and add_executable have done this for years.  We taught
add_custom_command to normalize its OUTPUT names in commit a75a0a14
(Normalize add_custom_command OUTPUT names, 2010-12-15).  We handled a
special case of the DEPENDS option in commit 7befc007 (Handle trailing
slashes on add_custom_command DEPENDS, 2011-01-26).

Teach both add_custom_command and add_custom_target to normalize slashes
of DEPENDS files up front.  This approach subsumes the above-mentioned
special case so remove the one line added for it but keep its test.
Extend the CustomCommand test to check that slash count mismatches
between custom command OUTPUT and DEPENDS can still be linked correctly.
2011-03-30 09:52:07 -04:00
Andreas Schneider a22ed3d62d Tests: Check for the new Java exeutable variables. 2011-03-29 11:54:42 +02:00
Andreas Schneider c177c8e6b8 Tests: Java tests should test UseJava.cmake 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 4344e83fcf Merge topic 'asn_check_proto'
93c56a7 Tests: Added test for check_prototype_definition.
4f252ab Modules: Added CheckPrototypeDefinition module.
2011-03-22 14:45:51 -04:00
Brad King 685d893500 Merge topic 'fix-Java-test-enable-logic'
80ccc9a Disable Java test with Xcode generator
46c0a58 Enable Java test more carefully on Apple
2011-03-22 14:45:38 -04:00
David Cole e6c2701002 ProcessorCount: Use ERROR_QUIET with execute_process (#11302)
Also, comment out all "debugging" calls to message() that helped
us interpret the output on other platforms when running on the
dashboard clients.

Using ERROR_QUIET avoids unnecessary stderr output while calling
external tools to determine the processor count. If there's an
error parsing the output, we set the count to 0 anyhow.

Also, the test will fail on a CMake dashboard run if the count
comes back equal to 0.

Now that the code is "done"-ish, remove the debugging output.
Expect no output on stdout or stderr when calling the
ProcessorCount function from now on.
2011-03-18 14:28:24 -04: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
Andreas Schneider 93c56a7040 Tests: Added test for check_prototype_definition. 2011-03-18 14:03:37 -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 6b6f309c5f Add the FILES keyword to ctest_upload command 2011-03-15 15:07:37 -04:00
Zach Mullen 350546db3a Implement ctest_upload command 2011-03-15 15:07:37 -04:00
David Cole 4dd2ec2cb9 ProcessorCount: Test fails if count is 0 (#11302)
It also fails if count is not a decimal integer.
2011-03-15 15:07:31 -04:00
David Cole c15983690f ProcessorCount test: more output, do not fail. (#11302)
More dev work remains to be done here. Removing test failure
condition until that dev work is complete, so it does not
mask or hide other, more important failures, on the dashboard.
2011-03-15 15:07:30 -04:00
David Cole 6259bc4222 Compare ProcessorCount to SystemInformation count. (#11302)
Maximize output to gather data on the dashboards.
Only FATAL_ERROR out once at the bottom if an error
occurred earlier.
2011-03-15 15:07:30 -04:00
David Cole 3430955d5f Add ProcessorCount support for QNX via pidin. (#11302)
Thanks to Rolf Eike Beer <eike@sf-mail.de> for the code snippet
parsing the pidin output.
2011-03-15 15:07:30 -04:00
Michael Wild abbaa123aa Add module ProcessorCount.cmake (#11302)
Credit goes to David Cole ( http://www.kitware.com/blog/home/post/63 ).

Also add a script-based test of the new module.

Signed-off-by: Michael Wild <themiwi@users.sourceforge.net>
2011-03-15 15:07:30 -04:00
Brad King 9349de14c7 Merge topic 'CPackRPM-TestWithMoreTraces'
ade04de Remove debbuging typo
a201028 CPack try to please SUSE 64 bits and install lib in lib64 and not lib.
7ebbcf1 CPackRPM  non matching ENDIF
0e07b42 CPackRPM even more trace in debug mode or in case of failure
564b731 CPackRPM  add more trace output in order to help failing diagnostics
2011-03-15 14:47:38 -04:00
Eric NOULARD ade04de7ec Remove debbuging typo 2011-03-14 21:12:26 +01:00
Eric NOULARD a201028626 CPack try to please SUSE 64 bits and install lib in lib64 and not lib. 2011-03-13 21:15:49 +01: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
Eric NOULARD 564b7311f4 CPackRPM add more trace output in order to help failing diagnostics 2011-03-10 09:48:46 +01:00
Brad King 036aab093b Merge topic 'ReworkedAsmSupport'
b3ce420 Do not bother enabling C++ in Assembler test
80f6a34 Teach Assembler test to generate main.s at build time
1dafa74 Fix Assembler test to parse C flags string before using
4139a73 -only enable the asm test for the Intel compiler if we are under UNIX
1f6c6b1 -use CMAKE_C_FLAGS when generating the assembler file
d0f71e2 Add ASM platform information for HP compiler on HP
bd580be Merge branch 'hp-compiler-info' into ReworkedAsmSupport
a0bab7a Add ASM platform information for XL compiler on AIX
c03b610 Merge branch 'aix-xl-platform-info' into ReworkedAsmSupport
c623008 Initialize ASM rpath flags for executables with those for shared libs
17c658f Add support for the Intel compiler used for ASM under Windows
4258b24 Add more regex for gcc, always print the ASM compiler ID
9071b8b Add temporary debug output for compiler ID detection for ASM
48f7199 It's ELSEIF(), not ELSIF()
d103c75 Fix bad comparison in the detect assembler-code
20fe0be Only try assembler support for Makefile-based generators
8614470 Use a regexp instead a lot of ORs for checking the compiler ID
cf88092 The Assembler test now tests ASM for GNU, Intel, HP, XL and SunPro
66614a8 Add assemble- and preprocess commands for HP
78f7c59 Fix the default CMAKE_ASM_COMPILE_OBJECT, make XL-ASM use it
7456461 Change the default rules so they fit better to the new ASM handling
5542d58 Set the HP asm file suffix
f745220 Add support for ASm for the HP compiler.
00735d4 Add suport for ASM for the IBM XL compiler
d3e9e8a Add support for ASM for the SunPro compiler
64e66eb Actually use CMAKE_ASM_COMPILER for asm, instead of CMAKE_C_COMPILER
38f92bf Add ASM support for the Intel compiler
4b40d42 Rework the way assembler is handled, use the C/CXX compiler by default
2011-03-08 14:22:38 -05: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
Brad King 9c1344f33b Merge topic 'CPackArchive-PackageOrphanComponents'
fe530ff CPackArchive package all components specified in CPACK_COMPONENTS_ALL
2011-03-08 14:22:24 -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 b3ce4200dc Do not bother enabling C++ in Assembler test
This test needs only the C compiler and ASM compiler so do not enable
the C++ compiler.
2011-03-04 09:17:30 -05:00
Brad King 80f6a344fc Teach Assembler test to generate main.s at build time
Use a custom command to generate the assembly source file at build time.
Also set CMAKE_VERBOSE_MAKEFILE so the test output contains all the
build rules.  These two changes will show the entire .c -> .s -> .o and
final link commands in the test output.
2011-03-04 09:08:18 -05:00
Brad King 1dafa7498f Fix Assembler test to parse C flags string before using
Commit 1f6c6b1c (use CMAKE_C_FLAGS when generating the assembler file,
2011-03-03) added use of CMAKE_C_FLAGS to the assembler generation step.
However, this variable is meant for direct substitution into a shell
command line so we need to parse it to separate the arguments first.
2011-03-04 08:59:56 -05: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
Alex Neundorf 4139a734fa -only enable the asm test for the Intel compiler if we are under UNIX
...have to find out how to generate assembler with icl.exe

Alex
2011-03-03 23:02:12 +01:00
Alex Neundorf 1f6c6b1cc2 -use CMAKE_C_FLAGS when generating the assembler file
Alex
2011-03-03 22:56:57 +01:00
Eric NOULARD fe530ff5e9 CPackArchive package all components specified in CPACK_COMPONENTS_ALL
When asking for group packaging the components not belonging to
any group should be packaged separately.
2011-03-03 21:19:13 +01: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 c03b610c0a Merge branch 'aix-xl-platform-info' into ReworkedAsmSupport 2011-03-02 13:47:11 -05:00
Brad King 1eca67e12d Merge topic 'fix-11286-add-file-upload'
61a83f9 Fix KWStyle line too long error (#11286)
963bebc Implement file(UPLOAD (#11286)
2011-03-01 15:30:28 -05:00
Brad King b5b4aa2f71 Merge topic 'CPack-ChangeComponentNamingScheme'
3fb89cf CPack remove previously CPack generated files (if any) before running CPack
f2ab270 CPack  fix KWStyle warning
4deb308 CPack Authorize DISPLAY_NAME usage in component package
8c450f6 CPack remove "-ALL" suffix for ALL-IN-ONE packages
2011-03-01 15:30:14 -05:00
Alex Neundorf 20fe0beb7e Only try assembler support for Makefile-based generators
Alex
2011-03-01 21:19:39 +01:00
David Cole 963bebcc17 Implement file(UPLOAD (#11286)
Including documentation and testing, of course.
2011-02-25 17:26:34 -05:00
Alex Neundorf 861447097c Use a regexp instead a lot of ORs for checking the compiler ID
Alex
2011-02-24 20:56:53 +01:00
Brad King 307bdadadc Merge topic 'mingw-module-definition'
6c4b249 Fix Fortran test .def file symbol mangling
7616216 Pass .def files directly to MinGW tools (#9997)
2011-02-24 08:30:26 -05:00
Eric NOULARD 3fb89cf8bd CPack remove previously CPack generated files (if any) before running CPack 2011-02-24 00:49:11 +01:00
Alex Neundorf cf8809203a The Assembler test now tests ASM for GNU, Intel, HP, XL and SunPro
Alex
2011-02-23 21:30:27 +01:00
Brad King 6c4b249272 Fix Fortran test .def file symbol mangling
Commit 6a61a8a5 (Honor module .def files with MinGW tools, 2011-02-21)
enabled use of .def files with GNU tools on Windows.  Previously the
Fortran tests's world.def file was used only for the Intel Fortran
Compiler on Windows and contained the symbol name mangled for that
compiler.  Instead choose a .def file that names the symbol with proper
mangling for the compiler in use.
2011-02-23 11:05:14 -05: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 cbc5e31f86 Merge topic 'resolve/add-STRING-subcommand-FIND-issue-11795/fix-2828-more-info-in-script-mode'
1a8eed1 Merge branch 'add-STRING-subcommand-FIND-issue-11795' into fix-2828-more-info-in-script-mode
006124b Avoid direct use of std::stringstream
8a8da36 Merge branch 'fix-2828-more-info-in-script-mode' into add-STRING-subcommand-FIND-issue-11795
1462561 Add a string(FIND) sub-command (#11795)
2011-02-22 14:32:55 -05:00
Brad King 6250c7324f Merge topic 'fix-2828-more-info-in-script-mode'
a58ace6 Fix KWStyle line-too-long complaint (#2828)
106958c Add CMAKE_ARGC and CMAKE_ARGV0..N-1 variables (#2828)
94d1684 Add CMAKE_SCRIPT_MODE_FILE variable (#2828)
2011-02-22 14:32:48 -05:00
Brad King f556773f01 Merge topic 'fix-11761-less-file-download-noise'
667cf5b Make file DOWNLOAD less noisy (#11761)
2011-02-22 14:32:01 -05:00
Brad King 542f45f452 Merge topic 'custom-command-slashes'
88548a4 Handle relative WORKING_DIRECTORY in add_custom_(command|target)
7befc00 Handle trailing slashes on add_custom_command DEPENDS
2011-02-22 14:31:12 -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 377ed8e764 Merge topic 'fix-11526-mac-remove-carbon-refs'
0037dcb Removed most usage of Carbon in favour of CoreFoundation
2011-02-22 14:30:12 -05:00
Brad King 37e4b034d4 Merge topic 'eliminate-unnecessary-test-isms'
a6a21c8 Tests: Eliminate unnecessary files and variables.
2011-02-22 14:30:05 -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
Brad King 8a8da3694b Merge branch 'fix-2828-more-info-in-script-mode' into add-STRING-subcommand-FIND-issue-11795
Conflicts:
	Tests/CMakeTests/StringTestScript.cmake
2011-02-15 13:48:37 -05:00
Tim Hütz 1462561a8c Add a string(FIND) sub-command (#11795) 2011-02-15 13:17:51 -05:00
David Cole 667cf5b963 Make file DOWNLOAD less noisy (#11761)
Thanks to Daniel Nelson for the suggestion and the patch.
2011-02-09 13:22:32 -05:00
David Cole 94d1684a8f Add CMAKE_SCRIPT_MODE_FILE variable (#2828)
New CMake variable is set when processing a -P script file,
but not when configuring a project.
2011-02-02 18:18:14 -05:00
Sean McBride 0037dcb6af Removed most usage of Carbon in favour of CoreFoundation 2011-01-31 18:21:20 -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
David Cole a6a21c85ed Tests: Eliminate unnecessary files and variables.
1: The CTestTestFailedSubmits tests do not need to run the
   CTEST_MEMCHECK command. It is covered by the CTestTest2
   test. If more coverage *is* required, choose a test that
   runs by itself once to add it to... This one gets used
   several times in a loop to test submission failure via
   the various submission protocols. With memchecking on,
   each test here takes 1000 seconds or more on a "fast"
   build...

2: Other ctest tests do not need any of the CTEST_MEMORYCHECK_*
   variables defined. They don't even call CTEST_MEMCHECK, or
   -D NightlyMemCheck, or anything. So: remove the unnecessary
   set calls.

3: CTestTest3 has gone intentionally unused for months because
   it did not add any coverage and caused no ends of sporadic
   randomish failures when network connectivity was spotty.
   Remove its directory. Never add it again.
2011-01-28 14:58:04 -05:00
Brad King ecfe0f7ca8 Merge topic 'fix-11695-spaces-in-vs10-rc-defs'
008d116 VSResource: Avoid windres /D with quoted spaces (#11695)
8f9919d Avoid space in rc /D values for VS6 and Cygwin (#11695)
78fe97f Fix line too long KWStyle issue (#11695)
6627560 VS10: Escape double quote chars in defines for rc files (#11695)
2011-01-28 14:17:54 -05:00
Brad King ba718fb827 Merge topic 'avoid-purify-in-CTestTest2'
2b082aa CTestTest2: Avoid running purify unless requested
2011-01-28 14:17:44 -05: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
David Cole 008d116b17 VSResource: Avoid windres /D with quoted spaces (#11695)
Improve test: print out what's happening along the way.
2011-01-27 18:28:36 -05:00
Brad King 182eb7c7ef Merge topic 'dev/strict-mode'
dd2f814 Merge branch 'dev/add_test-working-directory' into dev/strict-mode
949d32c Unwatch manual variables upon removal in cmake-gui
3939032 Unwatch manual variables upon removal in ccmake
8354413 Add method to unwatch a manual variable
8ed3c85 Give a better message for unused variables
729db48 Fix ArgumentExpansion test expected results
89c2544 Checking for a definition is a usage
5625dee Don't output to stderr in the GUI
ad25a96 Merge branch 'ImprovedDotSupport2' into dev/strict-mode
c128abe Merge branch 'AddCMAKE_CURRENT_LIST_DIR' into dev/strict-mode
9bcaff0 Merge branch 'cmake-guiRememberAdvancedCheckbox' into dev/strict-mode
544d0c3 Fix expected output for WarnUninitialized test
4e3bea4 Update expected messages to new format
8e8c9e4 Don't check at destruction for usage
668e005 Use cmake::IssueMessage for warnings
88cd4c1 Use 'CMake Warning' versus 'warning' for CDash
3c3b98d Initialize the class before setting warn flags
cf8b15a Ignore files under the CMakeFiles directory
fd50f06 Don't check for unused vars at configure time
447a04c Don't warn during configure when doing everything
b97ee21 Check for unused variables at the end of generate
c18c977 When checking for variables, specify a reason
3f1121f Use a long int since Line is a long as well
2507f93 Change the failure case string to 'Unexpected'
fe390a2 Add 'ArgumentExpansion' test
8dbb209 Wrong boolean value for CLI warnings
d4ee998 Hard-code the --no-warn-unused-cli flag
a267b99 Fix line lengths
82ed104 Flag that the directories have been set
5aa535b Add argument to arg parsing to not set directories
367e5c3 Revert "Revert "When calling CMake, set the args and the cache""
ab5d4e4 Revert "When calling CMake, set the args and the cache"
9b90040 When calling CMake, set the args and the cache
fe56002 Fix long lines for KWStyle
5d30cfc Set a watch on variables added through the gui
33c63b1 Add a method to put a watch for variables
535253f Initialize the warning variables earlier
cbb286c Fix the path detection to work for top-level
62be1f7 Initialize the usage stack earlier
c6e7fab Factor out the checks for unused variables
5e41ba8 When using the API, check for Add vs. Remove
dee1976 Fix typo in VariableUnusedViaUnset test
f231ce5 Remove old false positive avoidance code
a117e02 Revert "Add test for unused warnings at the end of scope"
2c82f2b Exempt CMAKE(CURRENT|PARENT)_LIST_FILE from usage
6d7d449 Ignore CLI warnings for ABI determination
7740a73 Only return local keys that are defined
bef3aee Use the API so that warnings can be tracked
05cb0f4 Check for unused variables in the dtor
91c4c99 Add test for unused warnings at the end of scope
ca90f67 Fix detection of unused variables when setting
f7438ca Add test for unused detection via setting it
995cfb0 Don't warn if the variable wasn't defined
aefc91d Add test for usage checks via unset
a8e97f8 Remove VarRemoved code since it's been superceded
59463ef Rework CheckVariableForUnused usage
f117423 Fix line lengths to be no more than 78
e49a935 Improve unused warning logic
e01e40c Mark ARGC, ARGV*, and ARGN as used
a17aff7 Ignore CMAKE_MATCH_* variables for usage
02a114d Add method to allow variables to be marked as used
a0b0d23 CMAKE_DO_TRY_COMPILE is no longer used
ae3eff3 Fix the path used for ignoring system warnings
056b441 Fix missing case for usage of a variable
980e048 Factor out checks for unused variables
83acb0a Remove now unused variables
3801463 Use built-ins for readability and maintainability
8b52015 Push the initialize and unused states when copying
439877f Be consistent with single and double quotes
4cf1706 Add documentation for check-system-vars
b74777f Fix the spelling of the flag for warn-unused-vars
b948120 Change logic of flag to turn off cli unused checks
f047a17 Add test for uninitialized variables
75bda38 Add tests for unused command line variables
300fc15 Fix detection of system files
d784e6a Run the unused variables check on the final pass
9efc057 VariableWatch is not available when bootstrapping
2e78224 Add a missing comma to the warning message
7499700 Add a flag to warn about system files
fff9f6d Rename flags again and use variablewatch for cli
786e269 Add warn-unused to the Qt interface
636e6c4 Default to marking things as used
4ff0340 Rename find-unused to warn-unused
d7999e9 Rename strict-mode to warn-uninitialized
e141bc9 Detect unused variables
d3e8eb5 Add flags to detect unused variables
f332e14 Complete strict-mode checks for uninitialized vars
52f9637 Add method to get the local scope variables
f794d58 Make --strict-mode option, and integrate with cmake-gui
48b5b85 Add a warning when variables are used uninitialized.
cd626ea For macros make sure the FilePath points to a valid pointer in the args.
2011-01-27 15:34:07 -05:00
Brad King dd2f81491e Merge branch 'dev/add_test-working-directory' into dev/strict-mode
Conflicts:
	Tests/CMakeLists.txt
2011-01-27 14:39:55 -05:00
David Cole 2b082aa353 CTestTest2: Avoid running purify unless requested 2011-01-27 14:36:14 -05:00
Brad King 88548a45fb Handle relative WORKING_DIRECTORY in add_custom_(command|target)
This also fixes handling of trailing slashes in the directory name.
2011-01-26 18:02:02 -05:00
Brad King 7befc00783 Handle trailing slashes on add_custom_command DEPENDS 2011-01-26 18:01:33 -05:00
Alex Neundorf ccbdc24ae1 Make cmake build again with cmake < 2.6.3
cmake_minimum_required() still says 2.4.5, but in Tests/CMakeLists.txt
there was a parenthesis expression, which is new since 2.6.3.

Alex
2011-01-26 21:52:22 +01:00
Brad King 0159424fda Merge topic 'dev/add_test-working-directory'
d94f9c6 Only set the property if the property was given
b6c302b Default the working dir to the current binary dir
0594287 Add more tests for WorkingDirectory for tests
2011-01-26 15:23:05 -05:00
David Cole 8f9919d93c Avoid space in rc /D values for VS6 and Cygwin (#11695)
Change to the test only. Using a space in an rc /D value will
not work at present with VS6 or Cygwin rc compilers.
2011-01-26 08:26:31 -05:00
David Cole 662756036e VS10: Escape double quote chars in defines for rc files (#11695)
To get rc defines to work in the VS10 IDE requires \" when
constructing PreprocessorDefinitions strings. This is different
than defines for cl.

Also, per-file rc defines were not being generated. Fix that, too.
2011-01-25 19:01:13 -05:00
Ben Boeckel 0594287606 Add more tests for WorkingDirectory for tests 2011-01-20 13:47:53 -05:00
Brad King 6c075284f6 Merge topic 'test-SubDirSpaces-workaround-gnu-make-3.82'
19cb2ca Disable SubDirSpaces parens with GNU Make 3.82 (#11654)
2011-01-19 14:28:05 -05:00
Brad King ab8ea7c413 Merge topic 'resolve/mingw-cross-compile-resources/honor-explicit-zero-timeout'
aeb6cd8 Merge branch 'honor-explicit-zero-timeout' into resolve/mingw-cross-compile-resources/honor-explicit-zero-timeout
20d87c8 Teach Simple_Mingw_Linux2Win test to use windres
2011-01-19 14:03:41 -05:00
Brad King 7af41c3492 Test that missing source mentions directory (#11677)
Teach the MissingSourceFile test to verify that the directory portion of
a missing source file is mentioned in the error message.
2011-01-15 08:16:50 -05:00
Brad King aeb6cd8a89 Merge branch 'honor-explicit-zero-timeout' into resolve/mingw-cross-compile-resources/honor-explicit-zero-timeout
Conflicts:
	Tests/CMakeLists.txt
2011-01-14 10:44:41 -05:00
Brad King 20d87c8026 Teach Simple_Mingw_Linux2Win test to use windres
This test was broken by commit b2f308c8 (Add support for windows
resources with mingw/msys, 2010-12-22) because the test does not set a
resource compiler which is now required on MinGW for the 'RC' language.
Use windres as the resource compiler for the test.
2011-01-14 10:22:15 -05:00
Brad King 729db484ef Fix ArgumentExpansion test expected results
Teach the ArgumentExpansion test to expect flattened lists as has always
been the case in the CMake language.  Now that the test should pass
enable the failure regex even when CMAKE_STRICT is not on.  Replace the
reference to the old ArgumentExpansion test behavior in the workaround
comment in cmMakefile::TryCompile with a full inline explanation.
2011-01-11 17:10:28 -05:00
David Cole cabc407912 CFBundle Test: Add PATHS for finding Rez (#11295)
Some older dashboard machines do not have Rez in /usr/bin
like us modern folk. But most of them will have it in
/Developer/Tools... So make sure we look there.
2011-01-11 16:48:37 -05:00
Brad King 7decc70eea Merge topic 'build_nightly_from_nightly_branch'
faf1c1e Change the nightly tests to build from the nightly branch and not next.
2011-01-11 15:52:52 -05:00
Brad King 9a81f0dd0c Merge topic 'ep-fix-substitutions'
d67a513 ExternalProject: Replace location tags in CMAKE_CACHE_ARGS
d7a87b5 Merge branch 'ep-log-output-under-vs' into ep-fix-substitutions
2011-01-11 15:52:36 -05:00
Brad King 764015c284 Merge topic 'policy-CMP0017'
ce28737 Remove usage of CMAKE_CURRENT_LIST_DIR now that we have CMP0017
7db8db5 Improve documentation and messages for the new CMP0017
db44848 Prefer files from CMAKE_ROOT when including from CMAKE_ROOT
1e69c6f Merge branch 'user-policy-defaults' into policy-CMP0017
65a0a2a Merge branch 'include-command-whitespace' into policy-CMP0017
2011-01-11 15:52:13 -05:00
Brad King d4ed72e3bb Merge topic 'user-policy-defaults'
a364daf Allow users to specify defaults for unset policies
8e45c11 Fix indentation in cmPolicies::ApplyPolicyVersion()
2011-01-11 15:52:07 -05:00
Brad King af94289f5a Merge topic 'fix-11461-add-midl-vs10'
e33cbda VSMidl Test: Use correct include_directories with VS6 (#11461)
262da91 Prohibit space in HOME value for VSMidl test.
13caaa3 VS10: Finish Midl support (#11461)
2011-01-11 15:51:08 -05:00
David Cole 5a9e8e701e CPack: Add CPACK_NSIS_INSTALL_ROOT variable (#9148)
Control the root directory of the default directory presented to
the end user of an NSIS installer by a CPack variable.

Previously, the value used in the NSIS script was $PROGRAMFILES,
which is equivalent to the "ProgramFiles" environment variable.
That default value is still the same, but now a project may
override the value by setting this new variable.
2011-01-11 15:42:42 -05:00
David Cole 42b26ee5db ExternalProject Test: Increase test timeout value
Previously, it was hard-coded at 1000 seconds. Now it uses
the value of CMAKE_LONG_TEST_TIMEOUT, which has a minimum
value of 1500 seconds, but might have a longer value depending
on the CTEST_TEST_TIMEOUT value of the driving dashboard.

This should help avoid test failures on overloaded dashboard
machines where it really does take that long to finish the
test successfully.
2011-01-11 15:24:50 -05:00
Richard Bateman 5457b8254c Add support for CFBundle targets on the Mac (#11295)
This commit enables building, for example, plugin bundles
to be loaded by web browsers.
2011-01-11 12:54:44 -05:00
Brad King 19cb2ca47f Disable SubDirSpaces parens with GNU Make 3.82 (#11654)
GNU Make 3.82 incorrectly parses make dependencies involving parentheses
in path names.  See related upstream issue:

  http://savannah.gnu.org/bugs/?30612

Skip testing the ()-named subdirectory.
2011-01-11 10:01:30 -05:00
David Cole 1bbe4e6917 CPack: Detect more URLs in CPACK_NSIS_MENU_LINKS (#10644)
Previously, only strings containing "http:" qualified as
URLs when found in CPACK_NSIS_MENU_LINKS. Now, we use a
regex to detect strings beginning with any of the following:

  ftp://
  ftps://
  http://
  https://
  news://
  mailto:

This commit also moves the caller of CreateMenuLinks outside
the "if (cpackPackageExecutables)" block, allowing clients to
use CPACK_NSIS_MENU_LINKS without also having CPACK_PACKAGE_EXECUTABLES
defined. That bit of this commit fixes the remainder of the
issue described in http://public.kitware.com/Bug/view.php?id=7828

Also, added a set(CPACK_NSIS_MENU_LINKS ...) to the CPackComponents
test to enable verifying that all of this actually works.
2011-01-07 14:24:04 -05:00
Bill Hoffman faf1c1e49f Change the nightly tests to build from the nightly branch and not next.
This will make sure that the nightly test matches the dashboard nightly section.
When it was next, it used next from when the test was run.
2011-01-07 13:50:36 -05:00
David Cole d67a513447 ExternalProject: Replace location tags in CMAKE_CACHE_ARGS
When we added CMAKE_CACHE_ARGS, we did not try it with any
<SOURCE_DIR> or <INSTALL_DIR> references. This commit fixes
that accidental omission.
2011-01-07 08:04:16 -05:00
David Cole e33cbda5c4 VSMidl Test: Use correct include_directories with VS6 (#11461)
VS6 builds put midl output directly in CMAKE_CURRENT_BINARY_DIR.
Adjust test include_directories to match. Fixes test failure
on dashboard machine DASH3.
2011-01-06 09:12:20 -05:00
David Cole 262da91e26 Prohibit space in HOME value for VSMidl test.
Some Windows machines actually define HOME in their
environment. And some of them actually put a directory
with a space in the name as the value.

Make sure the HOME value (CMake variable) in this CMakeLists
file does not contain a space.
2011-01-05 11:30:12 -05:00
David Cole 13caaa3eb7 VS10: Finish Midl support (#11461)
This commit addresses all of the following:
  http://public.kitware.com/Bug/view.php?id=8165
  http://public.kitware.com/Bug/view.php?id=10687
  http://public.kitware.com/Bug/view.php?id=11311
  http://public.kitware.com/Bug/view.php?id=11461

With this commit, the midl support for VS10 is as
complete as midl support ever was for VS9 and earlier.
The VSMidl test should run on all Visual Studio
generator based dashboards.

CMake no longer sends C++ compiler /D flag values
to the midl compiler in Visual Studio generated
projects. I think if we want to add that in the
future, we should add a way to pass midl compiler
specific flags and perhaps an optional way to add
in the C++ definitions, too. For now, not sending
them along gets past the immediate problem wherein
idl files in a CMake VS generated project just didn't
work at all.

The VSMidl test added in this commit was inspired by
the patch attached to 8165.

The test had to be modified such that it will run in
a directory whose name contains no spaces. There is an
existing bug filed against VS10's midl asking Microsoft
to fix that problem. But for now, the test added in this
commit works by copying the source directory to a location
that avoids spaces in the directory names.

Inspired-By: Robert Lenhardt
2011-01-05 10:37:14 -05:00
Brad King d04e10dd7e Merge topic 'negative-test-costs'
6b0c7de Support explicitly set test costs in non-parallel testing.
2011-01-04 15:46:16 -05:00
Brad King 70950edde0 Merge topic 'honor-explicit-zero-timeout'
51bb493 Test TIMEOUT property explicitly set to zero should be honored
2011-01-04 15:46:07 -05:00
Brad King 45b61209f9 Merge topic 'vs-force-multiple-include'
b29eadd Map multiple /FI flags for VS < 10 (#11649)
2011-01-04 15:45:51 -05:00
Brad King 2bb193a7f2 Merge topic 'dev/add_test-working-directory'
6529d7f Pass the expected value as the first argument
2011-01-04 15:45:41 -05:00
Brad King fff676d8cd Merge topic 'make-install-test-serial'
bce24e1 Avoid running CMake.Install test simultaneously with other tests
2011-01-04 15:45:14 -05:00
Brad King cc6ae138d9 Merge topic 'add-trilinos-contract-test'
8113621 Establish pass criteria for the Trilinos contract test.
7348561 Use m prefix in shorttag value to indicate "md5 of tarball"
c8ac930 Add contract test for Trilinos 10.6.1 snapshot.
2011-01-04 15:44:18 -05:00
Brad King 3556ab9f72 Merge topic 'add_support_for_windres'
971692c Build enable_language command during bootstrap
960ace1 Add testing for windows resources for mingw/msys/cygwin and remove for watcom.
060d6e8 Add support for windres to cygwin.
b2f308c Add support for windows resources with mingw/msys.
2011-01-04 15:44:07 -05:00
Brad King f1d7a5600f Merge topic 'add_preprocessor_def_vs2010_resources'
8c7b19d Only run resource test for MSVC compilers.
753e208 Disable incremental testing for this test, it crashes vs9 linker.
16e7d4b Add flags to resource builds on vs 2010 with a test.
2011-01-04 15:44:01 -05:00
Alex Neundorf 7db8db5b72 Improve documentation and messages for the new CMP0017
This patch incorporates the comments from Brad:
-some improvements to the documentation of CMP0017
-make the test QUIETLY search for zlib
2011-01-04 08:19:33 -05:00
Alex Neundorf db44848f44 Prefer files from CMAKE_ROOT when including from CMAKE_ROOT
This patch makes include() and find_package() prefer cmake files
located in CMAKE_ROOT over those in CMAKE_MODULE_PATH.
This makes sure that the including file gets that file included
which it expects, i.e. the one from cmake with which it was tested.
It only changes behaviour when such an included file exists both
in CMAKE_MODULE_PATH and in CMAKE_ROOT.
This comes together with a new policy CMP0017, with default
behaviour it behaves as it always did, but warns.
With NEW behaviour it includes the file from CMAKE_ROOT
instead from CMAKE_MODULE_PATH. This fixes (if CMP0017 is set)
building KDE 4.5 with cmake >= 2.8.3.
Also a basic test for this policy in included.
2011-01-04 08:06:20 -05:00
Brad King a364daf1fd Allow users to specify defaults for unset policies
Check CMAKE_POLICY_DEFAULT_CMP<NNNN> for a default when policy CMP<NNNN>
would otherwise be left unset.  This allows users to set policies on the
command line when the project does not set them.  One may do this to
quiet warnings or test whether a project will build with new behavior
without modifying code.  There may also be cases when users want to
build an existing project release using new behavior for policies
unknown to the project at the time of the release.
2011-01-04 07:46:10 -05:00
Zach Mullen 51bb493574 Test TIMEOUT property explicitly set to zero should be honored 2011-01-03 14:41:25 -05:00
Zach Mullen 6b0c7ded57 Support explicitly set test costs in non-parallel testing. 2011-01-03 11:25:46 -05:00
Brad King b29eadd8f3 Map multiple /FI flags for VS < 10 (#11649)
The /FI flag may be repeated so the flag table entry needs to be marked
with SemicolonAppendable.  This was already the case for VS 10.
2011-01-03 10:02:16 -05:00
Ben Boeckel 6529d7f67e Pass the expected value as the first argument
When the path has regular expression special characters, the
PASS_REGULAR_EXPRESSION value can fail to compile.
2011-01-03 08:39:22 -05:00
David Cole bce24e14b8 Avoid running CMake.Install test simultaneously with other tests 2010-12-31 09:18:52 -05:00
Brad King 97c5171d6c Merge topic 'dev/add_test-working-directory'
667a90a Fix sentence break in add_test documentation
96309fc Make TestsWorkingDirectory test a C file
a4a5e37 Use iostream to make Borland happy
cfe53cd Fully specify the path to old-signature add_test
017d4e9 Group adding tests with its properties
561cc33 Only test the default cwd with Makefiles
d87bae7 Simplify the _default_cwd derivation
992c74f Use --><-- markers to denote the path
5249551 Flip slashes around on Windows
0a014da Add ctype.h include for toupper()
af12f83 Fix header includes for C++ and Visual Studio
5597aa2 Rename the project to match the test
9bf4165 Add tests for WORKING_DIRECTORY arg to add_test
42de5d0 Add WORKING_DIRECTORY argument to add_test
7679f9f Rename WorkingDirectory test
d95f817 Add the WORKING_DIRECTORY property to tests
2010-12-28 15:25:49 -05:00
David Cole 81136214f3 Establish pass criteria for the Trilinos contract test.
Add a ValidateBuild.cmake script that runs after the Trilinos
dashboard run is complete. In that script, look for some expected
Trilinos executable files. Run the basic Teuchos unit tests
executable and expect it to return 0 for no errors.

Also, patch the main CMakeLists.txt file to get rid of new warnings
from CMake when variables passed in on the command line go
un-referenced in the CMakeLists processing.
2010-12-28 11:27:56 -05:00
Bill Hoffman 960ace1e0b Add testing for windows resources for mingw/msys/cygwin and remove for watcom.
This commit should test windows resources on all platforms where they are
supported now.
2010-12-28 10:58:20 -05:00
David Cole 73485615b2 Use m prefix in shorttag value to indicate "md5 of tarball" 2010-12-28 08:53:04 -05:00
Bill Hoffman 8c7b19d35e Only run resource test for MSVC compilers. 2010-12-22 16:14:37 -05:00
Bill Hoffman 753e208285 Disable incremental testing for this test, it crashes vs9 linker.
On windows 7 64 bit, the vs9 linker will crash when linking an
application with a resource in it.
2010-12-22 15:40:53 -05:00
Brad King bc92c84231 Merge topic 'resolve/tests-if-CYGWIN'
853de2e Merge branch 'custom-command-generator-expressions' into resolve/tests-if-CYGWIN
d89e238 Cygwin: Fix tests to check CYGWIN instead of WIN32
2010-12-21 14:05:53 -05:00
Brad King 31b0657e7d Merge topic 'custom-command-generator-expressions'
4499d50 Mark CustomCommand test perconfig.out as SYMBOLIC
f0cdb60 Introduce "generator expression" syntax to custom commands (#11209)
4749e4c Record set of targets used in cmGeneratorExpression
ef9e9de Optionally suppress errors in cmGeneratorExpression
45e1953 Factor per-config sample targets out of 'Testing' test
4091bca Factor generator expression docs out of add_test
bfb7288 Record backtrace in cmCustomCommand
2010-12-21 14:03:24 -05:00
Brad King 2031b6a9f3 Merge topic 'vs2010_header_only_fix'
f578381 Fix vs2010 project generation error when HEADER_FILE_ONLY is set.
2010-12-21 14:01:38 -05:00
Brad King d89514f190 Merge topic 'CheckCCompilerFlag-strict-prototypes'
b3efdb5 CheckCCompilerFlag: Strict signature of 'main' (#11615)
2010-12-21 13:58:57 -05:00
Brad King 7a7a2cbd31 Merge topic 'ctest-depend-cycle'
1f7133c CTest: Fix line-too-long style in DEPEND cycle error
f48d3bc CTest: Fix test DEPEND cycle detection
2010-12-21 13:58:21 -05:00
Brad King b78fb879b4 Merge topic 'CPack-AddMoreTests'
86979e4 Change cpack run and verify script to work with multi-config generators.
cdf92c9 Precise the project config type when invoking cpack
08f829b Arrange output in a better way
58bd4f2 CPackTest spit out more output in case of failure
dd2a5aa CPack  Default component test for ZIP should be OK
88b7f42 CPack new tests for component install
2010-12-21 13:57:59 -05:00
Bill Hoffman 16e7d4ba2c Add flags to resource builds on vs 2010 with a test. 2010-12-21 09:20:57 -05:00
Bill Hoffman f578381e66 Fix vs2010 project generation error when HEADER_FILE_ONLY is set.
In vs2010 a bad project file could be generated if a .c or .cxx file
was marked with HEADER_FILE_ONLY, if it was in a library that contained
both c and c++ code.  This fixes the error in the code, and adds a test
for this case.
2010-12-20 15:25:16 -05:00
Brad King 4499d50ad2 Mark CustomCommand test perconfig.out as SYMBOLIC
The custom command with this output does not actually create the file,
so mark it as SYMBOLIC.
2010-12-20 12:09:23 -05:00
Ben Boeckel 96309fc6e2 Make TestsWorkingDirectory test a C file 2010-12-17 12:34:20 -05:00
Ben Boeckel a4a5e37568 Use iostream to make Borland happy
It seems as though cstdio doesn't bring in stdio.h with the Borland
compilers.
2010-12-17 11:07:40 -05:00
Ben Boeckel cfe53cddbd Fully specify the path to old-signature add_test 2010-12-17 11:07:19 -05:00
Ben Boeckel 017d4e9d2c Group adding tests with its properties 2010-12-17 11:06:59 -05:00
Brad King ad25a968b9 Merge branch 'ImprovedDotSupport2' into dev/strict-mode
Conflicts:
	Source/cmake.cxx
2010-12-17 10:32:01 -05:00
Brad King c128abe383 Merge branch 'AddCMAKE_CURRENT_LIST_DIR' into dev/strict-mode
Conflicts:
	Source/cmMakefile.cxx
2010-12-17 10:31:41 -05:00
Brad King 9bcaff02ff Merge branch 'cmake-guiRememberAdvancedCheckbox' into dev/strict-mode
Conflicts:
	Source/QtDialog/CMakeSetupDialog.cxx
2010-12-17 10:31:19 -05:00
Ben Boeckel 561cc3359c Only test the default cwd with Makefiles
XCode and Visual Studio generators can run from
${EXECUTABLE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE} and determining this at
testing time is not feasible without adding in more
PASS_REGULAR_EXPRESSION's which may create false positives.

Since the parsing code is in cross-platform, generator-agnostic  code,
if it passes with Makefiles, it should work with other generators on
other platforms.
2010-12-17 10:24:14 -05:00
Ben Boeckel d87bae7f74 Simplify the _default_cwd derivation 2010-12-17 10:23:54 -05:00
Ben Boeckel 992c74f3e0 Use --><-- markers to denote the path 2010-12-17 10:23:24 -05:00
Brad King 853de2ed12 Merge branch 'custom-command-generator-expressions' into resolve/tests-if-CYGWIN
The tests-if-CYGWIN topic made a change to Tests/Testing/CMakeLists.txt
in code that the custom-command-generator-expressions topic moved to the
Tests/PerConfig/CMakeLists.txt file.  Make the same change to the same
content in the new file.  (Only a small part of the file moved so rename
detection did not do this automatically.)
2010-12-17 10:07:19 -05:00
Brad King d89e238e6c Cygwin: Fix tests to check CYGWIN instead of WIN32
Use "UNIX AND NOT CYGWIN" to detect a "soname" platform.
Use "WIN32 OR CYGWIN" to detect a "DLL" platform.
2010-12-17 09:46:24 -05:00
Ben Boeckel 5249551f9f Flip slashes around on Windows 2010-12-17 09:45:39 -05:00
Ben Boeckel 0a014dab5c Add ctype.h include for toupper() 2010-12-17 09:23:59 -05:00
Ben Boeckel af12f83d80 Fix header includes for C++ and Visual Studio 2010-12-17 09:14:25 -05:00
Ben Boeckel 5597aa24f1 Rename the project to match the test 2010-12-16 17:29:19 -05:00
Ben Boeckel 9bf4165437 Add tests for WORKING_DIRECTORY arg to add_test 2010-12-16 16:50:48 -05:00
Ben Boeckel 7679f9fab0 Rename WorkingDirectory test 2010-12-16 16:50:47 -05:00
Rolf Eike Beer d95f817f77 Add the WORKING_DIRECTORY property to tests 2010-12-16 16:23:18 -05:00
Brad King 92199485c0 Merge topic 'custom-command-slashes'
a75a0a1 Normalize add_custom_command OUTPUT names (#10485)
2010-12-16 14:00:00 -05:00
Brad King 72163de0a5 Merge topic 'NAG-Fortran'
09d1c10 FortranCInterface: Recognize NAG Fortran module symbols
af2ad90 Add NAG Fortran compiler information files
24cc3d4 Recognize the NAG Fortran compiler
83892c4 Allow Fortran platform files to set empty values
fe3f878 Detect object files in implicit link information
2010-12-16 13:59:52 -05:00
Brad King b3efdb58d5 CheckCCompilerFlag: Strict signature of 'main' (#11615)
Use "int main(void)" instead of just "int main()" so that compiling with
"gcc -Werror=strict-prototypes" works.  Test this check using the flags
"-Werror -Wstrict-prototypes" to work with old GCC versions.
2010-12-16 13:34:54 -05:00
Brad King f48d3bc5ba CTest: Fix test DEPEND cycle detection
A cycle exists when the DFS returns to the root node, not just when
multiple paths lead to the same node.

Inspired-By: Alexander Esilevich <aesilevich@pathscale.com>
2010-12-15 16:49:34 -05:00
Brad King f0cdb6001b Introduce "generator expression" syntax to custom commands (#11209)
Evaluate in the COMMAND arguments of custom commands the generator
expression syntax introduced in commit d2e1f2b4 (Introduce "generator
expressions" to add_test, 2009-08-11).  These expressions have a syntax
like $<TARGET_FILE:mytarget> and are evaluated during build system
generation.  This syntax allows per-configuration target output files to
be referenced in custom command lines.
2010-12-15 14:53:48 -05:00
Brad King 45e1953c40 Factor per-config sample targets out of 'Testing' test
Put the source files, build rules, and test scripts for these targets
under Tests/PerConfig and refer to it from Tests/Testing as a
subdirectory.  The targets and scripts will be useful in other tests.
2010-12-15 14:53:33 -05:00
Brad King a75a0a1448 Normalize add_custom_command OUTPUT names (#10485)
Previously the OUTPUT arguments of add_custom_command were not
slash-normalized but those of add_library and add_executable were.
This caused the example

  add_custom_command(OUTPUT a//b.c ...)
  add_library(... a//b.c ...)

to fail at build time with "no rule to make a/b.c".  Fix this and modify
the CustomCommand test to try it.
2010-12-15 08:44:57 -05:00
Brad King 2d1aa4ad06 Merge topic 'dev/support-substring-negative-indices'
36cb701 allow STRING(SUBSTRING) work with length -1 as "rest of the string"
2010-12-14 14:39:10 -05:00
Brad King f7036a1603 Merge topic 'custom-command-depend'
ced1d5e Skip file-level dependencies on custom targets (#11332)
e30a775 Improve signature of cmLocalGenerator::GetRealDependency
2010-12-14 14:38:48 -05:00
Bill Hoffman 86979e49a1 Change cpack run and verify script to work with multi-config generators.
Use the location of the running cmake to find cpack, and use the
CMAKE_CONFIG_TYPE environtment variable as a type for cpack.
2010-12-14 13:42:21 -05:00
Eric NOULARD cdf92c952a Precise the project config type when invoking cpack 2010-12-14 12:21:02 -05:00
Eric NOULARD 08f829b509 Arrange output in a better way 2010-12-14 12:21:00 -05:00
Eric NOULARD 58bd4f2185 CPackTest spit out more output in case of failure 2010-12-14 12:20:58 -05:00
Eric NOULARD dd2a5aa69f CPack Default component test for ZIP should be OK 2010-12-14 12:20:56 -05:00
Eric NOULARD 88b7f4252c CPack new tests for component install 2010-12-14 12:20:54 -05:00
Brad King fe3f878f15 Detect object files in implicit link information
The NAG Fortran compiler implicitly passes object files by full path to
the linker.  Teach CMakeParseImplicitLinkInfo to parse object files that
match some tool-specific regular expression.
2010-12-09 17:07:34 -05:00
Brad King 53ea8b3204 Merge branch 'imported-target-dependencies' into custom-command-refactor 2010-12-08 17:30:02 -05:00
Brad King ced1d5eccd Skip file-level dependencies on custom targets (#11332)
A custom command may name a target created by add_custom_target in its
DEPENDS field.  Treat this case as a target-level dependency only since
a custom target provides no standard file on which to add a file-level
dependency.
2010-12-08 17:14:17 -05:00
Rolf Eike Beer 36cb701690 allow STRING(SUBSTRING) work with length -1 as "rest of the string"
This fixes the first half of bug 10740.
2010-12-08 16:38:30 -05:00
Brad King a765c491ad Honor custom command dependencies on imported targets (#10395)
Imported targets do not themselves build, but we can follow dependencies
through them to find real targets.  This allows imported targets to
depend on custom targets that provide the underlying files at build
time.
2010-12-08 12:22:13 -05:00
Ben Boeckel 544d0c3774 Fix expected output for WarnUninitialized test 2010-12-07 17:00:41 -05:00
Ben Boeckel 4e3bea41ee Update expected messages to new format 2010-12-07 16:46:10 -05:00
Ben Boeckel 88cd4c1e92 Use 'CMake Warning' versus 'warning' for CDash 2010-12-07 14:40:21 -05:00
Brad King e01cce2869 Allow add_dependencies() on imported targets (#10395)
Imported targets do not themselves build, but we can follow dependencies
through them to find real targets.  This allows imported targets to
depend on custom targets that provide the underlying files at build
time.
2010-11-19 17:19:21 -05:00
David Cole b3cf739e2c Honor FOLDER on include_external_msproject targets (#11436)
Add FOLDER property usage to the VSExternalInclude test
and inspect results manually to verify behavior.

Thanks to Jens Auer for the bug report.
2010-11-10 09:06:09 -05:00
David Cole 385b681138 Merge topic 'add-cse-contract-test'
f6f3ae5 Update tag in the Contracts/cse-snapshot test.
1e4fd5f Enable overriding contract test timeout values.
c81ad34 Add a contract test for building the CSE.
942ace8 Fix contract test so it is not hard coded to the vtk542 test.
fd343a1 Add a "Contract" test for VTK.  The test downloads and builds VTK.
2010-11-09 15:46:59 -05:00
David Cole c8ac9307fb Add contract test for Trilinos 10.6.1 snapshot. 2010-11-09 10:17:06 -05:00
Brad King 95f149e61f Define LINK_DEPENDS target property (#11406)
Custom Makefile link rules may need to depend on linker scripts.  Define
this property to allow user-specified link-time dependencies.
2010-11-05 09:05:08 -04:00
David Cole f6f3ae5bcd Update tag in the Contracts/cse-snapshot test.
Also:
- allow local variables 'repo' and 'tag' to be overridden
  by the optional LocalOverrides.cmake
- print out STATUS messages to see the variable values in
  CMake configure output
2010-10-28 14:41:30 -04:00