Commit Graph

1158 Commits

Author SHA1 Message Date
Brad King 7dcfc8d23a Make Complex test of CMakeLib more optional
Previously we passed inputs to the decision to each Complex test and let
the test source decide.  This commit moves the decision out of the tests
and makes it an option() in their source.  This makes it possible to
build the Complex tests from outside the CMake test tree.
2009-10-07 16:11:52 -04:00
Brad King 71910b3fd4 Fix find_package() when <pkg>_DIR is wrong
When <pkg>_DIR is set to an incorrect version we search again and store
the result in the variable, even if it is <pkg>_DIR-NOTFOUND.

There was a bug in the case when the new search does not find anything
and the old value came from a cache entry with UNINITALIZED type.  The
command used to try to load a package configuration file from the last
place searched, and would leave the old wrong value in the entry.  This
commit fixes the behavior to avoid trying to load a missing file and to
set the value to <pkg>_DIR-NOTFOUND as expected.
2009-10-07 14:37:30 -04:00
Brad King fff1c6d275 More robust implicit link line detection regex
The regex used by CMAKE_PARSE_IMPLICIT_LINK_INFO to detect link lines
should not match lines that happen to have ".../ld.../..." in them.  A
linker name should match only as the last component of a path.

See issue #9666.
2009-10-07 08:43:51 -04:00
David Cole a6facbcca3 Use the correct CMake (the freshly built one) to drive the CMakeWizardTest. 2009-10-07 06:33:09 -04:00
Brad King b9850a614e Log implicit link information parsing actions
This commit teaches the CMAKE_PARSE_IMPLICIT_LINK_INFO function to log
its actions.  We store the log in CMakeFiles/CMakeOutput.log at the top
of the project build tree.  This will make diagnosis of implicit link
information parsing problems easier.
2009-10-06 15:16:12 -04:00
David Cole 5b74d031db Increase coverage. Intentionally trigger error conditions. Call all the else*/end* functions without proper opening or containing code structure: else, elseif, endforeach, endfunction, endif, endmacro, endwhile. 2009-10-06 14:45:19 -04:00
David Cole d8efcfc787 Increase coverage. Add test of class cmakewizard. (cmake -i 'mode') 2009-10-06 13:27:13 -04:00
Brad King d4342e8ae7 Fortran test: Match config for external project
In the Fortran test we use a custom command to build another Fortran
project internally.  The project provides a Fortran module and library
to which to link.  This commit teaches the test to build the extra
project using the same build configuration as the main project.
2009-10-05 16:51:11 -04:00
David Cole b3611f70ae Add tests for uncovered bits of the math and cmake_minimum_required cmake functions. 2009-10-05 16:50:21 -04:00
Brad King 58a616dea3 Fix Preprocess test for Intel on Windows
We need to leave out the '%' character from tests with the Intel
compiler.  Since '%' needs to be written '%%' in NMake when not using a
response file but just '%' when using a response file, we just skip the
character for now.  It works with MSVC in NMake only because that
compiler expects '%%' inside response files, which do get used.
2009-10-05 14:39:28 -04:00
Brad King f1b7e620f7 Fix ModuleDefinition test for Intel on Windows
CMake defines MSVC only for a VS compiler, but the Intel compiler adds
the preprocessor definition _MSC_VER.  Instead of relying on separate
tests to decide whether to use example_dll_2, we do one test in CMake
and then add our own preprocessor definition.
2009-10-05 14:39:23 -04:00
Brad King 667f0724a8 Fix PrecompiledHeader test for Intel on Windows
This commit updates the test's sanity check to allow Intel too.
Previously it refused to run on non-MSVC compilers.
2009-10-05 14:39:14 -04:00
Brad King 750eb105c2 Test target link information invalidation
We test this by adding export(TARGETS) to the LinkLanguage test to
export the executable before the library is linked to it.  Since
export(TARGETS) computes the link interface of the target (so that it
can export it), this ensures that the information is recomputed after
the link library is added.
2009-10-05 09:07:09 -04:00
Bill Hoffman 1bc355b711 Use new style header generation and get rid of OBJECT_DEPENDS in tutorial 2009-10-04 22:55:02 -04:00
David Cole 517e1e3c0f Add a few more cases to the new StringTest for even better coverage. Re-factor the scripts to make it easier to add new cases to this test. Re-factoring also enables the test driver in ExecuteScriptTests to be re-used when adding new tests in the future. 2009-10-03 12:01:10 -04:00
David Cole 837364cb04 Correct some typos in error messages in the string command. Add a test that covers more of the code implemented in cmStringCommand.cxx, especially the error handlers. 2009-10-02 14:51:43 -04:00
Brad King b4ace1cca0 Test INTERPROCEDURAL_OPTIMIZATION build feature
This creates an "IPO" test that builds some other tests as subdirectories
while enabling INTERPROCEDURAL_OPTIMIZATION.  See issue #9615.
2009-10-02 13:52:29 -04:00
Brad King 62edb7b943 Better CMake.ModulesNotice test regex
This commit updates the copyright notice regex to enforce a more strict
format for contributor copyrights.
2009-10-01 14:22:58 -04:00
Brad King 26efeadd22 New CMake.ModulesNotice test for copyright notices
This new test checks Modules/*.cmake for the required copyright notice.
2009-10-01 14:12:19 -04:00
Zach Mullen cc8c4a3f4f Improved safety and removed busy waiting from the CTestTestTimeout test. 2009-09-30 14:48:40 -04:00
Brad King 0db2c8505e Test use of module .def files for MS tools
This adds a "ModuleDefinition" test enabled when using MSVC tools.  It
checks that .def files can be used to export .dll and .exe symbols and
create corresponding .lib files that can be linked.  See issue #9613.
2009-09-29 16:39:43 -04:00
Zach Mullen f321dbb17b ENH: Added ctest test coverage for a test timeout 2009-09-29 15:18:46 -04:00
Zach Mullen bcb127d494 Remove ctest_submit from CTestTestParallel 2009-09-29 14:21:48 -04:00
Brad King 65a78ec5b8 Test support for OLD behavior of policy CMP0002
Policy CMP0002's OLD behavior allows duplicate non-custom targets.  We
test it with a project that builds two executables of the same name by
setting CMP0002 to OLD.
2009-09-28 17:34:34 -04:00
David Cole 8562f5400d Oops. Last commit did not create subdir before doing a touch on a file in it. So it fails on some platforms. This fixes that. 2009-09-25 13:36:08 -04:00
David Cole f199385605 Fix CMake Internal Error from cmTarget::GetOutputInfo - triggered by calling GetLocation on a utility target - caused by custom command output file with same name as custom target. The fix is to avoid calling GetLocation unless the target is of a type that is expected to have a location... 2009-09-25 13:23:19 -04:00
Bill Hoffman 815ec522ee SEGFAULT does not work on watcom with ctest, so don't expect it to... 2009-09-24 14:14:23 -04:00
Bill Hoffman 8c4f69c45b Use CTEST_TEST_GENERATOR 2009-09-24 13:43:25 -04:00
Bill Hoffman 205855bf56 Make sure CTestTest scripts honor the CMAKE_TEST_GENERATOR so that if the generator to build cmake is different than the one used for tests (watcom) is used. 2009-09-24 13:18:49 -04:00
Bill Hoffman dccbbe0a99 Visual Studio 10 has the same bug as 8 so make the path shorter 2009-09-23 16:10:31 -04:00
Zach Mullen d33701abbb Uncommented the dependency of CTestTestNoExe on CTestTestNoBuild so that it will work in parallel now. 2009-09-23 14:13:33 -04:00
Zach Mullen 8ffc8147e0 Make portable c for Parallel test 2009-09-23 14:07:57 -04:00
Bill Hoffman fc921a021c Add nightly builds for linux windows and mac. 2009-09-23 12:45:39 -04:00
Zach Mullen f3dce87e6d Set new ctest tests to always run, whether CTEST_TEST_CTEST is enabled or not. Changed parallel test to be portable. 2009-09-23 11:38:37 -04:00
Zach Mullen 6f45c1d88c CTestTestParallel now submits to public dashboard for easier debugging 2009-09-23 09:00:37 -04:00
Brad King e55bbab88b Teach Xcode generator to set XCODE_VERSION
We set the variable 'XCODE_VERSION' in the CMake language to the Xcode
version string (e.g. "3.1.2").  Platform config files may use it later.
2009-09-23 08:48:39 -04:00
Zach Mullen 664a409ae0 Added tests for ctest parallel options (PARALLEL_LEVEL, PROCESSORS, RUN_SERIAL) 2009-09-22 12:06:03 -04:00
Bill Hoffman a89bedfc6e For the complex tests since they link to the CMake library make sure that they are built with the type of build. 2009-09-21 15:26:59 -04:00
Zach Mullen e4293b4b38 Re-enabled failing tests; fixed ctest_build output to be consistent in the error condition across different make programs so that these tests would pass. 2009-09-21 13:40:40 -04:00
Bill Hoffman cabca8d903 Disable test as it fails on every system. 2009-09-20 09:42:09 -04:00
Zach Mullen 7b0e7f714b Disabling CTestTestNoBuild pending investigation of odd g++ output issues. 2009-09-18 15:01:13 -04:00
Zach Mullen 3c32c904b3 Apparently, on FarAway the presence of errors during ctest_build does not cause the calling ctest to return an error condition. 2009-09-18 14:02:14 -04:00
Zach Mullen a35f11b13e Cosmetic change to test CMakeLists 2009-09-18 13:34:24 -04:00
Zach Mullen 78e0bfa0fd Added test coverage for ctest. Covers WILL_FAIL condition, tests that do not build, tests that segfault, and test executable not found (bad command), as well as some pass and fail regular expressions. 2009-09-18 12:16:46 -04:00
Brad King 997ae66cbb Fix CHECK_(C|CXX)_COMPILER_FLAG macro test
The flag "-_this_is_not_a_flag_" was not rejected by GCC 4.0 on older
Mac OS X.  We now use "---_this_is_not_a_flag_" instead, which will
hopefully be rejected by all compilers.
2009-09-18 09:49:51 -04:00
Brad King 42857c747e Test CHECK_(C|CXX)_COMPILER_FLAG macros
This teaches the TryCompile test to check that the compiler flag check
macros correctly reject a bad flag.  See issue #9516.
2009-09-17 15:33:12 -04:00
Brad King 229b67a249 Create CMake.ConfigureFile test for configure_file
This test checks that configure_file() handles input and output file
arguments as documented.
2009-09-16 15:09:58 -04:00
Brad King d23d268e39 Factor out CMake.File test result check for re-use
The CMake.File test runs several scripts through "cmake -P" and checks
the output and result against known good values.  This commit factors
out the checking code into a separate CMakeCheckTest module.  The module
may be used by new tests.
2009-09-16 15:09:10 -04:00
Brad King 33207a9a87 Test add_subdirectory inside function
This commit teaches the FunctionTest to check variable scope behavior
when a subdirectory is added inside a function call.  Any PARENT_SCOPE
sets in the subdirectory should affect only the function scope which
called add_subdirectory and not its parent scope.
2009-09-16 09:52:04 -04:00
Brad King 2541f30287 Test that CTest can handle missing newlines
We create test 'CTest.NoNewline' to print output with no newline.
This tests CTest's ability to handle a missing newline.
2009-09-11 16:39:07 -04:00