summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCXXCompiler.cmake.in
Commit message (Collapse)AuthorAgeFilesLines
* Features: Add support for C++14 features.Stephen Kelly2014-05-221-0/+1
| | | | Record the features implemented by GNU 4.9 and Clang 3.4.
* Features: Add cxx_template_template_parameters.Stephen Kelly2014-04-161-0/+1
| | | | | Extend the existing feature infrastructure as needed to support both C++11 and C++98 features.
* project: Add infrastructure for recording CXX compiler featuresStephen Kelly2014-04-071-0/+3
| | | | | | | | | | | | | | Add a feature test using the compiler macros and the preprocessor to determine available features. Add a CMAKE_CXX_COMPILE_FEATURES variable which contains all features known to the loaded compiler, and a CMAKE_CXX_KNOWN_FEATURES variable containing all features known to CMake. Add language standard specific variables for internal use to determine the standard-specific compile flags to use. This will be extended to other languages in the future. Follow-up commits will add features which will be recorded by the feature test.
* Treat .m files consistently as C across all generatorsTim Blechmann2014-03-201-1/+1
| | | | | | | | | | | | | | | | | Objective C sources should be compiled with the C compiler, not C++. The Xcode generator correctly classifies ".m" sources already. The cmSystemTools::GetFileFormat method was fixed by commit v2.8.0~1782 (fix for 7045, use gcc for .m, 2008-08-19) but it is not used by any of the generator since commit v2.4.0~2819 (major changes to support addition of languages, 2004-09-22). Fix the CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS table entries so that cmGlobalGenerator::GetLanguageFromExtension tells the Makefile, Ninja, and VS IDE generators to compile ".m" sources as C. This makes behavior consistent on all generators. Signed-off-by: Tim Blechmann <tim@klingt.org>
* Ninja: use deps = gcc/msvc featurePeter Kümmel2013-10-241-1/+1
| | | | cmcldeps is now only used for .rc file processing
* CMakeDetermineCompilerId: Add notion of "simulated" id/versionBrad King2013-10-041-0/+2
| | | | | | | | | Some compilers try to simulate other compilers as a drop-in replacement supporting all the same command-line options and predefined preprocessor macros. In such cases it will be useful to have CMake load the compiler information files for the simulated compiler instead of duplicating the information. Teach CMakeDetermineCompilerId to extract the simulated compiler id and version when the compiler id detection provides it.
* OS X: Detect implicit linker framework search pathsBrad King2012-12-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we hard-coded a list of implicit framework directories but did not account for CMAKE_OSX_SYSROOT or for changes to the list across OS X versions. Instead we should automatically detect the framework directories for the active toolchain. The parent commit added the "-Wl,-v" option to ask "ld" to print its implicit directories. It displays a block such as: Framework search paths: /... Parse this block to extract the list of framework directories. Detection may fail on toolchains that do not list their framework directories, such as older OS X linkers. Always treat the paths <sdk>/Library/Frameworks <sdk>/System/Library/Frameworks <sdk>/Network/Library/Frameworks # Older OS X only /System/Library/Frameworks as implicit. Note that /System/Library/Frameworks should always be considered implicit so that frameworks CMake finds there will not override the SDK copies.
* OS X: Always generate -isysroot if any SDK is in useBrad King2012-09-211-1/+1
| | | | | | | | Drop the last use of CMAKE_OSX_SYSROOT_DEFAULT. Replace internal platform variable CMAKE_${lang}_HAS_ISYSROOT with a more general CMAKE_${lang}_SYSROOT_FLAG variable. If the -isysroot flag exists and CMAKE_OSX_SYSROOT points to an SDK (not "/") then always add it to compiler command lines. This is already done in the Xcode IDE.
* Store ABI detection results in compiler information filesBrad King2012-08-241-0/+1
| | | | | | | | | | Drop use of cache entry CMAKE_DETERMINE_<LANG>_ABI_COMPILED and replace it with variable CMAKE_<LANG>_ABI_COMPILED. Since the grandparent 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.
* Move CMAKE_<LANG>_COMPILER_WORKS to compiler information filesBrad King2012-08-241-0/+1
| | | | | | | | 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.
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-4/+4
| | | | | | | | | | | | | | | | | 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-42/+42
| | | | | | | | | | | | | | | | | 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
* Ninja: don't set cmcldeps vars to empty string when they are not definedPeter Kuemmel2012-06-091-4/+2
|
* Ninja: allow spaces in source pathPeter Kuemmel2012-06-081-0/+5
| | | | And make /showIncude prefix visible for all build rules
* Add framework to detect compiler version with its id (#12408)Brad King2011-12-071-0/+1
| | | | | | | | | | | | | | | | | | | | Teach CMakePlatformId.h to construct an "INFO:compiler_version[]" string literal from macros COMPILER_VERSION_(MAJOR|MINOR|PATCH|TWEAK) to be defined in CMake(C|CXX)CompilerId.(c|cpp) for each compiler. Provide conversion macros DEC() and HEX() to decode decimal or hex digits from integer values. Parse the version out of the compiler id binary along with the other INFO values already present. Store the result in variable CMAKE_<LANG>_COMPILER_VERSION in the format "major[.minor[.patch[.tweak]]]". Save the value persistently in CMake(C|CXX)Compiler.cmake in the build tree. Document the variable for internal use since we do not set it everywhere yet. Report the compiler version on the compiler id result line e.g. The C compiler identification is GNU 4.5.2 Report CMAKE_(C|CXX)_COMPILER_(ID|VERSION) in SystemInformation test.
* Teach find_(library|package) about Linux multiarch (#12037)Brad King2011-06-081-0/+5
| | | | | | | | | | | | | Implement support for multiarch as specified here: http://wiki.debian.org/Multiarch https://wiki.ubuntu.com/MultiarchSpec Detect the <arch> part of <prefix>/lib/<arch> from the implicit library search path from each compiler to set CMAKE_<lang>_LIBRARY_ARCHITECTURE. Define CMAKE_LIBRARY_ARCHITECTURE using one of these values (they should all be the same). Teach the find_library and find_package commands to search <prefix>/lib/<arch> whenever they would search <prefix>/lib.
* Only use .CPP .CXX and .C++ do not work by default with g+++.Bill Hoffman2010-09-021-1/+1
|
* Let CMake recognize .CPP .CXX and .C++ as c++ files.Bill Hoffman2010-09-021-2/+2
|
* Fix issue #10155 - default value of CMAKE_OSX_DEPLOYMENT_TARGET should ↵David Cole2010-01-291-0/+1
| | | | always be the empty string. When the value of CMAKE_OSX_DEPLOYMENT_TARGET is the empty string, the -mmacosx-version-min flag should not show up on the compiler command line. The logic for selecting default value of CMAKE_OSX_SYSROOT is orthogonal to and independent of the value of the deployment target. The default value for CMAKE_OSX_SYSROOT is the SDK that corresponds to the current version of Mac OSX on which cmake is running.
* -also put CMAKE_LINKER in the C and CXX compiler information filesAlexander Neundorf2010-01-221-0/+1
| | | | | | This is already done for assembler and is necessary for e.g. Symbian. Alex
* Change the way 32/64 bit compiles are detected with MSVC and intel makefile ↵Bill Hoffman2009-11-201-0/+1
| | | | builds. Use the platform ID preprocessor approach.
* Fix check for -isysroot on OS XBrad King2009-09-191-0/+2
| | | | | | | | | | | Previously we checked for this flag by parsing the version number of GCC out of 'gcc --version', but this is not reliable because the format can vary greatly. Now we run 'gcc -v --help' and look for '-isysroot' in the list of options. We also now store the result on a per-language basis in the per-compiler info file "CMake<LANG>Compiler.cmake". This is necessary to make it accessible from try-compile projects so that they generate correctly.
* Do not always propagate linker language preferenceBrad King2009-07-301-0/+1
| | | | | | | | | | | | The commit "Consider link dependencies for link language" taught CMake to propagate linker language preference from languages compiled into libraries linked by a target. It turns out this should only be done for some languages, such as C++, because normally the language of the program entry point (main) should be used. We introduce variable CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES to tell CMake whether a language should propagate its linker preference across targets. Currently it is true only for C++.
* ENH: Implicit link info for C, CXX, and FortranBrad King2009-07-231-0/+3
| | | | | | | | | | | | | This teaches CMake to detect implicit link information for C, C++, and Fortran compilers. We detect the implicit linker search directories and implicit linker options for UNIX-like environments using verbose output from compiler front-ends. We store results in new variables called CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES The implicit libraries can contain linker flags as well as library names.
* ENH: Generalize the check for sizeof void* to detect more ABI information.Brad King2008-01-211-3/+11
|
* ENH: second try for handling the linker language with integer priority ↵Alexander Neundorf2007-07-121-1/+1
| | | | | | values (returning a pointer to a string on the stack is no good idea) Alex
* COMP: revert last commit for now, broke Visual StudioAlexander Neundorf2007-07-111-1/+1
| | | | Alex
* ENH: CMAKE_<LANG>_LINKER_PREFERENCE is now an integer priority, not aAlexander Neundorf2007-07-111-1/+1
| | | | | | | | | | | | | | | | | | | 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
* ENH: split cmGlobalGenerator::SetLanguageEnabled() in two parts, where theAlexander Neundorf2007-06-111-1/+0
| | | | | | | | second part copies the values from the cmake variables into internal maps. So this can now be done after the compiler-specific information has been loaded, which can now overwrite more settings. Alex
* ENH: merge CMake-CrossCompileBasic to HEADAlexander Neundorf2007-05-171-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | -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: Merging CompilerId implementation from branch CMake-Modules-CompilerId ↵Brad King2007-04-281-1/+3
| | | | to the main tree. Changes between CMake-Modules-CompilerId-bp and CMake-Modules-CompilerId-mp1 are included.
* BUG: Need to duplicate some information from CMakeCCompiler to support ↵Brad King2006-02-091-2/+17
| | | | C++-only projects.
* ENH: fix more than one argument passed in to compilers via environmentBill Hoffman2006-01-251-1/+1
|
* ENH: make sure flags set in CC or CXX environment variables stay with the ↵Bill Hoffman2005-07-201-0/+1
| | | | compiler
* FIX: fix bug 1495Bill Hoffman2005-02-111-1/+1
|
* ENH: stuff to keep compiler tests from re-running all the timeBill Hoffman2005-01-201-7/+2
|
* BUG: fix running of cl in trycompilesBill Hoffman2005-01-171-0/+7
|
* ENH: major changes to support addition of languages from cmake modules ↵Bill Hoffman2004-09-221-1/+7
| | | | directory.
* ENH: define language extensions in cmake files and not hard coded, also fix ↵Bill Hoffman2004-09-031-0/+1
| | | | trycompile problem
* ENH: reduce the number of times gnu is tested forBill Hoffman2003-12-121-0/+1
|
* clean up flags with _init flagsBill Hoffman2002-11-111-0/+2
|
* Complete rework of makefile generators expect troubleBill Hoffman2002-11-081-1/+1
|
* *** empty log message ***Bill Hoffman2002-10-251-0/+2