summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make platform information files specific to the CMake versionBrad King2012-08-2419-42/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Cleanly enable a language in multiple subdirectoriesBrad King2012-08-221-11/+13
| | | | | | | When a language is not enabled at the top level of a project but is enabled in multiple disjoint subdirectories we should re-use the CMake<lang>Compiler.cmake file from the first directory. Load the file whenever it exists and is not left from a different version of CMake.
* VS: Detect the compiler id and tool locationBrad King2012-08-226-9/+223
| | | | | | | Configure a hand-generated Visual Studio project to build the compiler id source file since we cannot run the compiler command-line tool directly. Add a post-build command to print out the full path to the compiler tool. Parse the full path to the compiler tool from the build output.
* VS10: Define CMAKE_VS_PLATFORM_TOOLSET variableBrad King2012-08-223-0/+22
| | | | | When the VS 10 generator selects a non-default PlatformToolset to specify for MSBuild, report the selected name in this variable.
* Xcode: Detect the compiler id and tool locationBrad King2012-08-227-1/+387
| | | | | | | | Configure a hand-generated Xcode project to build the compiler id source file since we cannot run the compiler command-line tool directly. Add a post-build shell script phase to print out the compiler toolset build setting. Run xcodebuild to compile the identification binary. Parse the full path to the compiler tool from the xcodebuild output.
* CMakeDetermineCompilerId: Prepare to detect IDE compiler idBrad King2012-08-221-27/+43
| | | | | | | | | | | | | | | Teach CMAKE_DETERMINE_COMPILER_ID to check for variable CMAKE_${lang}_COMPILER_ID_TOOL after CMAKE_DETERMINE_COMPILER_ID_BUILD to use as CMAKE_${lang}_COMPILER since it will not be known until after the IDE runs. In CMAKE_DETERMINE_COMPILER_ID_BUILD prepare a cascading "if" so we can use a generator-specific method to compile the identification source file. Leave "if(0)" as a placeholder for now and put the direct compiler invocation in "else()". After running the compiler to build the compiler identification source we file(GLOB) the list of output files as candidates for extracting the compiler information. An IDE may create directories, so exclude exclude directories from this list.
* Re-order C/C++/Fortran compiler determination logicBrad King2012-08-223-216/+207
| | | | | | | | | | | | Re-organize CMakeDetermine(C|CXX|Fortran)Compiler.cmake to search for the compiler command-line tool only under generators for which it makes sense. For the Visual Studio generators we do not expect to find the compiler tool from the environment, nor would we use the result anyway. Furthermore, set CMAKE_${lang}_COMPILER_ID_TEST_FLAGS only when it has a chance to be used. Extract _CMAKE_TOOLCHAIN_LOCATION from the compiler path after running the compiler id step so in the future that step can help find the path to the compiler.
* VS: Cleanup AddPlatformDefinitions() of Visual Studio generatorsPatrick Gansterer2012-08-2221-78/+43
| | | | | Move adding of definitions into cmGlobalVisualStudioGenerator to share code and avoid duplicate architecture string literals.
* CMake Nightly Date StampKitware Robot2012-08-151-1/+1
|
* Merge topic 'cleanup-style'Brad King2012-08-141063-20956/+20943
|\ | | | | | | | | | | | | | | | | | | | | | | | | 68bc863 Merge branch 'master' into cleanup-style a05eba5 CMakeVersion.bash: Update sed expression for lower-case 'set' 3c0488d Fix WarnUnusedUnusedViaUnset test pass/fail regex 6c2c483 Remove trailing TAB from NSIS.template.in 9db3116 Remove CMake-language block-end command arguments 77543bd Convert CMake-language commands to lower case 7bbaa42 Remove trailing whitespace from most CMake and C/C++ code be9db98 Merge topic 'watcom-compiler-version' af42ae4 Watcom: Simplify compiler version detection (#11866)
| * Merge branch 'master' into cleanup-styleBrad King2012-08-141-1/+1
| |\ | |/ |/| | | | | Conflicts: Source/CMakeVersion.cmake
* | CMake Nightly Date StampKitware Robot2012-08-141-1/+1
| |
| * CMakeVersion.bash: Update sed expression for lower-case 'set'Brad King2012-08-141-1/+1
| | | | | | | | | | | | | | Since commit 77543bde (Convert CMake-language commands to lower case, 2012-08-13) the CMakeVersion.cmake file contains lower-case 'set' commands. Teach CMakeVersion.bash to replace the lower-case name instead of the old upper-case 'SET'.
| * Fix WarnUnusedUnusedViaUnset test pass/fail regexBrad King2012-08-141-2/+2
| | | | | | | | | | | | | | After conversion of Modules .cmake files to lower case the FAIL_REGULAR_EXPRESSION for this test matched warnings in modules other than the test line itself. Make the pass and fail regular expressions specific to the file containing the lines they are testing.
| * Remove trailing TAB from NSIS.template.inBrad King2012-08-141-1/+1
| | | | | | | | | | | | This was missed by commit 7bbaa428 (Remove trailing whitespace from most CMake and C/C++ code, 2012-08-13) which only removed trailing spaces, not TABs.
| * Remove CMake-language block-end command argumentsKitware Robot2012-08-13385-4107/+4107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-13547-16123/+16123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-13614-3951/+3951
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/ \+$//'
| * Merge topic 'watcom-compiler-version'Brad King2012-08-131-37/+24
| |\ |/ / | | | | af42ae4 Watcom: Simplify compiler version detection (#11866)
| * Watcom: Simplify compiler version detection (#11866)Brad King2012-08-131-37/+24
| | | | | | | | | | | | | | | | Since commit c198730b (Detect Watcom compiler version with its id, 2011-12-07) the CMAKE_(C|CXX)_COMPILER_VERSION variables are set for the Watcom compiler. Use these in Windows-wcl386.cmake to set the old WATCOM1* version variables. This avoids using the old EXECUTE_PROCESS command which failed due to extra quotes anyway.
* | Merge topic 'xcode-select'David Cole2012-08-131-2/+17
|\ \ | | | | | | | | | | | | e88bae7 Xcode: Run xcode-select to find Xcode version file (#13463)
| * | Xcode: Run xcode-select to find Xcode version file (#13463)Brad King2012-08-101-2/+17
| | | | | | | | | | | | | | | | | | | | | Multiple versions of Xcode may be installed in different locations. Run "xcode-select --print-path" to detect the active Xcode location and parse its Contents/version.plist file. Note that the Xcode.app directory name may vary in developer versions.
* | | Merge topic 'CPackRPM-fixRelocatablePrefix'David Cole2012-08-131-1/+20
|\ \ \ | | | | | | | | | | | | | | | | 822c1ea Do not include directories which are part of the package install prefix.
| * | | Do not include directories which are part of the package install prefix.Andy Piper2012-08-071-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | This fix bug #0013451. The bug prevents theorerically relocatable RPM package to be installed properly. Signed-off-by: Eric NOULARD <eric.noulard@gmail.com>
* | | | Merge topic 'fix-typo-13456'David Cole2012-08-131-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | 67f11cf FindSelfPackers: fix typo (#13456)
| * | | | FindSelfPackers: fix typo (#13456)Rolf Eike Beer2012-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | Correction by Modestas Vainius.
* | | | | Merge topic 'doc_fixes'David Cole2012-08-132-196/+196
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 76d6c59 Clean up documentation formatting so that it is rendered properly in HTML.
| * | | | | Clean up documentation formatting so that it is rendered properly in HTML.Zack Galbreath2012-08-032-196/+196
| | | | | |
* | | | | | Merge topic 'xcode-object-dir'David Cole2012-08-133-1/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | b237dbd Xcode: Fix object library references in multi-project trees (#13452)
| * | | | | | Xcode: Fix object library references in multi-project trees (#13452)Brad King2012-08-033-1/+3
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In cmGlobalXCodeGenerator::Generate we generate a .xcodeproj for each directory in the tree containing a project() command. First we iteratively use SetGenerationRoot to add "ALL_BUILD" and other targets to each project. This leaves "CurrentProject" set to the last project when we invoke cmGlobalGenerator::Generate, which is not the same as the top-level project if any subdirectories invoke the project() command. When cmGlobalGenerator::Generate reaches CreateGeneratorTargets it constructs cmGeneratorTarget and calls ComputeTargetObjects exactly once per target. In this context the value of CurrentProject is undefined so we cannot pass it to GetObjectsNormalDirectory. Use "$(PROJECT_NAME)" instead so it will adapt automatically to each project. Also teach Tests/ObjectLibrary to cover this case.
* | | | | | Merge topic 'select-compiler'David Cole2012-08-139-93/+147
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7e58e5b Prefer generic system compilers by default for C, C++, and Fortran 796e337 Factor common code out of CMakeDetermine(ASM|C|CXX|Fortran)Compiler b708f1a CMakeDetermine(C|CXX)Compiler: Consider Clang compilers
| * | | | | | Prefer generic system compilers by default for C, C++, and FortranBrad King2012-08-029-4/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach CMake to prefer the system default compiler automatically when no compiler is specified. By default use "cc" for C, "CC" for C++, and "f95" for Fortran. Load a new Platform/<os>-<lang>.cmake module to allow each platform to specify for each language its system compiler name(s) and/or exclude certain names. Create Platform/(CYGWIN|Darwin|Linux|Windows)-CXX.cmake modules to specify "c++" as the system C++ compiler name for these platforms. On systems that use case-insensitive filesystems exclude C++ compiler names that are distinguished from C compiler names only by case. This will change the default compiler selection for existing build scripts that do not specify a compiler when run on machines with separate system and GNU compilers both installed in the PATH. We do not make this change in default behavior lightly. However: (1) If a given build really needs specific compilers one should specify them explicitly e.g. by setting CC, CXX, and FC in the environment. (2) The motivating case is to prefer the system Clang on newer OS X systems over the older GNU compilers typically also installed. On such systems the names "cc" and "c++" link to Clang. This is the first platform known to CMake on which "c++" is not a GNU compiler. The old behavior selected "gcc" for C and "c++" C++ and therefore chooses GNU for C and Clang for C++ by default. The new behavior selects GNU or Clang consistently for both languages on older or newer OS X systems, respectively. (3) Other than the motivating OS X case the conditions under which the behavior changes do not tend to exist in default OS installations. They typically occur only on non-GNU systems with manually-installed GNU compilers. (4) The consequences of the new behavior are not dire. At worst the project fails to compile with the system compiler when it previously worked with the non-system GNU compiler. Such failure is easy to work around (see #1). In short this change creates a more sensible default behavior everywhere and fixes poor default behavior on a widely-used platform at the cost of a modest change in behavior in less-common conditions.
| * | | | | | Factor common code out of CMakeDetermine(ASM|C|CXX|Fortran)CompilerBrad King2012-08-025-86/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compiler candidate list selection and search code for C, C++, ASM, and Fortran languages was duplicated across four modules. To look for compilers adjacent to already-enabled languages the C and CXX modules each used _CMAKE_USER_(C|CXX)_COMPILER_PATH and the ASM module used _CMAKE_TOOLCHAIN_LOCATION. Since commit 4debb7ac (Bias Fortran compiler search with C/C++ compilers, 2009-09-09) CMake prefers Fortran compilers matching the vendor and directory of an enabled C or C++ compiler. Factor out the common functionality among the four languages into a new CMakeDetermineCompiler module. Generalize the Fortran implementation so that all languages may each use the vendor and directory of the other languages that have already been enabled. For now do not list any vendor-specific names for C, C++, or ASM so that only the directory preference is used for these languages (existing behavior).
| * | | | | | CMakeDetermine(C|CXX)Compiler: Consider Clang compilersBrad King2012-07-312-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Look for "clang" or "clang++" compiler executables so Clang will be used when it is the only compiler available. Prefer them last to avoid changing compiler default preferences for existing scripts.
* | | | | | | Merge topic 'directory-typo'David Cole2012-08-135-6/+6
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6c8722f Fix typo direcotry -> directory (and similar) [#13444]
| * | | | | | | Fix typo direcotry -> directory (and similar) [#13444]Rolf Eike Beer2012-07-305-6/+6
| | | | | | | |
* | | | | | | | Merge topic 'SelectLibraryConfiguration-multi-lib-per-var2'David Cole2012-08-131-8/+10
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5797512 SelectLibraryConfiguration: generate correct output when input vars are lists
| * | | | | | | | SelectLibraryConfiguration: generate correct output when input vars are listsRolf Eike Beer2012-07-291-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case that any of the input variables that hold the library names contains more than just a single library the "debug" or "optimized" keywords were only prepended to the first item, making all other libs appear in all configurations. Just treat both input variables as lists. Thanks to Philipp Berger <newsletters@philippberger.de> for pointing me at this.
* | | | | | | | | Merge topic 'FindOpenSSL-improve'David Cole2012-08-131-35/+43
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3cfb68d FindOpenSSL: remove leftover comment fc798ed FindOpenSSL: cleanup path hints c78a7d1 FindOpenSSL: let CMake handle environment variable HINTS 7464519 FindOpenSSL: use SelectLibraryConfigurations 4b793ad FindOpenSSL: find cross-compiled OpenSSL from MinGW (#13431)
| * | | | | | | | | FindOpenSSL: remove leftover commentRolf Eike Beer2012-07-291-1/+0
| | | | | | | | | |
| * | | | | | | | | FindOpenSSL: cleanup path hintsRolf Eike Beer2012-07-291-19/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -only use Windows-specific paths on Windows -recode the contents of $ENV{PROGRAMFILES} to be a valid CMake path before using it
| * | | | | | | | | FindOpenSSL: let CMake handle environment variable HINTSRolf Eike Beer2012-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will automatically make sure the paths will get recoded to proper separators on Windows
| * | | | | | | | | FindOpenSSL: use SelectLibraryConfigurationsRolf Eike Beer2012-07-291-13/+5
| | | | | | | | | |
| * | | | | | | | | FindOpenSSL: find cross-compiled OpenSSL from MinGW (#13431)Rolf Eike Beer2012-07-291-2/+10
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggested-by: Dominik Schmidt <dev@dominik-schmidt.de>
* | | | | | | | | Merge topic 'EclipseFixBadLinkedResources'David Cole2012-08-131-0/+14
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4ea5dc5 Eclipse: fix #13358: don't create bad linked resources
| * | | | | | | | | Eclipse: fix #13358: don't create bad linked resourcesAlex Neundorf2012-07-281-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't create linked resources which point to CMAKE_BINARY_DIR itself or one of its parent dirs. Eclipse complained about that. Alex
* | | | | | | | | | Merge topic 'EclipseAddSupportForJuno'David Cole2012-08-131-1/+7
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 53cc102 Eclipse: improve (fix ?) version detection on OSX bcccddc Eclipse: add support for the 4.2 Juno release (#13367)
| * | | | | | | | | | Eclipse: improve (fix ?) version detection on OSXAlex Neundorf2012-07-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is probably related to a framework installation I guess. This is part of the patch in #13367 from Nicholas Yue. Alex
| * | | | | | | | | | Eclipse: add support for the 4.2 Juno release (#13367)Alex Neundorf2012-07-281-1/+4
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks for the path to Nicholas Yue. Alex
* | | | | | | | | | Merge topic 'mixed-lib-to-lib64'David Cole2012-08-1318-80/+112
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | af80da3 remove lib64 Unix paths if the respective lib path is also given 733726e find_library: Fix mixed lib->lib64 (non-)conversion cases (#13419) 54add62 find_library: Simplify lib->lib<arch> expansion 6ca2f82 find_library: Refactor lib->lib64 conversion 1fe4b82 find_library: Add test covering lib->lib64 cases