summaryrefslogtreecommitdiffstats
path: root/Tests/IncludeDirectories
Commit message (Collapse)AuthorAgeFilesLines
* Xcode: Properly mark SYSTEM includes as suchGregor Jasny2016-12-272-5/+14
| | | | | | | | | We now populate the per-language flags in addition to the header search paths stored in HEADER_SEARCH_PATHS. This preserves include paths for GNU assembly files (cmake/cmake#16449) and also provides SYSTEM include semantics. Closes: cmake/cmake#15687
* Revert "Xcode: Obey SYSTEM keyword for includes (#15687)"Gregor Jasny2016-11-282-14/+5
| | | | | | | | Revert commit v3.7.0-rc1~266^2 (Xcode: Obey SYSTEM keyword for includes, 2015-08-31). It worked for C, C++, and Swift but not for GNU Assembly files for which Xcode has no property to set flags. Closes: #16449
* Xcode: Obey SYSTEM keyword for includes (#15687)Gregor Jasny2016-08-092-5/+14
| | | | | | | | | | | | | CMake used to put all header search paths into HEADER_SEARCH_PATHS attribute. Unfortunately this attribute does not support to declare a search path as a system include. As a hack one could add a -isystem /path to the cflags but then include ordering is not deterministic. A better approach was chosen with this patch by not filling HEADER_SEARCH_PATHS at all and to populate the C, C++, and Fortran flags directly. The include paths used by Xcode should be now identical to the ones used by Unix Makefiles and Ninja generator.
* Use string(APPEND) in TestsDaniel Pfeifer2016-07-271-2/+2
| | | | | | | 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'
* Add a variable to specify language-wide system include directoriesBrad King2016-05-254-0/+11
| | | | | | | Create a `CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES` variable to specify system include directories for for `<LANG>` compiler command lines. This plays a role for include directories as the existing `CMAKE_<LANG>_STANDARD_LIBRARIES` variable does for link libraries.
* Revise C++ coding style using clang-formatKitware Robot2016-05-1610-11/+21
| | | | | | | | | | | | | 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-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Tests: Use C-Style comments in C sources and headersMarc Chevrier2015-09-251-3/+3
| | | | | Not all C compilers tolerate C++-style comments in C code, so do not use them in our tests.
* target_include_directories: Support relative SYSTEM include dirs (#15464)Gregor Jasny2015-08-111-0/+10
|
* IncludeDirectories: Respect SYSTEM flag when using CONFIG genex.Stephen Kelly2015-01-223-1/+23
| | | | | Update the Makefile and Ninja generators to use the config when requesting the include flags.
* cmTarget: Fix system include annotation propagation.Stephen Kelly2014-01-061-0/+4
| | | | | | | | | | | | Direct users of IMPORTED targets treat INTERFACE_INCLUDE_DIRECTORIES as SYSTEM, after commit a63fcbcb (Always consider includes from IMPORTED targets to be SYSTEM., 2013-08-29). It was intended that transitive use of an IMPORTED target would have the same behavior, but that did not work. The implementation processed only direct dependencies in cmTarget::FinalizeSystemIncludeDirectories. Implement transitive evaluation of dependencies by traversing the link interface of each target in the link implementation.
* Add a test for SYSTEM headers in INTERFACE libraries.Stephen Kelly2013-10-093-0/+51
|
* Clang: Add separate "AppleClang" compiler idBrad King2013-10-081-1/+1
| | | | | | | | | | | | Apple distributes their own Clang build with their own version numbers that differ from upstream Clang. Use the __apple_build_version__ symbol to identify the Apple Clang compiler and report the Apple Build Version as the fourth version component in CMAKE_<LANG>_COMPILER_VERSION. Add Compiler/AppleClang-<lang> and Platform/Darwin-AppleClang-<lang> modules that simply include the upstream equivalents. Fix comparisons of CMAKE_<LANG>_COMPILER_ID to Clang in CMake's own source and tests to account for AppleClang.
* Fix OLD behavior of CMP0021.Stephen Kelly2013-08-244-0/+31
| | | | | | | | | Exclude Ninja and Xcode from the CMP0021 test They do not behave the same as the makefile generator with relative paths. Don't overwrite the header file for in-source builds.
* Remove the LINK_LANGUAGE generator expression.Stephen Kelly2013-07-241-6/+6
| | | | | | | | | | | 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.
* Add the INTERFACE_SYSTEM_INCLUDE_DIRECTORIES target property.Stephen Kelly2013-07-167-0/+82
| | | | | | | | Unlike other target properties, this does not have a corresponding non-INTERFACE variant. This allows propagation of system attribute on include directories from link dependents.
* Merge topic 'fix-genex-HEAD-target'Brad King2013-06-052-0/+11
|\ | | | | | | | | 5b22235 Genex: Fix the HEAD target used for evaluated expressions
| * Genex: Fix the HEAD target used for evaluated expressionsStephen Kelly2013-06-052-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the expression $<TARGET_PROPERTY:prop> appears in the content of a target property, the target that prop is read from is the 'head target' of the expression. In contexts such as evaluating the content of a target property during generation, such as INCLUDE_DIRECTORIES, the 'head target' is the one on which the initial request was made. If evaluating a generator expression which is not a target property content, the target must be explicitly specified. Such contexts include add_custom_command and file(GENERATE). The content might then look like $<TARGET_PROPERTY:tgt,prop> However, as there is no HeadTarget set, any generator expressions evaluated as part of reading prop from tgt which do not specify the tgt directly report an error. Modify the logic of the TARGET_PROPERTY generator expression so that in such contexts, the 'head target' is set to the appropriate target which was first encountered.
* | Merge topic 'test-INCLUDE_DIRECTORIES-genex-read'Brad King2013-05-313-0/+33
|\ \ | | | | | | | | | | | | 07f9e15 GenexEval: Test evaluation of INCLUDE_DIRECTORIES target property.
| * | GenexEval: Test evaluation of INCLUDE_DIRECTORIES target property.Stephen Kelly2013-05-303-0/+33
| |/
* | Merge topic 'language-generator-expressions'Brad King2013-05-243-0/+24
|\ \ | | | | | | | | | | | | 3241014 Add $<LINK_LANGUAGE> generator expression
| * | Add $<LINK_LANGUAGE> generator expressionStephen Kelly2013-05-243-0/+24
| | | | | | | | | | | | | | | | | | 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.
* | | Merge topic 'fix-include_directories-whitespace-handling'Brad King2013-05-241-1/+4
|\ \ \ | | | | | | | | | | | | | | | | a97240b Tests/IncludeDirectories: Avoid shared library with no symbols
| * | | Tests/IncludeDirectories: Avoid shared library with no symbolsBrad King2013-05-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | The parent commit added a empty_entry_test shared library to the IncludeDirectories test. Some toolchains fail to create a shared library with no user-defined symbols, so provide a dummy symbol.
* | | | Merge topic 'join-genex'Brad King2013-05-222-0/+6
|\ \ \ \ | |/ / / |/| / / | |/ / | | | | | | | | | | | | a7ba452 Add the JOIN generator expression. 96ec314 Make it possible for any genex to have arbitrary content at the end. bd638ee Rename the method determining if a genex accepts arbitrary content. dc742fe Extract the ProcessArbitraryContent method.
| * | Add the JOIN generator expression.Stephen Kelly2013-05-162-0/+6
| |/ | | | | | | | | | | 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.
* | include_directories: Fix handling of empty or space-only entriesStephen Kelly2013-05-212-0/+12
|/ | | | | | | | | This is a regression introduced in commit 0d46e9a0 (Store includes from the same include_directories call together., 2013-01-20). Reported at http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/46695/focus=7847
* Fix clearing of the INCLUDE_DIRECTORIES DIRECTORY property.Stephen Kelly2013-04-101-0/+11
| | | | | This was broken by commit 18a3195a (Keep track of INCLUDE_DIRECTORIES as a vector of structs., 2012-11-19).
* Don't use LINKED where not needed.Stephen Kelly2013-02-121-1/+1
|
* Test workaround of bad interface include directories from depends.Stephen Kelly2013-01-311-0/+41
|
* Merge topic 'interface-includes-defines'Brad King2013-01-071-0/+31
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 894f52f Handle INTERFACE properties transitively for includes and defines. f5b1980 Populate the ExportedTargets member early in GenerateMainFile c67b812 Make cycles in target properties ignored, not an error. d0f950f Use mapped config properties to evaluate $<CONFIG> 26def17 Make all relevant targets available in the genex context. 0c657dc Add API to populate INTERFACE properties in exported targets. e04f737 Add API to extract target names from a genex string. b0c8f73 Add the TARGET_NAME generator expression. 77475fe Allow generator expressions to require literals. b2f1700 GenEx: Add expressions to specify build- or install-only values
| * Handle INTERFACE properties transitively for includes and defines.Stephen Kelly2013-01-051-0/+31
| | | | | | | | | | Contextually, the behavior is as if the properties content from another target is included in the string and then the result is evaluated.
* | Add test for custom command with a genex referring to a target.Stephen Kelly2013-01-071-0/+6
|/ | | | | This test failed before d8a59ea4 (Port cmGeneratorExpression to cmTarget from cmGeneratorTarget, 2012-10-27), and passes after.
* GexEx: Validate Target names and property names differently.Stephen Kelly2012-10-222-0/+12
| | | | | In the unit test, use the same IMPORTED_LOCATION trick that the ExportImport test uses.
* GenEx: Test the use of generator expressions to generate lists.Stephen Kelly2012-10-172-0/+6
| | | | | | 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 INCLUDE_DIRECTORIES property.Stephen Kelly2012-09-283-0/+13
| | | | | This use of generator expressions, like all others to come which operate on target properties, must initalize the dag checker.
* 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.
* Extract and use the INCLUDE_DIRECTORIES target properties.Stephen Kelly2012-02-223-0/+38
| | | | | | | | | Eliminate callers of cmMakefile::GetIncludeDirectories. All callers of GetIncludeDirectories should go through the local generator object. Only the local generator calls cmTarget::GetIncludeDirectories directly.
* One more try. Use full path by default, and relative on broken compilers.Bill Hoffman2011-06-031-5/+29
|
* Use bin tree for inclues to avoid -I with spaces in the path.Bill Hoffman2011-06-035-8/+17
|
* Append and do not clobber CMAKE_CXX_FLAGS in the test.Bill Hoffman2011-06-031-1/+1
|
* Fix for bug#10798. VS10 did not append -I flags with COMPILE_FLAGS prop.Bill Hoffman2011-06-026-0/+23
This fix adds a test for this case for all generators.