Commit Graph

20 Commits

Author SHA1 Message Date
Brad King d929c35f08 CMakeForceCompiler: Deprecate this module and its macros
We originally deprecated this module in commit v3.5.0-rc1~295^2
(CMakeForceCompiler: Deprecate this module and its macros, 2015-10-19).
Then a use case was found to still require the module so the deprecation
was reverted for CMake 3.5 by commit v3.5.0-rc3~4^2 (CMakeForceCompiler:
De-deprecate until more use cases have alternatives, 2016-02-17).  Since
then `CMAKE_TRY_COMPILE_TARGET_TYPE` was introduced to provide an
alternative solution for that use case.  Deprecate the module again.
2016-03-08 10:42:28 -05:00
Brad King beaa4fa5dd CMakeForceCompiler: De-deprecate until more use cases have alternatives
We deprecated this module in commit v3.5.0-rc1~295^2
(CMakeForceCompiler: Deprecate this module and its macros, 2015-10-19)
in order to determine whether anyone still has use cases that require
it.  Indeed we still need to provide a way to work with toolchains that
cannot link binaries without special flags.  Remove the deprecation
warnings until we can provide an alternative to the module for this use
case.
2016-02-17 09:15:18 -05:00
Brad King ed77504d89 CMakeForceCompiler: Deprecate this module and its macros
This module was added by commit v2.6.0~1489 (...supporting embedded
compilers..., 2007-07-02) to avoid needing to build the compiler id
detection source on toolchains that need special flags or linker files
to produce executables.  Since then CMake has learned other ways to
identify such compilers (e.g. passing vendor-specific version flags and
checking for vendor-specific banners in the output).  Furthermore, CMake
now detects a lot more than just the compiler id during language
initialization in order to support things like <LANG>_STANDARD and
COMPILE_FEATURES.  Therefore CMakeForceCompiler is no longer a viable
approach because it skips such detection.

One remaining challenge to support toolchains that require special
linker files is to build the test for a working compiler, compiler ABI
detection binary, and other try_compile cases.  This will have to be
worked out as such cases are encountered.
2015-10-19 11:09:27 -04: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
Kitware Robot f051814ed0 Convert builtin help to reStructuredText source files
Run the convert-help.bash script to convert documentation:

 ./convert-help.bash "/path/to/CMake-build/bin"

Then remove it.
2013-10-15 14:12:03 -04:00
Brad King 3df81b4912 Move CMAKE_<LANG>_COMPILER_WORKS to compiler information files
Since the parent commit this test result is specific to the version of
CMake.  Store it in the version-specific compiler information files
instead of CMakeCache.txt so testing can be re-done to meet the
requirements of the current version of CMake even if another version of
CMake was already used to configure the build tree.
2012-08-24 10:52:23 -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
Todd Gamblin 2cde67a781 Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
Brad King 126c93cdda Provide macro to force Fortran compiler
We add the macro CMAKE_FORCE_Fortran_COMPILER to the cross-compiling
helper module CMakeForceCompiler.cmake so that toolchain files can force
a Fortran compiler as well as C and C++ compilers.  See issue #10032.
2009-12-14 11:40:23 -05: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 5f8feedbac STYLE: Fixed docs of new CMakeForceCompiler 2008-03-03 11:18:49 -05:00
Brad King e124891b0c ENH: Restore CMAKE_FORCE_C_COMPILER and CMAKE_FORCE_CXX_COMPILER macros in CMakeForceCompiler module. 2008-03-03 11:16:32 -05:00
Brad King 8375bb4768 ENH: Remove unnecessary compiler force macros. The compiler ID can now be detected without linking an executable. 2008-02-14 10:50:43 -05:00
Brad King bbbb2be765 BUG: When forcing the C and CXX compilers do not try to detect the ABI information. Cleanup configured language compiler info files by always using @ONLY. This addresses bug#6297. 2008-02-03 17:24:50 -05:00
Alexander Neundorf f35f1ac9ab STYLE: fix typo in the docs
Alex
2007-08-24 08:40:57 -04:00
Alexander Neundorf 021ceea1b0 ENH: second try for handling the linker language with integer priority values (returning a pointer to a string on the stack is no good idea)
Alex
2007-07-12 08:37:10 -04:00
Alexander Neundorf 16705a3e87 COMP: revert last commit for now, broke Visual Studio
Alex
2007-07-11 17:29:27 -04:00
Alexander Neundorf bea1a5de77 ENH: CMAKE_<LANG>_LINKER_PREFERENCE is now an integer priority, not a
two-step priority (None or Prefered)
Current order: ASM 0, C 10, Fortran 20, CXX 30, Java 40
This is the same order as automake choses:
http://www.gnu.org/software/automake/manual/html_node/How-the-Linker-is-Chosen.html

This change should be backward compatible:
if there is a project using fortran and CXX, they had to set the
LINKER_LANGUAGE explicitely, otherwise cmake complained (but still generated
the project files). Explicitely setting the linker language still overrides
automatic detection.
If somebody has a custom language for cmake and the PREFERENCE starts with
"P", its changed to 100, which gives it preference over all other languages
(except the other custom languages which have also "Prefered"). "None" is
converted to 0.

Alex
2007-07-11 16:22:04 -04:00
Alexander Neundorf fda7753f5c ENH: make supporting embedded compilers need a user specific linker file for
compiling an executable (amd thus cannot build the compiler-id program)
easier by providing CMAKE_FORCE_XXX() macros which force cmake to use the
given compilers anyway

Alex
2007-07-02 14:18:16 -04:00