Commit Graph

1943 Commits

Author SHA1 Message Date
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