Commit Graph

1865 Commits

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