summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineSystem.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Fix CMAKE_HOST_SYSTEM_PROCESSOR detection on GNU/Hurd (#15147)Felix Geyer2014-09-101-1/+1
| | | | | On Debian GNU/Hurd 'uname -p' prints "unknown", so use 'uname -m' instead.
* Replace string(REGEX REPLACE) with string(REPLACE) where possibleRolf Eike Beer2014-04-141-2/+2
| | | | The simple replacement is much faster.
* OS X: Use 'uname -m' for processor (#14712)Brad King2014-01-201-1/+6
| | | | | | | | | | | | In commit 2412d9bc (Use 'uname -m' for processor on Cygwin, 2010-09-21) it was pointed out that POSIX requires 'uname -m' but not 'uname -p': http://www.opengroup.org/onlinepubs/9699919799/utilities/uname.html On OS X x86_64, 'uname -p' returns i386 while 'uname -m' returns x86_64. Since the latter is the POSIX-compliant option trust its value. However, on OS X ppc, 'uname -m' returns 'Power Macintosh' so add a special-case to convert that to 'powerpc'.
* Drop use of configure_file IMMEDIATE optionDaniele E. Domenichelli2013-11-131-1/+1
| | | | | | Since commit 7d47c693 (Drop compatibility with CMake < 2.4, 2013-10-08) we no longer need to use the configure_file IMMEDIATE option to support compatibility modes less than 2.0.
* fix Windows processor detectionRolf Eike Beer2013-03-061-1/+1
| | | | Thanks to Martin Koller for this.
* properly detect processor architecture on WindowsRolf Eike Beer2013-02-251-1/+5
| | | | | | | | CMake is usually run as a 32 bit process even on 64 bit Windows, so the PROCESSOR_ARCHITECTURE environment variable would always return x86. This post gives a description on how to do it properly: http://blogs.msdn.com/b/david.wang/archive/2006/03/26/howto-detect-process-bitness.aspx
* VS: Make DetermineCompilerId working with WinCE tooPatrick Gansterer2012-11-271-0/+6
| | | | | | Add a dummy mainCRTStartup() function, since the linker searches for it instead of main() and set the CMAKE_SYSTEM_* variables depending on the MSVC_C_ARCHITECTURE_ID and CMAKE_VS_WINCE_VERSION variables.
* Make platform information files specific to the CMake versionBrad King2012-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | At the top of a build tree we configure inside the CMakeFiles directory files such as "CMakeSystem.cmake" and "CMake<lang>Compiler.cmake" to save information detected about the system and compilers in use. The method of detection and the exact results store varies across CMake versions as things improve. This leads to problems when loading files configured by a different version of CMake. Previously we ignored such existing files only if the major.minor part of the CMake version component changed, and depended on the CMakeCache.txt to tell us the last version of CMake that wrote the files. This led to problems if the user deletes the CMakeCache.txt or we add required information to the files in a patch-level release of CMake (still a "feature point" release by modern CMake versioning convention). Ensure that we always have version-consistent platform information files by storing them in a subdirectory named with the CMake version. Every version of CMake will do its own system and compiler identification checks even when a build tree has already been configured by another version of CMake. Stored results will not clobber those from other versions of CMake which may be run again on the same tree in the future. Loaded results will match what the system and language modules expect. Rename the undocumented variable CMAKE_PLATFORM_ROOT_BIN to CMAKE_PLATFORM_INFO_DIR to clarify its purpose. The new variable points at the version-specific directory while the old variable did not.
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-23/+23
| | | | | | | | | | | | | | | | | 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
* Convert CMake-language commands to lower caseKitware Robot2012-08-131-86/+86
| | | | | | | | | | | | | | | | | 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
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-26/+26
| | | | | | | | | | | | | | | | | 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/ \+$//'
* OpenBSD: Use 'arch -s' for host processor (#12143)Brad King2011-05-021-2/+5
| | | | | | | 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
* Use 'uname -m' for processor on Cygwin (#10774)Yaakov Selkowitz2010-09-211-3/+3
| | | | | | | | POSIX requires 'uname -m' but not 'uname -p': http://www.opengroup.org/onlinepubs/9699919799/utilities/uname.html Indeed Cygwin 'uname -p' returns "unknown".
* Modules: Fix spelling 'To distributed' -> 'To distribute'Todd Gamblin2010-08-091-1/+1
|
* Support GNU/kFreeBSDBrad King2009-10-051-0/+6
| | | | | | | | | | | | | 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.
* Convert CMake non-find modules to BSD LicenseBrad King2009-09-281-0/+13
| | | | | | | 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.
* STYLE: don't use an extra file to generate CMakeSystem.cmake but insteadAlexander Neundorf2007-08-151-19/+10
| | | | | | | configure the toolchain file into it if required -also search for nm, objdump and objcpy, so these can be used in macros Alex
* ENH: set UNIX, WIN32 and APPLE in cmMakefile.cxx as it was before, so itAlexander Neundorf2007-08-101-13/+0
| | | | | | | works for scripts, then reset them in CMakeSystemSpecificInformation.cxx, so the platform modules can set them again for the target system Alex
* ENH: UNIX, CYGWIN, WIN32, APPLE, QNXNTO and BEOS are not longer set inAlexander Neundorf2007-08-091-5/+18
| | | | | | | | | | | | | | 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
* ENH: determine the current system also in cpack, so the search paths areAlexander Neundorf2007-07-241-32/+37
| | | | | | | | | | | 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
* ENH: also load a processor-specific file if existsAlexander Neundorf2007-06-051-11/+22
| | | | | | | -also try the basename file if the compiler id file doesn't exist -don't rely so much on the CMAKE_TOOLCHAIN_FILE Alex
* ENH: always provide CMAKE_SYSTEM_XXX() and MAKE_HOST_SYSTEM_XXX() variables,Alexander Neundorf2007-05-291-59/+78
| | | | | | so when cross compiling the build host platform can be tested Alex
* BUG: now the toolchain file is configured into the buildtree, otherwise e.g.Alexander Neundorf2007-05-221-8/+17
| | | | | | | | | | | | | | | | | | 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
* STYLE: use a separate source file for generating CMakeSystem.cmake if ↵Alexander Neundorf2007-05-211-2/+9
| | | | | | CMAKE_TOOLCHAIN_FILE is used Alex
* BUG: Use @ONLY substitution to configure CMakeSystem.cmake.Brad King2007-05-201-1/+1
|
* ENH: merge CMake-CrossCompileBasic to HEADAlexander Neundorf2007-05-171-28/+51
| | | | | | | | | | | | | | | | | | | | | | | | -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
* ENH: better processor detection on linuxBill Hoffman2007-02-211-6/+11
|
* ENH: centralized locaiton of CMakeFiles settingKen Martin2006-06-141-2/+3
|
* ENH: check return value for uname -pBill Hoffman2006-05-151-4/+4
|
* ENH: check return value for uname -pBill Hoffman2006-05-141-6/+9
|
* ENH: add documentation support for modulesBill Hoffman2005-12-141-0/+1
|
* ENH: put cmake files intoa CMakeFiles subdir to clean up bin treeKen Martin2005-07-291-2/+2
|
* fix number of argumentsBill Hoffman2004-12-171-1/+1
|
* ENH: fix for OpenBSDBill Hoffman2004-12-161-0/+2
|
* ERR: On systems where uname does not support -p, try -m. Fixes Bug #426 - ↵Andy Cedilnik2003-12-291-0/+6
| | | | CMAKE_SYSTEM_PROCESSOR unknown and inconsistent
* ENH: Cleanups and add missing CMakeOutput.log and CMakeError.log appending. ↵Andy Cedilnik2003-08-081-0/+3
| | | | Close Bug #136 - Verify that all modules that do try compile produce CMakeError.log and CMakeOutput.log
* ENH: set CMAKE_SYSTEM_VERSION for windowsBill Hoffman2003-07-161-1/+0
|
* ENH: add processor type of win32Bill Hoffman2003-06-111-1/+1
|
* ENH: add CMAKE_SYSTEM_PROCESSORBill Hoffman2003-06-111-1/+3
|
* ENH: use CMAKE_ROOT and not PROJECT_ for try compile stuff, this allows ↵Bill Hoffman2002-12-171-1/+1
| | | | projects within projects to have different languages
* Complete rework of makefile generators expect troubleBill Hoffman2002-11-081-1/+3
|
* *** empty log message ***Bill Hoffman2002-10-251-1/+2
|
* closer to removing autoconfBill Hoffman2002-10-231-1/+3
|
* new cmake based configurationBill Hoffman2002-10-221-0/+62