Commit Graph

35 Commits

Author SHA1 Message Date
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 0bfabf967f OpenBSD: Use 'arch -s' for host processor (#12143)
On OpenBSD 'uname -p' returns a long descriptive name for the processor.
Use 'arch -s' instead to get a short cpu name.

Suggested-by: Stuart Henderson
2011-05-02 10:33:18 -04:00
Yaakov Selkowitz 2412d9bc0e Use 'uname -m' for processor on Cygwin (#10774)
POSIX requires 'uname -m' but not 'uname -p':

  http://www.opengroup.org/onlinepubs/9699919799/utilities/uname.html

Indeed Cygwin 'uname -p' returns "unknown".
2010-09-21 17:32:49 -04:00
Todd Gamblin 2cde67a781 Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
Brad King 451d68b7e3 Support GNU/kFreeBSD
GNU/kFreeBSD = FreeBSD kernel + userspace with glibc.  Linux.cmake
doesn't contain anything too OS specific, so we can forward to it.

Here are outputs of /bin/uname on author's machine:
  uname -p ==> i386
  uname -o ==> GNU/kFreeBSD
  uname -s ==> GNU/kFreeBSD
  uname -r ==> 5.4-1-686

Patch from Modestas Vainius.  See issue #9659.
2009-10-05 10:26:50 -04: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
Alexander Neundorf b100fe1fe1 STYLE: don't use an extra file to generate CMakeSystem.cmake but instead
configure the toolchain file into it if required
-also search for nm, objdump and objcpy, so these can be used in macros

Alex
2007-08-15 14:26:00 -04:00
Alexander Neundorf 512e0d40ef ENH: set UNIX, WIN32 and APPLE in cmMakefile.cxx as it was before, so it
works for scripts, then reset them in CMakeSystemSpecificInformation.cxx, so
the platform modules can set them again for the target system

Alex
2007-08-10 09:07:39 -04:00
Alexander Neundorf 176fe63d15 ENH: UNIX, CYGWIN, WIN32, APPLE, QNXNTO and BEOS are not longer set in
cmMakefile.cxx, but now in the platform files and are now valid for the
target platform, not the host platform.
New variables CMAKE_HOST_WIN32, CMAKE_HOST_UNIX, CMAKE_HOST_APPLE and
CMAKE_HOST_CYGWIN have been added in cmMakefile.cxx (...and have now to be
used in all cmake files which are executed before
CMakeSystemSpecificInformation.cmake is loaded). For compatibility the old
set is set to the new one in CMakeDetermineSystem.cmake and reset before the
system platform files are loaded, so custom language or compiler modules
which use these should still work.

Alex
2007-08-09 14:45:23 -04:00
Alexander Neundorf 8a6e2bb81d ENH: determine the current system also in cpack, so the search paths are
loaded
Additionally the makefile in cmCPackGenericGenerator is now protected
instead of private, so with these two changes the cpack generators should
now be able to find their tools and how to call these tools from cmake
scripts, instead of hardcoding the search order and command line (as done
e.g. in cmCPackZIPGenerator.cxx)

Alex
2007-07-24 10:00:26 -04:00
Alexander Neundorf eab5a4350d ENH: also load a processor-specific file if exists
-also try the basename file if the compiler id file doesn't exist
-don't rely so much on the CMAKE_TOOLCHAIN_FILE

Alex
2007-06-05 10:28:43 -04:00
Alexander Neundorf eed7c8dec1 ENH: always provide CMAKE_SYSTEM_XXX() and MAKE_HOST_SYSTEM_XXX() variables,
so when cross compiling the build host platform can be tested

Alex
2007-05-29 11:36:07 -04:00
Alexander Neundorf 6e2fd2c2ca BUG: now the toolchain file is configured into the buildtree, otherwise e.g.
CMAKE_SOURCE_DIR can't be used there
ENH: modify CMakeCCompilerId.c and .h so that sdcc can compile them. As they
were the preprocessor produced:

 9 "test.c"
static char const info_compiler[] = "INFO:compiler["
# 40 "test.c"
""

"]";

and the mixing of the preprocessing directives and the string constants
didn't work.

Alex
2007-05-22 12:48:16 -04:00
Alexander Neundorf 71359f5b9d STYLE: use a separate source file for generating CMakeSystem.cmake if CMAKE_TOOLCHAIN_FILE is used
Alex
2007-05-21 11:26:40 -04:00
Brad King daca282db4 BUG: Use @ONLY substitution to configure CMakeSystem.cmake. 2007-05-20 10:08:38 -04:00
Alexander Neundorf 61d3444f93 ENH: merge CMake-CrossCompileBasic to HEAD
-add a RESULT_VARIABLE to INCLUDE()
-add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain
-have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system)
-use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to
run the executables if they have a different suffix because they are
probably crosscompiled, but nevertheless it should be able to find them
-make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE
-support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.)
-move ranlib on OSX from the file command to a command in executed in cmake_install.cmake
-add support for stripping during install in cmake_install.cmake
-split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools
-remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms
-create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these
-add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a
list of directories which will be prepended to all search directories, right
now as a cmake variable, turning it into a global cmake property may need
some more work
-remove cmTestTestHandler::TryExecutable(), it's unused
-split cmFileCommand::HandleInstall() into slightly smaller functions

Alex
2007-05-17 13:20:44 -04:00
Bill Hoffman d7b5020a2e ENH: better processor detection on linux 2007-02-21 10:29:36 -05:00
Ken Martin 8e9a6beccc ENH: centralized locaiton of CMakeFiles setting 2006-06-14 12:28:32 -04:00
Bill Hoffman 52a6524dbf ENH: check return value for uname -p 2006-05-14 20:17:41 -04:00
Bill Hoffman 21564b4d61 ENH: check return value for uname -p 2006-05-14 17:42:27 -04:00
Bill Hoffman b7fa820118 ENH: add documentation support for modules 2005-12-14 13:51:08 -05:00
Ken Martin c6b011e35e ENH: put cmake files intoa CMakeFiles subdir to clean up bin tree 2005-07-29 09:19:25 -04:00
Bill Hoffman 476f278c76 fix number of arguments 2004-12-16 22:18:49 -05:00
Bill Hoffman 080a626d8f ENH: fix for OpenBSD 2004-12-16 17:26:59 -05:00
Andy Cedilnik 46aaf2dae8 ERR: On systems where uname does not support -p, try -m. Fixes Bug #426 - CMAKE_SYSTEM_PROCESSOR unknown and inconsistent 2003-12-29 14:26:46 -05:00
Andy Cedilnik 8149dbed29 ENH: Cleanups and add missing CMakeOutput.log and CMakeError.log appending. Close Bug #136 - Verify that all modules that do try compile produce CMakeError.log and CMakeOutput.log 2003-08-08 11:59:07 -04:00
Bill Hoffman 79c298e12c ENH: set CMAKE_SYSTEM_VERSION for windows 2003-07-16 15:38:31 -04:00
Bill Hoffman 43e5e88042 ENH: add processor type of win32 2003-06-11 10:11:53 -04:00
Bill Hoffman 3021918293 ENH: add CMAKE_SYSTEM_PROCESSOR 2003-06-11 10:07:57 -04:00
Bill Hoffman bd74882d3e ENH: use CMAKE_ROOT and not PROJECT_ for try compile stuff, this allows projects within projects to have different languages 2002-12-17 14:54:25 -05:00
Bill Hoffman f5d95fb078 Complete rework of makefile generators expect trouble 2002-11-08 15:46:08 -05:00
Bill Hoffman 319c3adf2a *** empty log message *** 2002-10-25 14:08:17 -04:00
Bill Hoffman fa782867b3 closer to removing autoconf 2002-10-23 16:53:53 -04:00
Bill Hoffman b1114a344f new cmake based configuration 2002-10-22 10:34:07 -04:00