Commit Graph

25 Commits

Author SHA1 Message Date
Brad King 152bbe5068 Modules: Fix typos in name of `CMAKE_COMPILER_IS_GNUCC` variable
It is not called `CMAKE_COMPILER_IS_GNUC` (without last `C`).

Closes: #16297
2016-09-14 10:12:30 -04:00
Brad King b5a467262b Merge topic 'drop-ancient-workarounds'
0f7bdd61 Remove VS 6 special case.
5e92c826 Remove some obsolete stuff.
15e42bb2 cmStandardIncludes: Remove obsolete cmOStringStream.
931e055d Port all cmOStringStream to std::ostringstream.
f194a009 Remove unused cmIStringStream class.
3ec1bb15 cmStandardIncludes: Remove std namespace hack.
bb3bce70 cmStandardIncludes: Remove ANSI_FOR_SCOPE hack.
28fa4923 cmStandardIncludes: Remove iostreams workaround for obsolete Compaq compiler.
837a8a63 cmStandardIncludes: Drop Comeau-related workaround.
4030ddfd Remove Borland-related undef.
17d6a6fd cmStandardIncludes: Remove comment about Borland.
26fb5011 Drop SGI as a CMake host compiler.
2015-01-12 08:57:39 -05:00
Stephen Kelly 0f7bdd61da Remove VS 6 special case. 2015-01-11 17:06:04 +01:00
Stephen Kelly 5e92c82655 Remove some obsolete stuff.
We don't need to run compiler tests for ansi-for etc anymore. All
supported compilers support the features tested here.
2015-01-11 17:06:04 +01:00
Stephen Kelly 4c69ec6f12 SolarisStudio: Use alternative standard library to build CMake.
SolarisStudio ships a very old RogueWave standard library
implementation (libCstd) and uses it by default for backward compatibility.
The macros defined when building the system libCstd need to be the same as
the macros defined when using it for binary compatibility reasons etc.  The
SolarisStudio compiler driver adds macros such as _RWSTD_NO_MEMBER_TEMPLATES and
_RWSTD_NO_CLASS_PARTIAL_SPEC etc. These macros disable certain APIs in the
standard library headers.

Although the compiler supports the features 'member templates' and 'partial
template specialization', the standard library does not provide APIs which
rely on those features.  This means that std::vector::insert in libCStd does
not accept a pair of iterators from a different type of container, because
that requires member templates, and reverse_iterator<const T> can not
be constructed from a reverse_iterator<T> because that requires partial
specialization (or at least the _RWSTD_NO_CLASS_PARTIAL_SPEC define) and
member templates.

This causes many problems while building CMake using SolarisStudio, which
have not been well understood until now.  The problems are usually
attributed to compiler limitations, while actually the problem is in
the standard library, as in commit v3.0.0-rc1~99^2~1 (Help: Document non-use
of std::set::insert., 2014-01-24) and commit 107dcac3 (Fix compilation with
the Oracle / Sun compiler (#15318), 2014-12-12).

SolarisStudio 12.3 and earlier also ships a version of stlport which may be
used instead of libCstd by specifying -library=stlport4

 https://docs.oracle.com/cd/E18659_01/html/821-1383/bkakg.html

SolarisStudio 12.4 ships a version of libstdc++ from GCC 4.8.2 which may be
used by specifying -std=c++03 or -std=c++11 etc

 http://docs.oracle.com/cd/E37069_01/html/E37075/bkamw.html#OSSCPgnaof

Use these more-capable standard library implementations when building cmake.
This will allow more use of 'normal' C++ (such as std::vector::insert), and cause
fewer surprises resulting from dashboards using SolarisStudio.

Because cmake is not a library linked against by 3rd parties and does not have
external dependencies, issues related to mixing code using libCStd and libstdc++
do not apply.
2015-01-11 17:00:55 +01:00
Brad King 6431cc641b Merge topic 'fix-gcc-hppa'
04f442f7 Workaround for short jump tables on PA-RISC.
2014-11-10 10:43:01 -05:00
Chuck Atkins 04f442f755 Workaround for short jump tables on PA-RISC.
The PA-RISC architecture requires special options for GCC to prevent
linker errors when libraries reach a certain size and / or complexity.
See http://mraw.org/blog/2007/10/10/Linking_on_hppa and gcc
documentation on -mlong-calls.
2014-11-10 10:26:30 -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
Brad King 18aaed77c0 Merge topic 'matches-cleanup'
f21ac16e Replace MATCHES test on numbers with EQUAL test
7eacbaed Replace MATCHES ".+" tests with NOT STREQUAL ""
3a71d34c Use CMAKE_SYSTEM_NAME instead of CMAKE_SYSTEM where sufficient
b0b4b460 Remove .* expressions from beginning and end of MATCHES regexs
5bd48ac5 Replace string(REGEX REPLACE) with string(REPLACE) where possible
2622bc3f Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)
2014-04-15 10:22:34 -04:00
Rolf Eike Beer 3a71d34cf3 Use CMAKE_SYSTEM_NAME instead of CMAKE_SYSTEM where sufficient 2014-04-14 18:17:18 +02:00
Rolf Eike Beer b0b4b4602f Remove .* expressions from beginning and end of MATCHES regexs
All these expressions work the same:
  "foo"
  ".*foo.*"
  "^.*foo.*$"

This assumes that the "Intel*" expressions were meant to be "Intel.*".
2014-04-14 18:17:11 +02:00
Rolf Eike Beer 185b4efe33 CompileFlags: add better selection which aCC version gets -AA +hpxstd98 flags 2014-04-13 00:48:02 +02:00
Rolf Eike Beer be53734d3c CompileFlags: Add -AA +hpxstd98 on HP-UX 11.11 with aCC
These flags are needed to enable support for C++98.  Also teach the
'bootstrap' script to add them if necessary.
2014-04-04 13:31:28 -04:00
Rolf Eike Beer f4b9c6bbeb CompileFlags: Test for C++ features after selecting flags
Some flags we select may affect availability of C++ features.
2014-04-04 13:30:25 -04:00
Guy Martin 8f2c2ccb0b Improve ld flags for CMake itself on Linux/HPPA
Workaround binutils bug by only marking unique section starting by
".text._".

This adds the HPPA workaround improved in commit b22a0f15 (bootstrap:
improve ld flag for Linux/HPPA builds, 2014-01-14) not only to the
bootstrap, but also to the normal build.
2014-01-17 09:23:31 -05:00
Rolf Eike Beer e496c54021 Linux/PA-RISC: Link with --unique=.text.* to help binutils
There is a binutils bug that leads to errors like this:

/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.6.3/../../../../hppa2.0-unknown-linux-gnu/bin/ld: libCMakeLib.a(cmTarget.cxx.o)(.text+0x12084): cannot reach 00001d28__ZNSspLEPKc@@GLIBCXX_3.4+0, recompile with -ffunction-sections
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.6.3/../../../../hppa2.0-unknown-linux-gnu/bin/ld: libCMakeLib.a(cmTarget.cxx.o)(.text+0x12084): cannot handle R_PARISC_PCREL17F for std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator+=(char const*)@@GLIBCXX_3.4
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.6.3/../../../../hppa2.0-unknown-linux-gnu/bin/ld: final link failed: Bad value

Until someone finds out what needs to be fixed in binutils this allows anyone
to compile a working CMake even in debug mode.
2012-10-31 16:28:51 -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
Kitware Robot 7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -04:00
Brad King 054b587504 Re-disable MSVC CRT deprecation warnings
The commit "Disable Intel CRT deprecation warnings" broke the logic that
disabled MS's CRT deprecation warnings.  This fixes the logic to disable
the warnings for both MSVC and Intel.
2009-10-28 08:42:20 -04:00
Brad King 6720d31ed0 Disable Intel CRT deprecation warnings
The Intel Compiler for Windows uses the MS runtime library which
deprecates many C functions.  We define _CRT_SECURE_NO_DEPRECATE and
_CRT_NONSTDC_NO_DEPRECATE to disable the deprecation warnings.
2009-10-27 12:11:08 -04:00
Brad King 96afb12087 Convert CMake to OSI-approved BSD License
This converts the CMake license to a pure 3-clause OSI-approved BSD
License.  We drop the previous license clause requiring modified
versions to be plainly marked.  We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Bill Hoffman 7491f52992 ENH: first pass at VS 10, can bootstrap CMake, but many tests still fail 2009-06-25 16:41:57 -04:00
Brad King d2f901bebf COMP: Fix warnings on VS9. 2008-01-30 07:44:24 -05:00
Ken Martin 0577543cbc ENH: start trying to cleanup CMakeLists files 2007-05-10 14:08:15 -04:00