Commit Graph

12 Commits

Author SHA1 Message Date
Brad King 86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Gregor Jasny c66835fc37 Extra Generator: Populate MSVC system include paths from environment (#15597) 2015-08-18 22:30:55 +02:00
Christian Manning eaf6f67f67 Code Blocks/Eclipse: Add -std= flag matching.
When -std=x is specified in CMAKE_CXX_FLAGS this passes it along.
2014-11-03 09:19:18 -05:00
Christian Manning 45a25d63ba Code Blocks/Eclipse: Use non-default stdlib includes when specified.
When -stdlib=x is specified in CMAKE_CXX_FLAGS this passes it along so
that the correct include dirs are detected.
2014-11-03 09:18:44 -05:00
Ben Boeckel 29c3edb87a Avoid if() quoted auto-dereference
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.
2014-10-20 11:49:16 -04:00
Alex Neundorf a396b6ece2 Eclipse: also detect include dirs and macro for clang (#13823)
Alex
2013-02-10 18:58:27 +01:00
Alex Neundorf d97b38529e Eclipse on OSX: fix handling of framework include dirs (#13464)
On OSX, the output from gcc looks like this:
 /usr/include/c++/4.2.1
 /usr/include/c++/4.2.1/i686-apple-darwin10/x86_64
 /usr/include/c++/4.2.1/backward
 /usr/lib/gcc/i686-apple-darwin10/4.2.1/include
 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.

The "(framework directory)" part needs to be removed so that Eclipse handles it properly

Alex
2012-08-16 23:02:10 +02:00
Kitware Robot 9db3116226 Remove CMake-language block-end command arguments
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
2012-08-13 14:19:16 -04:00
Kitware Robot 77543bde41 Convert CMake-language commands to lower case
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
2012-08-13 14:19:16 -04:00
Alex Neundorf d7bc8dd6ea Eclipse: fix #13313, always set LANG to C, also if unset
Otherwise include dir detection does not work with MinGW on french systems.

Alex
2012-06-25 23:09:27 +02:00
Alex Neundorf 3df49dc7b1 fix #12392: handle CMAKE_CXX_COMPILER_ARG1 for Eclipse projects
CMAKE_CXX/C_COMPILER_ARG1 have to be used for finding the include
dirs and builtin macros, so Eclipse can do code completion

Alex
2011-10-01 19:09:24 +02:00
Alex Neundorf e2e8c0a412 Also put builtin include dirs into CodeBlocks project file
Refactor code from CMakeFindEclipseCDT4.cmake so it can be used
alkso for CodeBlocks, and move it into new file
CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake.

Alex
2011-08-02 01:46:39 +02:00