summaryrefslogtreecommitdiff
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix WarnUnusedUnusedViaUnset test pass/fail regexBrad King2012-08-141-2/+2
| | | | | | | After conversion of Modules .cmake files to lower case the FAIL_REGULAR_EXPRESSION for this test matched warnings in modules other than the test line itself. Make the pass and fail regular expressions specific to the file containing the lines they are testing.
* Remove CMake-language block-end command argumentsKitware Robot2012-08-13139-1131/+1131
| | | | | | | | | | | | | | | | | Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Convert CMake-language commands to lower caseKitware Robot2012-08-13201-4632/+4632
| | | | | | | | | | | | | | | | | Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code: cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-13111-497/+497
| | | | | | | | | | | | | | | | | Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
* Merge topic 'xcode-object-dir'David Cole2012-08-132-0/+2
|\ | | | | | | | | b237dbd Xcode: Fix object library references in multi-project trees (#13452)
| * Xcode: Fix object library references in multi-project trees (#13452)Brad King2012-08-032-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In cmGlobalXCodeGenerator::Generate we generate a .xcodeproj for each directory in the tree containing a project() command. First we iteratively use SetGenerationRoot to add "ALL_BUILD" and other targets to each project. This leaves "CurrentProject" set to the last project when we invoke cmGlobalGenerator::Generate, which is not the same as the top-level project if any subdirectories invoke the project() command. When cmGlobalGenerator::Generate reaches CreateGeneratorTargets it constructs cmGeneratorTarget and calls ComputeTargetObjects exactly once per target. In this context the value of CurrentProject is undefined so we cannot pass it to GetObjectsNormalDirectory. Use "$(PROJECT_NAME)" instead so it will adapt automatically to each project. Also teach Tests/ObjectLibrary to cover this case.
* | Merge topic 'mixed-lib-to-lib64'David Cole2012-08-1313-0/+63
|\ \ | |/ |/| | | | | | | | | | | | | af80da3 remove lib64 Unix paths if the respective lib path is also given 733726e find_library: Fix mixed lib->lib64 (non-)conversion cases (#13419) 54add62 find_library: Simplify lib->lib<arch> expansion 6ca2f82 find_library: Refactor lib->lib64 conversion 1fe4b82 find_library: Add test covering lib->lib64 cases
| * find_library: Fix mixed lib->lib64 (non-)conversion cases (#13419)Brad King2012-07-201-2/+2
| | | | | | | | | | | | | | | | When a search path contains multiple "lib/" instances we previously converted all or none. This fails for cases where only some of the multiple instances must be converted. Teach AddArchitecturePaths to generate all combinations that exist. Uncomment these cases in the CMakeOnly.find_library test now that they work.
| * find_library: Add test covering lib->lib64 casesBrad King2012-07-2013-0/+63
| | | | | | | | | | | | | | Add a "CMakeOnly.find_library" test covering various cases involving lib->lib64 (non-)conversion. Comment out cases involving mixed path components "lib" and "lib64", such as lib/A/lib64 and lib64/A/lib, as these are known to be broken currently.
* | Merge topic 'ninja-fix-macosx'David Cole2012-07-241-32/+34
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1fc8df9 Add missing this->. 7a3ecf5 Fix memory leak in Makefile generator. 9f7dc83 Ninja: also bootstrap ninja files 5d365b2 Ninja: enable ninja support everywhere d569f3e Ninja: void function can't return a value 52160bf Ninja: enable ninja on Mac so all Mac CDash-builds are tested, cleanup later 56aeac6 Ninja: fixes for bcc 7a6bc9e Ninja: remove 'this' from member initializer list 44ba4cf Ninja: remove warnings 7751966 Ninja: remove 'friend' in ninja code c3988ee Re-factor OS X content generator start up. f8e0a51 Re-factor framework directory computation. f36c7b0 Re-factor Mac OS X content directory computation. 5d885db Re-factor bundle content copying rules generation. 3b2a01e Ninja: Use same echo message as makefiles. 7bb56c5 Re-factor CFBundle generation. ...
| * | Enable BundleTest with CLang too.Nicolas Despres2012-07-171-32/+34
| |/
* | Merge topic 'DoNotInvokeCPackAtCMakeTime-forCMakeTests'David Cole2012-07-241-23/+13
|\ \ | | | | | | | | | | | | | | | | | | b47cffa CPack: Use bin subdir when looking for dpkg and rpmbuild a8c659c Find dpkg and rpmbuild in usual Fink and MacPort paths 848f220 Do not run cpack at CMake time it is not available.
| * | Do not run cpack at CMake time it is not available.Eric NOULARD2012-06-281-23/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cpack was used to get the list of available i.e. ACTIVE CPack generators in the CMake tests suite. This was done in order to get dynamically available CPack generators like DEB or RPM that may or may not be available on some platform like MacOSX depending on the fact that some command are installed or not. We may do that but not during initial configuration. The current patch fixes the problem and we may do better in the future like configuring CPack tests later.
* | | Merge topic 'fix-tests-for-gcc-4.7'David Cole2012-07-242-1/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | b21cb9f Tests/ObjC++: Use standard <iostream> header 7fa8e53 Tests/X11: Add missing include <stdlib.h> for 'rand'
| * | | Tests/ObjC++: Use standard <iostream> headerBrad King2012-07-181-1/+2
| | | | | | | | | | | | | | | | Drop use of non-standard <iostream.h> header.
| * | | Tests/X11: Add missing include <stdlib.h> for 'rand'Brad King2012-07-181-0/+1
| | |/ | |/|
* | | Merge topic 'ninja-mac-BuildDepends'David Cole2012-07-241-2/+3
|\ \ \ | |/ / |/| | | | | | | | | | | | | | 207ec5c Ninja: fix mis-matching endif() argument 392a654 Ninja: on Mac no multiple -arch because of -M 801f23f Ninja: dep files and multiple -arch flags not possible on mac
| * | Ninja: fix mis-matching endif() argumentPeter Kümmel2012-07-181-1/+1
| | |
| * | Ninja: on Mac no multiple -arch because of -MPeter Kümmel2012-07-101-9/+3
| | |
| * | Ninja: dep files and multiple -arch flags not possible on macPeter Kuemmel2012-06-191-1/+8
| | |
* | | Merge topic 'include-command-empty-filename'David Cole2012-07-127-0/+20
|\ \ \ | | | | | | | | | | | | | | | | 2e99949 include: Ignore empty string as file name (#13388)
| * | | include: Ignore empty string as file name (#13388)Brad King2012-07-107-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously CMake silently accepted the empty string and added a bogus dependency on the current directory. Instead warn about the empty file name and ignore it. We cannot make this an error because there may be existing projects that accidentally depend on the old behavior. Add a RunCMake.include test to cover this case.
* | | | Merge topic 'fix-CustomCommand-main'David Cole2012-07-121-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | d54618f Tests/CustomCommand: Do not use 'main' in a library
| * | | | Tests/CustomCommand: Do not use 'main' in a libraryBrad King2012-07-091-1/+1
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise when linking 'CustomCommand' some linkers report ld: 0711-224 WARNING: Duplicate symbol: .main Suggested-by: Daniel R. Gomez <gomez@teragram.com>
* | | | Merge topic 'fix-CTestUpdateSVN-svn1.7'David Cole2012-07-121-1/+0
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | c785c6b CTestUpdateSVN: Do not create repo directory first (#13349)
| * | | CTestUpdateSVN: Do not create repo directory first (#13349)Brad King2012-07-091-1/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | If the directory already exists some svnadmin versions report svnadmin: E200011: Repository creation failed svnadmin: E200011: Could not create top-level directory svnadmin: E200011: '.../CTest UpdateSVN/repo' exists and is non-empty
* | | Merge topic 'ninja-fixes'David Cole2012-07-091-0/+13
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6b31d39 Ninja: don't shadow 'outputs' variable 9b311fb Ninja: add soname test case e3b1be2 Ninja: Clean all symlink created for libraries. 990f77e Ninja: remove int/size_t warning
| * | | Ninja: add soname test casePeter Kuemmel2012-07-091-0/+13
| |/ /
* | | Merge topic 'fix-pie-clang-trunk'David Cole2012-07-091-2/+2
|\ \ \ | | | | | | | | | | | | | | | | 9235603 Fix PositionIndependentTargets test with clang trunk.
| * | | Fix PositionIndependentTargets test with clang trunk.Stephen Kelly2012-06-271-2/+2
| |/ / | | | | | | | | | | | | | | | The __PIE__ define might be set instead of __PIC__ if fPIE is used. http://llvm.org/bugs/show_bug.cgi?id=13221
* | | CTest: Add test to verify -D variable definitions workDavid Cole2012-06-252-0/+29
|/ /
* | Merge topic 'module-no-soname'David Cole2012-06-217-0/+10
|\ \ | | | | | | | | | | | | 56148fd Do not crash on SHARED library without language (#13324)
| * | Do not crash on SHARED library without language (#13324)Brad King2012-06-207-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit e1409ac5 (Support building shared libraries or modules without soname, 2012-04-22) CMake crashes on the code add_library(foo SHARED foo.nolang) because the logic to lookup the language's soname flag was moved from cmTarget::GetLibraryNames to cmMakefile::GetSONameFlag without its check for a NULL language. Restore the check for NULL. Add RunCMake.Languages test to cover language error cases like this one.
* | | Merge topic 'CTestUpdateGit-safecrlf'David Cole2012-06-211-0/+3
|\ \ \ | | | | | | | | | | | | | | | | 5c153c6 Make CTest.UpdateGIT robust to Git safecrlf on Windows
| * | | Make CTest.UpdateGIT robust to Git safecrlf on WindowsBrad King2012-06-201-0/+3
| | |/ | |/| | | | | | | | | | | | | | | | If the user has configured 'core.autocrlf' and 'core.safecrlf' then 'git submodule add' will fail to 'git add' the '.gitmodules' file because it has LF newlines, at least as of Git 1.7.11. Disable 'core.safecrlf' in our test repository to avoid the problem.
* | | Merge topic 'run_compile_commands-aix-gcc-2.9'David Cole2012-06-211-2/+2
|\ \ \ | | | | | | | | | | | | | | | | 96b66a4 Avoid string.clear and string.push_back (#13319)
| * | | Avoid string.clear and string.push_back (#13319)Daniel R. Gomez2012-06-191-2/+2
| | | | | | | | | | | | | | | | Compiler "gcc version 2.9-aix51-020209" does not offer them.
* | | | Merge topic 'test-FindPackageModeMakefileTest'David Cole2012-06-211-3/+22
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | 09ff191 Fix FindPackageMode test Makefile (#13314)
| * | | | Fix FindPackageMode test Makefile (#13314)Daniel R. Gomez2012-06-191-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use CXXFLAGS in the makefile's link rule since it invokes the C++ compiler front-end. Retool the makefile not to require GNU Make. Using backticks instead of $(shell ...) is safe so long as one guards against the possibility of backslashes getting inside the backticks, so use temporary files and shell variables to avoid them.
* | | | | Merge topic 'test-Assembler-C-flags'David Cole2012-06-211-0/+1
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | d686517 Tests/Assembler: Assemble and link with same flags (#13314)
| * | | | Tests/Assembler: Assemble and link with same flags (#13314)Daniel R. Gomez2012-06-181-0/+1
| |/ / / | | | | | | | | | | | | | | | | The test uses the C compiler as the assembler so use the C flags for ASM too. This is important when the flags specify the target ABI.
* | | | Merge topic 'test-VSGNUFortran-C-comment'David Cole2012-06-191-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | 307d45e Tests/VSGNUFortran: Avoid C++ comment in C code (#13314)
| * | | | Tests/VSGNUFortran: Avoid C++ comment in C code (#13314)Daniel R. Gomez2012-06-181-1/+1
| |/ / /
* | | | Merge topic 'test-IncludeDirectories-eof'David Cole2012-06-191-3/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | cad6921 Tests/IncludeDirectories: Files must end in a newline (#13314)
| * | | | Tests/IncludeDirectories: Files must end in a newline (#13314)Daniel R. Gomez2012-06-181-3/+1
| |/ / / | | | | | | | | | | | | The HP compiler really really wants source files to end with a newline.
* | | | Merge topic 'ninja-cldeps'David Cole2012-06-191-2/+6
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eb410e8 Ninja: disable cldeps for bcc32, it's too old, and ninja would also not build 5ead31d Ninja: try work around for bcc32 bug 1333b57 Ninja: build server fixes 9081e3a remove warning about unused parameter f430bea Ninja: maybe this fixes the bcc32 build f2c1288 Ninja: msvc6 for-scoping 44b9bbc Ninja: build with old msvc versions 57156a5 Ninja: build server fixes f1abdce Ninja: some bytes of the rc files couldn't be piped correctly 2de963d Ninja: don't remove space between command and parameters 50b6f33 Ninja: build cmcldeps with mingw c05653e Ninja: try to make GetProcessId visible ab245ff Ninja: but cl supports /nologo ... bf58e9a Ninja: no /nologo option in old rc.exe 2fb07fc Ninja: Eclipse and KDevelop fixes for ninja 518c065 Ninja: don't pollute build dir with preprocessed rc files ...
| * | | Ninja: add wrapper for cl to extract dependenciesPeter Kuemmel2012-06-081-2/+6
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cmcldeps wraps cl and adds /showInclude before calling cl. It parses the output of cl for used headers, drops system headers and writes them to a GCC like dependency file. cmcldeps uses ATM ninja code for process handling, but could be ported later to SystemTools. TODO: Why needs ninja multiple calls in the BuildDepends test?
* | | Merge topic 'position-independent-targets'David Cole2012-06-129-0/+132
|\ \ \ | |/ / |/| | | | | | | | | | | | | | bd34963 Refactor generation of shared library flags 55d7aa4 Add platform variable for flags specific to shared libraries 31d7a0f Add platform variables for position independent code flags
| * | Refactor generation of shared library flagsStephen Kelly2012-06-128-0/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMAKE_SHARED_LIBRARY_<lang>_FLAGS has flags on various platforms for a variety of purposes that are correlated with shared libraries but not exclusive to them. Refactor generation of these flags to use new purpose-specific platform variables CMAKE_<lang>_COMPILE_OPTIONS_DLL CMAKE_<lang>_COMPILE_OPTIONS_PIC CMAKE_<lang>_COMPILE_OPTIONS_PIE Activate the DLL flags specifically for shared libraries. Add a new POSITION_INDEPENDENT_CODE target property to activate PIC/PIE flags, and default to true for shared libraries to preserve default behavior. Initialize the new property from CMAKE_POSITION_INDEPENDENT_CODE to allow easy global configuration in projects. Although the default behavior is unchanged by this refactoring, the new approach ignores CMAKE_SHARED_LIBRARY_<lang>_FLAGS completely. We must leave it set in case projects reference the value. Furthermore, if a project modifies CMAKE_SHARED_LIBRARY_<lang>_FLAGS it expects the new value to be used. Add policy CMP0018 to handle compatibility with projects that modify this platform variable. Add a PositionIndependentCode test on platforms where we can get meaningful results.
| * | Add platform variable for flags specific to shared librariesStephen Kelly2012-06-121-0/+2
| | | | | | | | | | | | | | | | | | Store in CMAKE_${lang}_COMPILE_OPTIONS_DLL flags from CMAKE_SHARED_LIBRARY_${lang}_FLAGS that are truly exclusive to shared libraries.