Commit Graph

20 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
Brad King 3643390d49 Strip CMAKE_<LANG>_FLAGS[_<CONFIG>] initializer whitespace 2016-07-01 14:01:41 -04:00
Brad King c736de7b28 Factor an <INCLUDES> placeholder out of <FLAGS> in rule variables
Teach the Makefile and Ninja generators to substitute for an <INCLUDES>
placeholder instead of putting -I in <FLAGS>.  Update our values for

  CMAKE_<LANG>_COMPILE_OBJECT,
  CMAKE_<LANG>_CREATE_ASSEMBLY_SOURCE, and
  CMAKE_<LANG>_CREATE_PREPROCESSED_SOURCE

to place <INCLUDES> just before <FLAGS>.
2015-07-13 10:49:46 -04:00
Mikhail Nikonov 487f147fa9 Load CMAKE_USER_MAKE_RULES_OVERRIDE[_ASM] for assembler (#15108)
This is already done for C, CXX, and Fortran.
2014-08-27 09:27:36 -04: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 cd70f00ea4 Fix #12358: make optionally enabling ASM work again
Alex
2011-08-17 01:00:28 +02:00
Brad King c623008376 Initialize ASM rpath flags for executables with those for shared libs
Since the flags for executables are almost always the same as those for
shared libraries each language information file just uses the latter for
the former by default.  This reduces duplication in the compiler and
platform flag information files.
2011-03-02 13:44:13 -05:00
Alex Neundorf 78f7c592eb Fix the default CMAKE_ASM_COMPILE_OBJECT, make XL-ASM use it
Alex
2011-02-23 21:29:05 +01:00
Alex Neundorf 7456461588 Change the default rules so they fit better to the new ASM handling
CMAKE_ASM_COMPILE_OBJECT is now so that it fits for GNU, Intel, HP and Sun
ASM_ATT had to be adjusted. Also adjusted the default
CMAKE_ASM_LINK_EXECUTABLE

Alex
2011-02-23 21:21:41 +01:00
Alex Neundorf 4b40d4297a Rework the way assembler is handled, use the C/CXX compiler by default
This commit changes the way how the assembler support works in cmake.
The language "ASM" now always uses the C/Cxx compiler instead
of the assembler directly. This fixes #8392, assembler files are
not preprocessed.
If one wants to use the assembler directly, the specific
assembler "dialect" has to be enabled. I.e. to get as/gas,
you have to use now ASM-ATT, the same way for ASM_MASM and ASM_NASM.

Implemented this now for gcc.
SunStudio, IBM, HP and Intel still todo.

Alex
2011-01-30 21:03:37 +01:00
Alex Neundorf b333779e34 Detect a COMPILER_ID also for ASM.
For assembler, the "compiler ID" cannot be detected by "compiling" a
source file, since there is not source file all assemblers understand.
Instead the function CMAKE_DETERMINE_COMPILER_ID_VENDOR() is used to
run the assembler and check its output.
For this the CMAKE_DETERMINE_COMPILER_ID_VENDOR() function had to be
extended so that it creates the run directory if it doesn't exist yet.

In CMakeASMInformation.cmake now also CMAKE_ASM_COMPILER_ID is used
(but there are no such files yet, will come with the support for the
IAR toolchain).

Alex
2010-08-15 16:36:38 +02:00
Todd Gamblin 2cde67a781 Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
Alex Neundorf bca561ee46 -make CMAKE_ASM_FLAGS_INIT and friends work (#10577)
Alex
2010-05-12 22:04:31 +02:00
Brad King 3a666595c9 Convert CMake non-find modules to BSD License
This adds copyright/license notification blocks CMake's non-find
modules.  Most of the modules had no notices at all.  Some had notices
referring to the BSD license already.  This commit normalizes existing
notices and adds missing notices.
2009-09-28 11:46:51 -04:00
Brad King 19d9c824a8 BUG: Fix ASM source file extension default list
This replaces @ASM_DIALECT@ syntax with ${ASM_DIALECT} syntax so it will
be replaced correctly.  Patch from Derek Bruening.  See issue #8639.
2009-02-27 13:08:05 -05:00
Bill Hoffman 9d9582ffef ENH: fix problem where rc language recursively included itself because CMAKE_BASE_NAME was used from c compiler, do the same fix for other uses of CMAKE_BASE_NAME 2008-10-14 16:07:11 -04:00
Brad King 8868244de0 STYLE: Remove trailing whitespace. 2008-03-03 20:24:18 -05:00
Alexander Neundorf d885d45b0f ENH: add CMAKE_INCLUDE_FLAG_ASM${ASM_DIALECT} and don't allow preset
CMAKE_xxx_INFORMATION files

Alex
2007-07-11 13:39:51 -04:00
Alexander Neundorf 5b18b80b58 ENH: initial support for assembler in cmake, needs testing by our users
Alex
2007-06-28 09:14:27 -04:00