Commit Graph

9 Commits

Author SHA1 Message Date
Brad King
a33a4ec68b Merge branch 'backport-vs-lang-flags' into vs-lang-flags 2020-07-23 10:58:11 -04:00
Brad King
c4109a1bc8 VS: Restore toleration of target-wide -TP flag with MSVC
Since commit 3b547e2e4b (VS: Simplify logic adding source file C/C++
language flag to MSVC, 2020-05-15, v3.18.0-rc1~139^2~1) we only add a
per-source language selection flag when the source file extension does
not match the compiler's default.  This approach breaks when a project
adds a target-wide `-TP` flag.

Although such projects likely did not work with non-VS generators, we
did support them before in Visual Studio generators.  Add a special case
to tolerate such flags again.

Fixes: #21005
2020-07-23 10:54:35 -04:00
Robert Maynard
74b1c9fc8e Explicitly specify language flag when source LANGUAGE property is set
Fixes: #14516, #20716
2020-06-09 19:41:20 -04:00
Kitware Robot
d9fd2f5402 Revise C++ coding style using clang-format
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.
2016-05-16 16:05:19 -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
Ken Martin
ce8810c4e7 ENH: preclean some warnings 2008-03-25 11:27:18 -04:00
Ken Martin
2208231aac ENH: some more CMakeList cleanups 2007-05-11 10:22:20 -04:00
Bill Hoffman
9267267b68 ENH: verbose 2007-02-20 10:57:24 -05:00
Bill Hoffman
1d8e7e9411 BUG: fix for bug 4423 set language fixes 2007-02-20 09:35:21 -05:00