summaryrefslogtreecommitdiffstats
path: root/Tests/Preprocess
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Make Preprocess test work in RelWithDebInfo and MinSizeRelGilles Khouzam2017-01-271-4/+10
|
* Use string(APPEND) in TestsDaniel Pfeifer2016-07-271-15/+15
| | | | | | | Automate with: find Tests -type f -print0 | xargs -0 perl -i -0pe \ 's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
* Revise C++ coding style using clang-formatKitware Robot2016-05-162-234/+216
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-292-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* Drop Visual Studio 6 generatorBrad King2016-03-093-38/+14
| | | | | | This generator has been deprecated since CMake 3.3. Remove it. Update documentation, modules, and tests to drop content specific to this generator.
* Tests: Update Preprocess test for XL compiler limitationsBrad King2015-04-141-2/+14
|
* Avoid if() quoted auto-dereferenceBen Boeckel2014-10-201-1/+1
| | | | | | | When testing CMAKE_<LANG>_COMPILER_ID values, do not explicitly dereference or quote the variable. We want if() to auto-dereference the variable and not its value. Also replace MATCHES with STREQUAL where equivalent.
* Tests/Preprocess: Remove unnecessary VS version testsBrad King2014-06-241-9/+0
| | | | | | Since commit v2.8.12~436^2 (VS 10: Escape ; as %3B in preprocessor definitions, 2013-04-11) the Tests/Preprocessor/CMakeLists.txt file no longer uses the PP_VS1XX values, so stop setting them.
* Test COMPILE_DEFINITIONS target property get/set/get round-tripBrad King2013-07-241-0/+13
| | | | | | | Teach the Preprocess test to get, set, and then get the same value for the COMPILE_DEFINITIONS target property and verify that the value is not changed. This ensures the internal structured storage of the property value can reproduce the original string value.
* Merge branch 'master' into vs12-generatorBrad King2013-06-281-3/+1
|\ | | | | | | | | Resolve conflicts in Tests/Preprocess/CMakeLists.txt by keeping the side from 'master'.
| * VS 10: Escape ; as %3B in preprocessor definitions (#14073)Brad King2013-04-111-2/+1
| | | | | | | | | | | | | | | | | | Use the suggestion from http://support.microsoft.com/kb/2262855 to escape semicolons in preprocessor definitions for VS >= 10. Update the COMPILE_DEFINITIONS documentation disclaimer list of known limitations accordingly. Update our "Preprocess" test to cover the case. Suggested-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
* | VS12: Add Visual Studio 12 generator (#14251)Brad King2013-06-281-1/+5
|/ | | | | | | | | | | | | | Copy cmGlobalVisualStudio11Generator to cmGlobalVisualStudio12Generator and update version numbers accordingly. Add the VS12 enumeration value. Add module CMakeVS12FindMake to find MSBuild. Look for MSBuild in its now-dedicated Windows Registry entry. Teach the platform module Windows-MSVC to set MSVC12 and document the variable. Teach module InstallRequiredSystemLibraries to look for the VS 12 runtime libraries. Teach tests CheckCompilerRelatedVariables, Preprocess, VSExternalInclude, and RunCMake.GeneratorToolset to treat VS 12 as they do VS 10 and 11. Inspired-by: Minmin Gong <minmin.gong@gmail.com>
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-26/+26
| | | | | | | | | | | | | | | | | 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
* Teach our tests about special cases for VS 11Brad King2011-09-231-1/+4
| | | | | | 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.
* Fix Preprocess test for Intel on WindowsBrad King2009-10-051-3/+9
| | | | | | | | 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.
* ENH: almost all tests passing in vs 10, commit fixes preprocess and starts ↵Bill Hoffman2009-07-131-2/+6
| | | | vs external project
* ENH: Remove CMAKE_ANSI_CFLAGS from testsBrad King2009-07-081-5/+0
| | | | | As of CMake 2.6 this variable is not defined, and the ANSI flags for the HP compiler are simply hard-coded in the default C flags.
* ENH: Test spaces in non-string preprocessor valuesBrad King2009-04-241-1/+1
| | | | | | | This extends the Preprocessor test to put spaces in the value of a definition that is not a quoted string. In particular this tests that VS6 supports values with spaces if they do not have '"', '$', or ';'. See issue #8779.
* ENH: Support more preprocessor values in VS6Brad King2009-04-241-2/+3
| | | | | | | | | Previously we rejected all preprocessor definition values containing spaces for the VS6 IDE generator. In fact VS6 does support spaces but not in combination with '"', '$', or ';', and only if we use the sytnax '-DNAME="value with spaces"' instead of '-D"NAME=value with spaces"'. Now we support all definition values that do not have one of these invalid pairs. See issue #8779.
* ENH: Support preprocessor def values in VS6Brad King2009-03-233-33/+34
| | | | | | | | | The add_definitions() command and COMPILE_DEFINITIONS dir/tgt/src properties support preprocessor definitions with values. Previously values were not supported in the VS6 generator even though the native tool supports them. It is only values with spaces that VS6 does not support. This enables support and instead complains only for values with spaces. See issue #8779.
* BUG: Convert cmake_policy(VERSION) to cmake_minimum_required(VERSION) in ↵Brad King2008-03-201-1/+1
| | | | Tests/MakeClean/ToClean/CMakeLists.txt and Tests/Preprocess/CMakeLists.txt. CMP0000 now requires the cmake_minimum_required command.
* ENH: Improve handling of old-style compatibility.Brad King2008-03-071-0/+1
| | | | | | | | | | | | | | | | | | | - Remove CMP_0001 (no slash in target name) and restore old CMAKE_BACKWARDS_COMPATIBILITY check for it - Replace all checks of CMAKE_BACKWARDS_COMPATIBILITY with cmLocalGenerator::NeedBackwardsCompatibility calls - Create new CMP_0001 to determine whether or not CMAKE_BACKWARDS_COMPATIBILITY is used. (old = use, new = ignore) - Show CMAKE_BACKWARDS_COMPATIBILITY in cache only when CMP_0001 is set to OLD or WARN - Update documentation of cmake_policy and cmake_minimum_required to indicate their relationship and the 2.4 version boundary - When no cmake policy version is set in top level makefile implicitly call cmake_policy(VERSION 2.4) which restores CMAKE_BACKWARDS_COMPATIBILITY and other 2.4 compatibility - Fix tests MakeClean and Preprocess to call cmake_policy(VERSION 2.6) because they depend on new policies
* BUG: Fix typo XCode -> Xcode in Preprocess test.Brad King2008-03-011-2/+2
|
* ENH: Update Preprocess test to distinguish between the make tool or compiler ↵Brad King2008-03-011-27/+75
| | | | tool that is at fault for not supporting a particular character in definitions. Make it skip the % character when the compiler is MSVC and it is a non-nmake tool.
* ENH: Converted cmMakefile DefineFlags added by ADD_DEFINITIONS command into ↵Brad King2008-01-183-0/+75
| | | | a COMPILE_DEFINITIONS directory property.
* ENH: Use new set_property signature to set COMPILE_DEFINITIONS properties in ↵Brad King2008-01-171-17/+19
| | | | Preprocess test.
* ENH: Renamed <CONFIG>_COMPILE_DEFINITIONS to COMPILE_DEFINITIONS_<CONFIG> ↵Brad King2008-01-161-4/+4
| | | | for better documentation clarity.
* BUG: Test needs ansi C code support.Brad King2008-01-151-0/+5
|
* BUG: Disable semicolon test on VS 7.0.Brad King2008-01-141-3/+6
|
* ENH: Create COMPILE_DEFINITIONS property for targets and source files. ↵Brad King2008-01-147-0/+569
Create <config>_COMPILE_DEFINITIONS property as per-configuration version. Add Preprocess test to test the feature. Document limitations on Xcode and VS6 generators.