summaryrefslogtreecommitdiffstats
path: root/Tests/CompileDefinitions
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Bump CMake minimum required in tests to 2.8.12Chuck Atkins2020-12-231-1/+1
| | | | | | | Since 3.19, CMake generates a deprecation warning when using a minimum version less than 2.8.12. This eliminates those warnings generated during tests, which are typically hidden from the user and developer but are being generated nonetheless.
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-016-70/+70
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * 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.
* Revise C++ coding style using clang-formatKitware Robot2016-05-165-50/+55
| | | | | | | | | | | | | 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-291-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-091-5/+0
| | | | | | This generator has been deprecated since CMake 3.3. Remove it. Update documentation, modules, and tests to drop content specific to this generator.
* Tests: Shorten paths in CompileDefinitionsBrad King2015-01-254-27/+19
| | | | | | Shorten the add_definitions command test directory and target names to avoid creating really long paths that fail with some tools on Windows. While at it, remove unnecessary project() command calls.
* Genex: Do not consider 'head' when evaluating build propertiesBrad King2014-08-062-0/+15
| | | | | | | | | | | | When $<TARGET_PROPERTY> names a build property like COMPILE_DEFINITIONS but not the usage requirement (INTERFACE_) version of it, the value should be that used to build the target. It should not be influenced by a dependent 'head' target like usage requirements are. Extend the CompileDefinitions test with a case covering the corrected behavior. Reviewed-by: Stephen Kelly <steveire@gmail.com>
* cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy.Stephen Kelly2014-01-082-0/+7
|
* Remove the LINK_LANGUAGE generator expression.Stephen Kelly2013-07-243-9/+18
| | | | | | | | | | | It accepted an optional argument to test for equality, but no way to get the linker language of a particular target. TARGET_PROPERTY provides this flexibility and STREQUAL provides the necessary API for equality test. Extend the CompileDefinitions test to cover accessing the property of another target.
* Tests/CompileDefinitions: Avoid spaces in defines on VS 6Stephen Kelly2013-05-244-4/+18
| | | | | | | | The VS 6 IDE does not like spaces in definition values so CMake drops them and warns. The Tests/CompileDefinitions test C code that looks for the dropped definitions already knows to skip them, but CMake still warns. Silence the warnings by avoiding such values in the first place on VS 6.
* Add $<LINK_LANGUAGE> generator expressionStephen Kelly2013-05-245-0/+92
| | | | | | They can't be used when evaluating link libraries, but they can be used for include directories and compile definitions. Later they can be used for compile options.
* Add the JOIN generator expression.Stephen Kelly2013-05-162-3/+23
| | | | | | This generator expression joins a list with a separator. The separator may contain arbitrary content, such as commas, which is ordinarily a delimiter in the generator expression syntax.
* Test evaluation of per-config COMPILE_DEFINITIONS (#14037)Brad King2013-03-256-3/+92
| | | | | Teach the CompileDefinitions test to cover evaluation of config-specific generator expressions.
* GenEx: Test the use of generator expressions to generate lists.Stephen Kelly2012-10-172-0/+10
| | | | | | We can't test this in the GeneratorExpression unit test because the ';' chars are processed specically by the CMake function argument parser.
* Process generator expressions in the COMPILE_DEFINITIONS target property.Stephen Kelly2012-09-282-0/+15
|
* Rename files from main.cpp to more meaningful names.Stephen Kelly2012-08-225-5/+5
| | | | | | Because the main file for the dummy-executable and the actual compile test were both called main.cpp, they were overwriting each other during in-source builds.
* Fix the test setting COMPILE_DEFINITIONS target propertyStephen Kelly2012-08-211-1/+1
|
* Fix CompileDefinitions test on Visual Studio.Stephen Kelly2012-08-212-1/+10
| | | | Avoid testing unsupported spaces in define values.
* Don't duplicate -D defines sent to the compiler.Stephen Kelly2012-08-205-0/+70
There is no need to do so. Be consistent with include directories and ensure uniqueness. This requires changing the API of the cmLocalGenerator::AppendDefines method, and changing the generators to match. The test unfortunately can't test for uniqueness, but it at least verifies that nothing gets lost.