diff options
44 files changed, 818 insertions, 231 deletions
diff --git a/ChangeLog.manual b/ChangeLog.manual index 691ff94..cdab442 100644 --- a/ChangeLog.manual +++ b/ChangeLog.manual @@ -1,3 +1,454 @@ +Changes in CMake 2.8.9 (since 2.8.9-rc3) +---------------------------------------- +None + +Changes in CMake 2.8.9-rc3 (since 2.8.9-rc2) +-------------------------------------------- +Alexey Ozeritsky (1): + Fixed: FindLAPACK does not find MKL 10.3 when using gcc 4.x + +Brad King (3): + pre-commit: Reject C++ code with lines too long + Tests/X11: Add missing include <stdlib.h> for 'rand' + Tests/ObjC++: Use standard <iostream> header + +David Cole (1): + CPack: Use bin subdir when looking for dpkg and rpmbuild + +Eric NOULARD (2): + Do not run cpack at CMake time it is not available. + Find dpkg and rpmbuild in usual Fink and MacPort paths + +Nicolas Despres (17): + Ninja: Cannot pass a reference to an anonymous object. + Ninja: Add support for OS X app bundles. + Ninja: Add support for OX X library framework. + Ensure 3rd party libraries are writable. + Remove trailing white-spaces. + Re-factor OS X bundle and framework generation. + Ninja: Copy resource files in the bundle. + Ninja: Add support for CFBundle. + Enable BundleTest with CLang too. + Re-factor CFBundle generation. + Ninja: Use same echo message as makefiles. + Re-factor bundle content copying rules generation. + Re-factor Mac OS X content directory computation. + Re-factor framework directory computation. + Re-factor OS X content generator start up. + Fix memory leak in Makefile generator. + Add missing this->. + +Peter Kuemmel (1): + Ninja: dep files and multiple -arch flags not possible on mac + +Peter Kümmel (24): + Ninja: windres is also used for cross-compiling + Ninja: search for windres with prefix + Ninja: there could be null pointers + Ninja: more searching for windres + Ninja: path is already declared + Ninja: fix GCC 4.7 warning -Wconversion + Ninja: fix sytle + Ninja: also stop when .rc's .d file couldn't be generated + Ninja: readd quotes to src file path before patching it + Ninja: cmcldeps needs absolute paths for RCs + Ninja: on Mac no multiple -arch because of -M + Ninja: fix mis-matching endif() argument + Ninja: also mingw needs TARGET_PDB + Ninja: line length + Ninja: make TARGET_PDB a real .gdb file name + Ninja: make debug symbol suffix configurable by CMAKE_DEBUG_SYMBOL_SUFFIX + Ninja: remove 'friend' in ninja code + Ninja: remove warnings + Ninja: remove 'this' from member initializer list + Ninja: fixes for bcc + Ninja: enable ninja on Mac so all Mac CDash-builds are tested, cleanup later + Ninja: void function can't return a value + Ninja: enable ninja support everywhere + Ninja: also bootstrap ninja files + +Changes in CMake 2.8.9-rc2 (since 2.8.9-rc1) +-------------------------------------------- +Alex Neundorf (4): + -remove trailing whitespace + documentation: preparation for making the man section configurable + man documentation: detect man section from the given filename + Eclipse: fix #13313, always set LANG to C, also if unset + +Bill Hoffman (1): + Remove process execution code from cmcldeps and have it use cmake code. + +Brad King (12): + KWIML: Generalize interface to report broken integer literal macros + KWIML: Teach ABI.h about 'long long' and 'char' on old HP + KWIML: Teach INT.h that no HP platform implements SCN*8 formats + KWIML: Teach INT about broken UINT32_C on old HP + Fix project command documentation typo (#13384) + CTestUpdateSVN: Do not create repo directory first (#13349) + Tests/CustomCommand: Do not use 'main' in a library + AIX-GNU: Link shared libs with -brtl,-bnoipath (#13352) + include: Ignore empty string as file name (#13388) + Add ASM platform information for GNU compiler on AIX (#13390) + if: Document that macro arguments are not variables (#13393) + install: Fix COMPONENT option + +Clinton Stimpson (3): + GetPrerequisites.cmake: detect executables built with the -pie linker flag. + cmake-gui: Fix code to respect current locale. + DeployQt4: workaround bug 13258 where ARGV1 is leaked into a sub function. + +David Cole (7): + STYLE: Fix line length, remove extra blank line + CTest: Refactor error output into ErrorMessageUnknownDashDValue + CTest: Rename local variable for clarity + CTest: Extend -D command line arg handling for variable definitions + CTest: Allow -Dvar=value with no space between the D and the var + CTest: Add test to verify -D variable definitions work + Ninja: Fix typo: tagets -> targets + +Eric NOULARD (3): + Enhance documentation of install command w.r.t. the "Undefined" component. + CPack fix regression between 2.8.7 and 2.8.8 when running cpack with no arg. + Do not provide defaul value for CPACK_PACKAGE_DIRECTORY if found in config. + +Nicolas Despres (1): + Ninja: Clean all symlink created for libraries. + +Peter Kuemmel (6): + Ninja: print error message when command failed + Ninja: also consider variables when checking command line length + Ninja: also consider rule command length for rsp file + Ninja: remove int/size_t warning + Ninja: add soname test case + Ninja: don't shadow 'outputs' variable + +Peter Kümmel (6): + Ninja: also write link libraries to rsp file + Ninja: remove some unused default arguments + Ninja: error on missing rspfile_content + Ninja: disable work around when linking with mingw + Ninja: enable response file support on Mac (length 262144) + Ninja: sysconf() is declared in unistd.h + +Philip Lowman (2): + FindBoost: Fix bug where Boost_FOUND could be false when version specified + FindBoost: Future proof to 1.56 + +Rolf Eike Beer (2): + FindJava: improve version matching (#12878) + fix 2 space bugs in variable documentation + +Stephen Kelly (3): + Use full paths in compile_commands.json for out of source builds. + Construct the full path before escaping it. + Fix PositionIndependentTargets test with clang trunk. + +Changes in CMake 2.8.9-rc1 (since 2.8.8) +---------------------------------------- +Alex Neundorf (12): + -fix #13081: support OBJECT libraries in CodeBlocks/QtCreator projects + CodeBlocks: improve support for OBJECT libraries + fix #13195: avoid multiple mentions of found packages + FeatureSummary.cmake: nicer formatting + -strip trailing whitespace + make default install component name configurable + -add docs for ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME} + write_basic_package_version_file() now works with unset CMAKE_SIZEOF_VOID_P + add test for #13241: empty SIZEOF_VOIDP in write_basic_package_version_file + ASM compiler detection: remove debug output (#13270) + Eclipse: parallel build also for "Build project" #13287 + automoc: better error handling (#13299) + +Anthony J. Bentley (1): + FindwxWidgets: Do not use -isystem on OpenBSD (#13219) + +Ben Boeckel (2): + Don't put legacy variables back into the cache + Search for other ABIFLAGS builds of Python + +Bill Hoffman (15): + Add support to ctest for GTM mumps coverage. + Fix warning about char* instead of const char*. + Fix line length. + Add test for mumps coverage. Also refactor code to prepare for cache coverage. + Add virutal destructor to silence warning. + Add support for Cache coverage. + Fix some warnings and a bug where it went past the length of a vector. + Use a script to run the test because WORKING_DIRECTORY is not in 2.8.2. + Use <TARGET_FILE> expression to run ctest so it works with Xcode and VS IDE. + Add ability to specify more than one package directory or coverage directory. + Remove uncovered files from cache coverage data. + Disable bullseye coverage for mumps coverage test. + Update test data to match new coverage format. + Do not try to run bullseye coverage if COVFILE env is empty. + CDash now supports lots of files in coverage. So, show all files. + +Brad King (59): + Add LICENSE and NOTICE + Add 'tips' script to suggest local configuration + Add 'setup-user' script to configure authorship information + Add 'setup-hooks' script to install local hooks + Add 'setup-gerrit' script to configure Gerrit access + Add 'setup-stage' script to configure topic stage remote + Add 'setup-ssh' script to configure ssh push access + Add README instructions and sample configuration + Add and configure developer setup helper scripts + Exclude from source archives files specific to Git work tree + Exclude from CMake source archives files specific to Git work tree + Refactor CMake version handling + Document behavior of multiple target_link_libraries calls (#13113) + ctest_coverage: Save/restore LC_ALL around gcov (#13136) + Cleanup custom command .rule file internal handling + Factor out custom command .rule file path generation + VS10: Avoid creating .rule files next to outputs (#13141) + find_package: Document <package>_FIND_* variables (#13142) + find_package: Fix components signature documentation (#13142) + Teach RunCMake tests to allow custom checks + list: Handle errors on empty lists more gracefully (#13138) + include_external_msproject: Test TYPE, GUID, PLATFORM options (#13120) + VS: Fix line-too-long style errors + libarchive: Avoid 'inline' keyword on XL C v6 (#13148) + Intel: On Windows use /EHsc instead of deprecated /GX (#13163) + KWSys: Remove DateStamp + try_compile: Cleanup temporary directories (#13160) + setup-stage: Optionally reconfigure topic stage + CTest: Escape MemCheck test output for XML (#13124) + Documentation: Fix HTML anchor ranges + Require CMake 2.8.2 or higher to build CMake + CTest: Simplify environment save/restore + KWSys: Fix SystemTools environment memory handling (#13156) + VS10: Refactor custom commands to use WriteSource + VS10: Simplify vcxproj.filter file generation + VS10: Convert paths normally unless forced to relative + VS11: Do not use source path conversion workaround specific to VS 10 + VS10: Generate relative source paths when possible (#12570) + Intel: On Windows use /RTC1 instead of deprecated /GZ (#13174) + Test NO_SONAME property (#13155) + KWSys: Remove dependencies on FundamentalType + Documentation: Improve HTML section index format + VS: Restore header files marked as OS X Framework content (#13196) + VS11: Fix ARM architecture hint typo (#13077) + Fortran: Follow <>-style includes (#13239) + bootstrap: Port back to old shells (#13199) + KWSys: Remove unused environ declaration from SystemTools + FindBZip2: Search locations in GnuWin32 registry + cmArchiveWrite: Clear fflags from archive entries + Makefile: Support directory names containing '=' (#12934) + libarchive: Avoid 'inline' on SunPro < 5.9 (#13277) + Avoid direct use of std::(o|)stringstream (#13272) + KWIML: Add interface to report broken integer format macros + KWIML: Report broken integer format macros on AIX 4.3 + add_library: Allow OBJECT library without dynamic linking (#13289) + install: Fix FILES_MATCHING on case-sensitive Mac filesystems (#13177) + Make CTest.UpdateGIT robust to Git safecrlf on Windows + Do not crash on SHARED library without language (#13324) + CMakeDetermineCCompiler: Fix typo "_CXX_" -> "_C_" (#13330) + +Brian Helba (1): + Print any evaluated 'elseif'/'else' commands in trace mode (#13220) + +Charlie Sharpsteen (1): + Mac: Add guards to CMAKE_FIND_FRAMEWORK and CMAKE_FIND_APPBUNDLE defaults + +Clinton Stimpson (1): + cmake-gui: Wait for configure/generate thread to complete before exiting. + +Daniel R. Gomez (6): + KWSys: Fix hashtable prime list on g++ 2.9 (#13273) + Tests/IncludeDirectories: Files must end in a newline (#13314) + Tests/VSGNUFortran: Avoid C++ comment in C code (#13314) + Tests/Assembler: Assemble and link with same flags (#13314) + Fix FindPackageMode test Makefile (#13314) + Avoid string.clear and string.push_back (#13319) + +David Cole (12): + Begin post-2.8.8 development + CPack/NSIS: Add CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS (#13085) + ExternalProject: Add missing COMMAND keyword + ExternalProject: Avoid unnecessary git clones (#12564) + ExternalProject: Refactor repeated code into function (#12564) + ExternalProject: Avoid repeated git clone operations (#12564) + CTest: Modify reg ex so it also works with gcov 4.7 output (#13121) + BZip2: Remove unnecessary *.bz2 files from CMake source tree + Ninja: Enable the ninja generator by default on Windows. + Revert "Millenium update: 79 * (16/9)/(4/3) = 105" + Ninja: Restructure code to work with the Borland compilers + Remove unused ivars to eliminate compiler warnings + +David Faure (1): + Abort FindQt4.cmake if Qt 5 is found. + +Eric NOULARD (12): + Use fakeroot for control.tar.gz as well + Enhancement of bash completion scripts given by Igor Murzov. + Install editors helper files + CPack - preserve timestamp for CPACK_INSTALLED_DIRECTORIES. fixes: #0013193 + CPack add easy possibility to warn about CPACK_SET_DESTDIR + CPack add necessary check to detect/warns/error on ABSOLUTE DESTINATION + Fix KWStyle warning + Use CPACK_xxx and CMAKE_xxx in a consistent way. + CPack allow RPM and DEB generator to be used on OSX. + Calm down Borland compiler warning about "always true" + CPackRPM: avoid leakage of RPM directive from one component to another. + CPackDeb add missing documentation for some CPACK_DEBIAN_xx variables. + +Fraser Hutchison (1): + CPack: Fixed incorrect error log for CPACK_NSIS_MENU_LINKS. + +Jan Schaffmeister (1): + Xcode: Recognize storyboard source files (#13214) + +Jim Hague (2): + libarchive: Avoid trailing , in enum for XL v6 (#13148) + Workaround IBM XL v6 streams seekg bug (#13149) + +Jonathan Klein (1): + FindBullet: Add missing math library name (#13309) + +Joseph Snyder (1): + Change GT.M Coverage Parser global + +Konstantin Tokarev (1): + [OSX] Fixed undefined symbol when linking CMakeLib into shared library + +Kurtis Nusbaum (1): + Added conditional for the phonon backend plugin. + +Leonid Yurchenko (1): + include_external_msproject: Add TYPE, GUID, PLATFORM options (#13120) + +Mario Bensi (1): + Add FindLibLZMA Module + +Mariusz Plucinski (1): + Do not crash on unknown source language (#13323) + +Matt McCormick (1): + ExternalProject: Fix 'make' builds with Ninja (#13159) + +Minmin Gong (1): + VS11: Add ARM architecture generator (#13077) + +Modestas Vainius (3): + Fix CPack RPM man page typo detected by lintian. + Support building shared libraries or modules without soname (#13155) + Fix a few typos in NO_SONAME property description. + +Nicolas Despres (2): + Ninja: Add a convenient 'clean' target. + Ninja: Add a convenient 'help' target. + +Patrick Gansterer (1): + Added CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL + +Peter Collingbourne (2): + Ninja: apply CMAKE_<LANG>_FLAGS_<TYPE> to executable targets (#13069) + Ninja: mark rules/build file streams failed if error occurred (#13067, #13105) + +Peter Kuemmel (61): + Ninja: ensure output directories exist + Ninja: no 16:9 screens for the cmake team ;) + Ninja: add option to enable ninja where it is not enabled by default + Ninja: remove GCC -Wshadow warning + Ninja: enable Ninja for CodeBlocks + Ninja: no additional variable needed to enable ninja + Ninja: CMAKE_USE_NINJA is the name of the macro + VC Express doesn't support folders, ignore USE_FOLDER property + Ninja: add response file support on Windows + Ninja: 30000 is too long for windows cmd + Ninja: check for valid pointer + Ninja: also create rspfile rules + Ninja: don't break because of empty commands + Ninja: find mingw's resource compiler + Ninja: add dependency tracking for msvc with cldeps + Ninja: add wrapper for cl to extract dependencies + Ninja: allow spaces in source path + Ninja: assume cmcldeps in the same dir as cmake + Ninja: add copyright and description + Ninja: don't set cmcldeps vars to empty string when they are not defined + Ninja: fix ModuleNoticies test + Ninja: don't use cmcldeps for try_compile + Ninja: allow spaces in cldeps's .d file + Ninja: fix line length + Ninja: don't pollute the rules file with useless comments + Ninja: use slahes in .d files + Line Length: <79 + Millenium update: 79 * (16/9)/(4/3) = 105 + Ninja: complete MinGW support + Ninja: use slashes for include dirs, so also slahes are in the .d files + Ninja: ninja can't read dep. pathes with parentheses + Ninja: work with ninja/master, don't compile rc files with cl + Ninja: extract dependencies for .rc files with msvc tools + Ninja: remove unused CommentStream + Ninja: onyl use pre processor for rc file parsing + Ninja: suppress startup logos + Ninja: cmcldeps + Ninja: don't use shell when cmake is called directly + Ninja: ninja now also could read parentheses in .d files + Ninja: fix Linux build + Ninja: sh needs something befor and after && + Ninja: build with old vc versions + Ninja: remove nop line + Ninja: undo all the NOSHELL patches + Ninja: be more accurate when estimating the command line length + Ninja: don't pollute build dir with preprocessed rc files + Ninja: Eclipse and KDevelop fixes for ninja + Ninja: no /nologo option in old rc.exe + Ninja: but cl supports /nologo ... + Ninja: try to make GetProcessId visible + Ninja: build cmcldeps with mingw + Ninja: don't remove space between command and parameters + Ninja: some bytes of the rc files couldn't be piped correctly + Ninja: build server fixes + Ninja: build with old msvc versions + Ninja: msvc6 for-scoping + Ninja: maybe this fixes the bcc32 build + remove warning about unused parameter + Ninja: build server fixes + Ninja: try work around for bcc32 bug + Ninja: disable cldeps for bcc32, it's too old, and ninja would also not build + +Rolf Eike Beer (12): + FindPkgConfig.cmake: fix documented output variable not set (#13125,#13132) + UseJava: fix typo in variable name (#13135) + Check{C,CXX}CompilerFlag: catch more Intel warning types (#12576) + FindPythonLibs: honor EXACT version specification (#13216) + UseJava: fix find_jar() called with multiple files (#13281) + fix some typos + do not explicitely specify /usr and /usr/local as search paths + replace open coded versions of file(TO_CMAKE_PATH) + FindDevIL: clean up documentation formatting + FindQt4: extend documentation + Qt4Macros: improve basename extraction in QT4_ADD_DBUS_INTERFACES + Qt4Macros: add some quotes to prevent damage from spaces in the paths + +Sean McBride (1): + Remove unused ivars to eliminate compiler warnings + +Sebastian Leske (1): + Improve documentation of set command (#13269) + +Stephen Kelly (10): + Fix the number variable comparison when Qt is not found. + Update the docs of IMPORTED_LOCATION_CONFIG to match the code. + Move the EscapeJSON method to a sharable location. + Add newline to the output. + Make the CMAKE_EXPORT_COMPILE_COMMANDS option work with Ninja. + Escape the source file to be compiled if required. + Exclude the CompileCommandOutput test on WIN32. + Add platform variables for position independent code flags + Add platform variable for flags specific to shared libraries + Refactor generation of shared library flags + +Tobias Bieniek (1): + Qt4Macros: Added support for generated resource files + +Zack Galbreath (1): + FindPythonLibs: Document cache variables (#13240) + +Zaheer Chothia (1): + VS: Set Intel Fortran 13 project version + Changes in CMake 2.8.8 (since 2.8.8-rc2) ---------------------------------------- Brad King (1): diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake index 0a70d0a..7da6ac0 100644 --- a/Modules/CMakeDetermineASMCompiler.cmake +++ b/Modules/CMakeDetermineASMCompiler.cmake @@ -14,6 +14,8 @@ # determine the compiler to use for ASM programs +INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake) + IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER) # prefer the environment variable ASM IF($ENV{ASM${ASM_DIALECT}} MATCHES ".+") @@ -22,42 +24,28 @@ IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER) # finally list compilers to try IF("ASM${ASM_DIALECT}" STREQUAL "ASM") # the generic assembler support - - IF(CMAKE_ASM_COMPILER_INIT) - SET(CMAKE_ASM_COMPILER_LIST ${CMAKE_ASM_COMPILER_INIT}) - ELSE(CMAKE_ASM_COMPILER_INIT) - + IF(NOT CMAKE_ASM_COMPILER_INIT) IF(CMAKE_C_COMPILER) SET(CMAKE_ASM_COMPILER "${CMAKE_C_COMPILER}" CACHE FILEPATH "The ASM compiler") SET(CMAKE_ASM_COMPILER_ID "${CMAKE_C_COMPILER_ID}") ELSEIF(CMAKE_CXX_COMPILER) SET(CMAKE_ASM_COMPILER "${CMAKE_CXX_COMPILER}" CACHE FILEPATH "The ASM compiler") SET(CMAKE_ASM_COMPILER_ID "${CMAKE_CXX_COMPILER_ID}") - ELSE(CMAKE_CXX_COMPILER) + ELSE() # List all default C and CXX compilers - SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}gcc ${_CMAKE_TOOLCHAIN_PREFIX}cc cl bcc xlc - ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ CC aCC cl bcc xlC) - ENDIF(CMAKE_C_COMPILER) - - ENDIF(CMAKE_ASM_COMPILER_INIT) - - - ELSE("ASM${ASM_DIALECT}" STREQUAL "ASM") # some specific assembler "dialect" - - IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT) - SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT}) - ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT) + SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST + ${_CMAKE_TOOLCHAIN_PREFIX}cc ${_CMAKE_TOOLCHAIN_PREFIX}gcc cl bcc xlc + CC ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ aCC cl bcc xlC) + ENDIF() + ENDIF() + ELSE() # some specific assembler "dialect" + IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT) MESSAGE(FATAL_ERROR "CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT must be preset !") - ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT) - - ENDIF("ASM${ASM_DIALECT}" STREQUAL "ASM") - + ENDIF() + ENDIF() # Find the compiler. - IF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH) - FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} PATHS ${_CMAKE_USER_C_COMPILER_PATH} ${_CMAKE_USER_CXX_COMPILER_PATH} DOC "Assembler" NO_DEFAULT_PATH) - ENDIF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH) - FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} PATHS ${_CMAKE_TOOLCHAIN_LOCATION} DOC "Assembler") + _cmake_find_compiler(ASM${ASM_DIALECT}) ELSE(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER) diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index 9028e8e..3ce968c 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -31,6 +31,14 @@ # If not already set before, it also sets # _CMAKE_TOOLCHAIN_PREFIX +INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake) + +# Load system-specific compiler preferences for this language. +INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-C OPTIONAL) +IF(NOT CMAKE_C_COMPILER_NAMES) + SET(CMAKE_C_COMPILER_NAMES cc) +ENDIF() + IF(NOT CMAKE_C_COMPILER) SET(CMAKE_C_COMPILER_INIT NOTFOUND) @@ -53,21 +61,12 @@ IF(NOT CMAKE_C_COMPILER) ENDIF(CMAKE_GENERATOR_CC) # finally list compilers to try - IF(CMAKE_C_COMPILER_INIT) - SET(CMAKE_C_COMPILER_LIST ${CMAKE_C_COMPILER_INIT}) - ELSE(CMAKE_C_COMPILER_INIT) - SET(CMAKE_C_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}gcc ${_CMAKE_TOOLCHAIN_PREFIX}cc cl bcc xlc) - ENDIF(CMAKE_C_COMPILER_INIT) - - # Find the compiler. - IF (_CMAKE_USER_CXX_COMPILER_PATH) - FIND_PROGRAM(CMAKE_C_COMPILER NAMES ${CMAKE_C_COMPILER_LIST} PATHS ${_CMAKE_USER_CXX_COMPILER_PATH} DOC "C compiler" NO_DEFAULT_PATH) - ENDIF (_CMAKE_USER_CXX_COMPILER_PATH) - FIND_PROGRAM(CMAKE_C_COMPILER NAMES ${CMAKE_C_COMPILER_LIST} DOC "C compiler") - - IF(CMAKE_C_COMPILER_INIT AND NOT CMAKE_C_COMPILER) - SET(CMAKE_C_COMPILER "${CMAKE_C_COMPILER_INIT}" CACHE FILEPATH "C compiler" FORCE) - ENDIF(CMAKE_C_COMPILER_INIT AND NOT CMAKE_C_COMPILER) + IF(NOT CMAKE_C_COMPILER_INIT) + SET(CMAKE_C_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}cc ${_CMAKE_TOOLCHAIN_PREFIX}gcc cl bcc xlc clang) + ENDIF() + + _cmake_find_compiler(C) + ELSE(NOT CMAKE_C_COMPILER) # we only get here if CMAKE_C_COMPILER was specified using -D or a pre-made CMakeCache.txt diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index 7f8f3ec..0116d34 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -30,6 +30,14 @@ # If not already set before, it also sets # _CMAKE_TOOLCHAIN_PREFIX +INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake) + +# Load system-specific compiler preferences for this language. +INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-CXX OPTIONAL) +IF(NOT CMAKE_CXX_COMPILER_NAMES) + SET(CMAKE_CXX_COMPILER_NAMES CC) +ENDIF() + IF(NOT CMAKE_CXX_COMPILER) SET(CMAKE_CXX_COMPILER_INIT NOTFOUND) @@ -52,21 +60,11 @@ IF(NOT CMAKE_CXX_COMPILER) ENDIF(CMAKE_GENERATOR_CXX) # finally list compilers to try - IF(CMAKE_CXX_COMPILER_INIT) - SET(CMAKE_CXX_COMPILER_LIST ${CMAKE_CXX_COMPILER_INIT}) - ELSE(CMAKE_CXX_COMPILER_INIT) - SET(CMAKE_CXX_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ CC aCC cl bcc xlC) - ENDIF(CMAKE_CXX_COMPILER_INIT) - - # Find the compiler. - IF (_CMAKE_USER_C_COMPILER_PATH) - FIND_PROGRAM(CMAKE_CXX_COMPILER NAMES ${CMAKE_CXX_COMPILER_LIST} PATHS ${_CMAKE_USER_C_COMPILER_PATH} DOC "C++ compiler" NO_DEFAULT_PATH) - ENDIF (_CMAKE_USER_C_COMPILER_PATH) - FIND_PROGRAM(CMAKE_CXX_COMPILER NAMES ${CMAKE_CXX_COMPILER_LIST} DOC "C++ compiler") - - IF(CMAKE_CXX_COMPILER_INIT AND NOT CMAKE_CXX_COMPILER) - SET(CMAKE_CXX_COMPILER "${CMAKE_CXX_COMPILER_INIT}" CACHE FILEPATH "C++ compiler" FORCE) - ENDIF(CMAKE_CXX_COMPILER_INIT AND NOT CMAKE_CXX_COMPILER) + IF(NOT CMAKE_CXX_COMPILER_INIT) + SET(CMAKE_CXX_COMPILER_LIST CC ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ aCC cl bcc xlC clang++) + ENDIF() + + _cmake_find_compiler(CXX) ELSE(NOT CMAKE_CXX_COMPILER) # we only get here if CMAKE_CXX_COMPILER was specified using -D or a pre-made CMakeCache.txt diff --git a/Modules/CMakeDetermineCompiler.cmake b/Modules/CMakeDetermineCompiler.cmake new file mode 100644 index 0000000..2d12c07 --- /dev/null +++ b/Modules/CMakeDetermineCompiler.cmake @@ -0,0 +1,72 @@ + +#============================================================================= +# Copyright 2004-2012 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +macro(_cmake_find_compiler lang) + # Use already-enabled languages for reference. + get_property(_languages GLOBAL PROPERTY ENABLED_LANGUAGES) + list(REMOVE_ITEM _languages "${lang}") + + if(CMAKE_${lang}_COMPILER_INIT) + # Search only for the specified compiler. + set(CMAKE_${lang}_COMPILER_LIST "${CMAKE_${lang}_COMPILER_INIT}") + else() + # Re-order the compiler list with preferred vendors first. + set(_${lang}_COMPILER_LIST "${CMAKE_${lang}_COMPILER_LIST}") + set(CMAKE_${lang}_COMPILER_LIST "") + # Prefer vendors of compilers from reference languages. + foreach(l ${_languages}) + list(APPEND CMAKE_${lang}_COMPILER_LIST + ${_${lang}_COMPILER_NAMES_${CMAKE_${l}_COMPILER_ID}}) + endforeach() + # Prefer vendors based on the platform. + list(APPEND CMAKE_${lang}_COMPILER_LIST ${CMAKE_${lang}_COMPILER_NAMES}) + # Append the rest of the list and remove duplicates. + list(APPEND CMAKE_${lang}_COMPILER_LIST ${_${lang}_COMPILER_LIST}) + unset(_${lang}_COMPILER_LIST) + list(REMOVE_DUPLICATES CMAKE_${lang}_COMPILER_LIST) + if(CMAKE_${lang}_COMPILER_EXCLUDE) + list(REMOVE_ITEM CMAKE_${lang}_COMPILER_LIST + ${CMAKE_${lang}_COMPILER_EXCLUDE}) + endif() + endif() + + # Look for directories containing compilers of reference languages. + set(_${lang}_COMPILER_HINTS) + foreach(l ${_languages}) + if(CMAKE_${l}_COMPILER AND IS_ABSOLUTE "${CMAKE_${l}_COMPILER}") + get_filename_component(_hint "${CMAKE_${l}_COMPILER}" PATH) + if(IS_DIRECTORY "${_hint}") + list(APPEND _${lang}_COMPILER_HINTS "${_hint}") + endif() + unset(_hint) + endif() + endforeach() + + # Find the compiler. + if(_${lang}_COMPILER_HINTS) + # Prefer directories containing compilers of reference languages. + list(REMOVE_DUPLICATES _${lang}_COMPILER_HINTS) + find_program(CMAKE_${lang}_COMPILER + NAMES ${CMAKE_${lang}_COMPILER_LIST} + PATHS ${_${lang}_COMPILER_HINTS} + NO_DEFAULT_PATH + DOC "${lang} compiler") + endif() + find_program(CMAKE_${lang}_COMPILER NAMES ${CMAKE_${lang}_COMPILER_LIST} DOC "${lang} compiler") + if(CMAKE_${lang}_COMPILER_INIT AND NOT CMAKE_${lang}_COMPILER) + set(CMAKE_${lang}_COMPILER "${CMAKE_${lang}_COMPILER_INIT}" CACHE FILEPATH "${lang} compiler" FORCE) + endif() + unset(_${lang}_COMPILER_HINTS) + unset(_languages) +endmacro() diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake index ade6d58..45033c2 100644 --- a/Modules/CMakeDetermineFortranCompiler.cmake +++ b/Modules/CMakeDetermineFortranCompiler.cmake @@ -19,6 +19,12 @@ # the cmake variable CMAKE_GENERATOR_FC which can be defined by a generator # as a default compiler +INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake) +INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-Fortran OPTIONAL) +IF(NOT CMAKE_Fortran_COMPILER_NAMES) + SET(CMAKE_Fortran_COMPILER_NAMES f95) +ENDIF() + IF(NOT CMAKE_Fortran_COMPILER) # prefer the environment variable CC IF($ENV{FC} MATCHES ".+") @@ -40,9 +46,7 @@ IF(NOT CMAKE_Fortran_COMPILER) ENDIF(CMAKE_GENERATOR_FC) # finally list compilers to try - IF(CMAKE_Fortran_COMPILER_INIT) - SET(CMAKE_Fortran_COMPILER_LIST ${CMAKE_Fortran_COMPILER_INIT}) - ELSE(CMAKE_Fortran_COMPILER_INIT) + IF(NOT CMAKE_Fortran_COMPILER_INIT) # Known compilers: # f77/f90/f95: generic compiler names # g77: GNU Fortran 77 compiler @@ -77,41 +81,10 @@ IF(NOT CMAKE_Fortran_COMPILER) SET(_Fortran_COMPILER_NAMES_PathScale pathf2003 pathf95 pathf90) SET(_Fortran_COMPILER_NAMES_XL xlf) SET(_Fortran_COMPILER_NAMES_VisualAge xlf95 xlf90 xlf) - - # Prefer vendors matching the C and C++ compilers. - SET(CMAKE_Fortran_COMPILER_LIST - ${_Fortran_COMPILER_NAMES_${CMAKE_C_COMPILER_ID}} - ${_Fortran_COMPILER_NAMES_${CMAKE_CXX_COMPILER_ID}} - ${CMAKE_Fortran_COMPILER_LIST}) - LIST(REMOVE_DUPLICATES CMAKE_Fortran_COMPILER_LIST) - ENDIF(CMAKE_Fortran_COMPILER_INIT) - - # Look for directories containing the C and C++ compilers. - SET(_Fortran_COMPILER_HINTS) - FOREACH(lang C CXX) - IF(CMAKE_${lang}_COMPILER AND IS_ABSOLUTE "${CMAKE_${lang}_COMPILER}") - GET_FILENAME_COMPONENT(_hint "${CMAKE_${lang}_COMPILER}" PATH) - IF(IS_DIRECTORY "${_hint}") - LIST(APPEND _Fortran_COMPILER_HINTS "${_hint}") - ENDIF() - SET(_hint) - ENDIF() - ENDFOREACH() - - # Find the compiler. - IF(_Fortran_COMPILER_HINTS) - # Prefer directories containing C and C++ compilers. - LIST(REMOVE_DUPLICATES _Fortran_COMPILER_HINTS) - FIND_PROGRAM(CMAKE_Fortran_COMPILER - NAMES ${CMAKE_Fortran_COMPILER_LIST} - PATHS ${_Fortran_COMPILER_HINTS} - NO_DEFAULT_PATH - DOC "Fortran compiler") ENDIF() - FIND_PROGRAM(CMAKE_Fortran_COMPILER NAMES ${CMAKE_Fortran_COMPILER_LIST} DOC "Fortran compiler") - IF(CMAKE_Fortran_COMPILER_INIT AND NOT CMAKE_Fortran_COMPILER) - SET(CMAKE_Fortran_COMPILER "${CMAKE_Fortran_COMPILER_INIT}" CACHE FILEPATH "Fortran compiler" FORCE) - ENDIF(CMAKE_Fortran_COMPILER_INIT AND NOT CMAKE_Fortran_COMPILER) + + _cmake_find_compiler(Fortran) + ELSE(NOT CMAKE_Fortran_COMPILER) # we only get here if CMAKE_Fortran_COMPILER was specified using -D or a pre-made CMakeCache.txt # (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE diff --git a/Modules/CMakeFindEclipseCDT4.cmake b/Modules/CMakeFindEclipseCDT4.cmake index a4264e7..86c1a1b 100644 --- a/Modules/CMakeFindEclipseCDT4.cmake +++ b/Modules/CMakeFindEclipseCDT4.cmake @@ -24,6 +24,9 @@ FUNCTION(_FIND_ECLIPSE_VERSION) GET_FILENAME_COMPONENT(_REALPATH_CMAKE_ECLIPSE_EXECUTABLE "${CMAKE_ECLIPSE_EXECUTABLE}" REALPATH) GET_FILENAME_COMPONENT(_ECLIPSE_DIR "${_REALPATH_CMAKE_ECLIPSE_EXECUTABLE}" PATH) FILE(GLOB _ECLIPSE_FEATURE_DIR "${_ECLIPSE_DIR}/features/org.eclipse.platform*") + IF(APPLE AND NOT _ECLIPSE_FEATURE_DIR) + FILE(GLOB _ECLIPSE_FEATURE_DIR "${_ECLIPSE_DIR}/../../../features/org.eclipse.platform*") + ENDIF() IF("${_ECLIPSE_FEATURE_DIR}" MATCHES ".+org.eclipse.platform_([0-9]+\\.[0-9]+).+") SET(_ECLIPSE_VERSION ${CMAKE_MATCH_1}) ENDIF() @@ -37,6 +40,7 @@ FUNCTION(_FIND_ECLIPSE_VERSION) SET(_ECLIPSE_VERSION_NAME_3.5 "Galileo" ) SET(_ECLIPSE_VERSION_NAME_3.6 "Helios" ) SET(_ECLIPSE_VERSION_NAME_3.7 "Indigo" ) + SET(_ECLIPSE_VERSION_NAME_4.2 "Juno" ) IF(_ECLIPSE_VERSION) MESSAGE(STATUS "Found Eclipse version ${_ECLIPSE_VERSION} (${_ECLIPSE_VERSION_NAME_${_ECLIPSE_VERSION}})") @@ -51,7 +55,9 @@ FUNCTION(_FIND_ECLIPSE_VERSION) "3.4 (${_ECLIPSE_VERSION_NAME_3.4})" "3.5 (${_ECLIPSE_VERSION_NAME_3.5})" "3.6 (${_ECLIPSE_VERSION_NAME_3.6})" - "3.7 (${_ECLIPSE_VERSION_NAME_3.7})") + "3.7 (${_ECLIPSE_VERSION_NAME_3.7})" + "4.2 (${_ECLIPSE_VERSION_NAME_4.2})" + ) ENDFUNCTION() _FIND_ECLIPSE_VERSION() diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index 1cf31c4..84bc7bb 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -81,9 +81,9 @@ if (NOT _libdir) if (WIN32) set(_libdir ENV LIB) elseif (APPLE) - set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH) + set(_libdir ENV DYLD_LIBRARY_PATH) else () - set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH) + set(_libdir ENV LD_LIBRARY_PATH) endif () endif () diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake index a03c023..5fe5213 100644 --- a/Modules/FindGTK2.cmake +++ b/Modules/FindGTK2.cmake @@ -305,9 +305,7 @@ function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version) NAMES ${_lib_list} PATHS /opt/gnome/lib - /opt/gnome/lib64 /usr/openwin/lib - /usr/openwin/lib64 /sw/lib $ENV{GTKMM_BASEPATH}/lib [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib diff --git a/Modules/FindKDE3.cmake b/Modules/FindKDE3.cmake index 9d10814..ca3dae6 100644 --- a/Modules/FindKDE3.cmake +++ b/Modules/FindKDE3.cmake @@ -131,7 +131,7 @@ ENDIF(KDECONFIG_EXECUTABLE) -# at first the KDE include direcory +# at first the KDE include directory # kpassdlg.h comes from kdeui and doesn't exist in KDE4 anymore FIND_PATH(KDE3_INCLUDE_DIR kpassdlg.h HINTS diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index 0ae98df..b867f21 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -69,9 +69,9 @@ if (NOT _libdir) if (WIN32) set(_libdir ENV LIB) elseif (APPLE) - set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH) + set(_libdir ENV DYLD_LIBRARY_PATH) else () - set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH) + set(_libdir ENV LD_LIBRARY_PATH) endif () endif () foreach(_library ${_list}) diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake index d1fc2d2..6642915 100644 --- a/Modules/FindOpenSSL.cmake +++ b/Modules/FindOpenSSL.cmake @@ -29,25 +29,34 @@ if (UNIX) pkg_check_modules(_OPENSSL QUIET openssl) endif (UNIX) -# http://www.slproweb.com/products/Win32OpenSSL.html -SET(_OPENSSL_ROOT_HINTS - $ENV{OPENSSL_ROOT_DIR} - ${OPENSSL_ROOT_DIR} - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;Inno Setup: App Path]" - ) -SET(_OPENSSL_ROOT_PATHS - "$ENV{PROGRAMFILES}/OpenSSL" - "$ENV{PROGRAMFILES}/OpenSSL-Win32" - "$ENV{PROGRAMFILES}/OpenSSL-Win64" - "C:/OpenSSL/" - "C:/OpenSSL-Win32/" - "C:/OpenSSL-Win64/" - ) -SET(_OPENSSL_ROOT_HINTS_AND_PATHS - HINTS ${_OPENSSL_ROOT_HINTS} - PATHS ${_OPENSSL_ROOT_PATHS} - ) +IF (WIN32) + # http://www.slproweb.com/products/Win32OpenSSL.html + SET(_OPENSSL_ROOT_HINTS + ${OPENSSL_ROOT_DIR} + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;Inno Setup: App Path]" + ENV OPENSSL_ROOT_DIR + ) + FILE(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles) + SET(_OPENSSL_ROOT_PATHS + "${_programfiles}/OpenSSL" + "${_programfiles}/OpenSSL-Win32" + "${_programfiles}/OpenSSL-Win64" + "C:/OpenSSL/" + "C:/OpenSSL-Win32/" + "C:/OpenSSL-Win64/" + ) + UNSET(_programfiles) + SET(_OPENSSL_ROOT_HINTS_AND_PATHS + HINTS ${_OPENSSL_ROOT_HINTS} + PATHS ${_OPENSSL_ROOT_PATHS} + ) +ELSE () + SET(_OPENSSL_ROOT_HINTS + ${OPENSSL_ROOT_DIR} + ENV OPENSSL_ROOT_DIR + ) +ENDIF () FIND_PATH(OPENSSL_INCLUDE_DIR NAMES @@ -60,7 +69,6 @@ FIND_PATH(OPENSSL_INCLUDE_DIR ) IF(WIN32 AND NOT CYGWIN) - # MINGW should go here too IF(MSVC) # /MD and /MDd are the standard values - if someone wants to use # others, the libnames have to change here too @@ -79,7 +87,6 @@ IF(WIN32 AND NOT CYGWIN) FIND_LIBRARY(LIB_EAY_DEBUG NAMES libeay32MDd - libeay32 ${_OPENSSL_ROOT_HINTS_AND_PATHS} PATH_SUFFIXES "lib" @@ -101,8 +108,6 @@ IF(WIN32 AND NOT CYGWIN) FIND_LIBRARY(SSL_EAY_DEBUG NAMES ssleay32MDd - ssleay32 - ssl ${_OPENSSL_ROOT_HINTS_AND_PATHS} PATH_SUFFIXES "lib" @@ -122,21 +127,22 @@ IF(WIN32 AND NOT CYGWIN) "lib/VC" ) - if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) - set( OPENSSL_LIBRARIES - optimized ${SSL_EAY_RELEASE} debug ${SSL_EAY_DEBUG} - optimized ${LIB_EAY_RELEASE} debug ${LIB_EAY_DEBUG} - ) - else() - set( OPENSSL_LIBRARIES ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE} ) - endif() - MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE) - MARK_AS_ADVANCED(LIB_EAY_DEBUG LIB_EAY_RELEASE) + include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) + select_library_configurations(LIB_EAY) + select_library_configurations(SSL_EAY) + + set( OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY} ) ELSEIF(MINGW) # same player, for MingW + SET(LIB_EAY_NAMES libeay32) + SET(SSL_EAY_NAMES ssleay32) + IF(CMAKE_CROSS_COMPILING) + LIST(APPEND LIB_EAY_NAMES crypto) + LIST(APPEND SSL_EAY_NAMES ssl) + ENDIF() FIND_LIBRARY(LIB_EAY NAMES - libeay32 + ${LIB_EAY_NAMES} ${_OPENSSL_ROOT_HINTS_AND_PATHS} PATH_SUFFIXES "lib" @@ -145,7 +151,7 @@ IF(WIN32 AND NOT CYGWIN) FIND_LIBRARY(SSL_EAY NAMES - ssleay32 + ${SSL_EAY_NAMES} ${_OPENSSL_ROOT_HINTS_AND_PATHS} PATH_SUFFIXES "lib" @@ -154,6 +160,8 @@ IF(WIN32 AND NOT CYGWIN) MARK_AS_ADVANCED(SSL_EAY LIB_EAY) set( OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} ) + unset(LIB_EAY_NAMES) + unset(SSL_EAY_NAMES) ELSE(MSVC) # Not sure what to pick for -say- intel, let's use the toplevel ones and hope someone report issues: FIND_LIBRARY(LIB_EAY diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 2f1708d..d157dab 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -70,7 +70,7 @@ # # macro QT4_WRAP_CPP(outfiles inputfile ... OPTIONS ...) # create moc code from a list of files containing Qt class with -# the Q_OBJECT declaration. Per-direcotry preprocessor definitions +# the Q_OBJECT declaration. Per-directory preprocessor definitions # are also added. Options may be given to moc, such as those found # when executing "moc -help". # diff --git a/Modules/Platform/CYGWIN-CXX.cmake b/Modules/Platform/CYGWIN-CXX.cmake new file mode 100644 index 0000000..bf37f79 --- /dev/null +++ b/Modules/Platform/CYGWIN-CXX.cmake @@ -0,0 +1,7 @@ +if(NOT CMAKE_CXX_COMPILER_NAMES) + set(CMAKE_CXX_COMPILER_NAMES c++) +endif() + +# Exclude C++ compilers differing from C compiler only by case +# because this platform may have a case-insensitive filesystem. +set(CMAKE_CXX_COMPILER_EXCLUDE CC aCC xlC) diff --git a/Modules/Platform/Darwin-CXX.cmake b/Modules/Platform/Darwin-CXX.cmake new file mode 100644 index 0000000..bf37f79 --- /dev/null +++ b/Modules/Platform/Darwin-CXX.cmake @@ -0,0 +1,7 @@ +if(NOT CMAKE_CXX_COMPILER_NAMES) + set(CMAKE_CXX_COMPILER_NAMES c++) +endif() + +# Exclude C++ compilers differing from C compiler only by case +# because this platform may have a case-insensitive filesystem. +set(CMAKE_CXX_COMPILER_EXCLUDE CC aCC xlC) diff --git a/Modules/Platform/Linux-CXX.cmake b/Modules/Platform/Linux-CXX.cmake new file mode 100644 index 0000000..b594dae --- /dev/null +++ b/Modules/Platform/Linux-CXX.cmake @@ -0,0 +1,3 @@ +if(NOT CMAKE_CXX_COMPILER_NAMES) + set(CMAKE_CXX_COMPILER_NAMES c++) +endif() diff --git a/Modules/Platform/Windows-CXX.cmake b/Modules/Platform/Windows-CXX.cmake new file mode 100644 index 0000000..bf37f79 --- /dev/null +++ b/Modules/Platform/Windows-CXX.cmake @@ -0,0 +1,7 @@ +if(NOT CMAKE_CXX_COMPILER_NAMES) + set(CMAKE_CXX_COMPILER_NAMES c++) +endif() + +# Exclude C++ compilers differing from C compiler only by case +# because this platform may have a case-insensitive filesystem. +set(CMAKE_CXX_COMPILER_EXCLUDE CC aCC xlC) diff --git a/Modules/SelectLibraryConfigurations.cmake b/Modules/SelectLibraryConfigurations.cmake index 2e8ade0..dbff487 100644 --- a/Modules/SelectLibraryConfigurations.cmake +++ b/Modules/SelectLibraryConfigurations.cmake @@ -48,17 +48,19 @@ macro( select_library_configurations basename ) # if only the debug version was found, set the release value to be the # debug value. _set_library_name( ${basename} DEBUG RELEASE ) - if (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND - NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE) + if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND + NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE ) # if the generator supports configuration types or CMAKE_BUILD_TYPE # is set, then set optimized and debug options. if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) - set( ${basename}_LIBRARY - optimized ${${basename}_LIBRARY_RELEASE} - debug ${${basename}_LIBRARY_DEBUG} ) - set( ${basename}_LIBRARIES - optimized ${${basename}_LIBRARY_RELEASE} - debug ${${basename}_LIBRARY_DEBUG} ) + set( ${basename}_LIBRARY ) + foreach( _libname LISTS ${basename}_LIBRARY_RELEASE ) + list( APPEND ${basename}_LIBRARY optimized "${_libname}" ) + endforeach() + foreach( _libname LISTS ${basename}_LIBRARY_DEBUG ) + list( APPEND ${basename}_LIBRARY debug "${_libname}" ) + endforeach() + set( ${basename}_LIBRARIES "${${basename}_LIBRARY}" ) else( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) # If there are no configuration types or build type, just use # the release version diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index b1af96a..0181722 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,6 +1,6 @@ # CMake version number components. SET(CMake_VERSION_MAJOR 2) SET(CMake_VERSION_MINOR 8) -SET(CMake_VERSION_PATCH 8) -SET(CMake_VERSION_TWEAK 20120803) +SET(CMake_VERSION_PATCH 9) +SET(CMake_VERSION_TWEAK 20120813) #SET(CMake_VERSION_RC 1) diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 78a8704..5c7d400 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -1334,12 +1334,26 @@ bool cmExtraEclipseCDT4Generator { outputPath = this->HomeOutputDirectory + "/" + outputPath; } + + // in this case it's not necessary: if (cmSystemTools::IsSubDirectory(outputPath.c_str(), this->HomeOutputDirectory.c_str())) { return false; } + // in these two cases Eclipse would complain: + if (cmSystemTools::IsSubDirectory(this->HomeOutputDirectory.c_str(), + outputPath.c_str())) + { + return false; + } + if (cmSystemTools::GetRealPath(outputPath.c_str()) + == cmSystemTools::GetRealPath(this->HomeOutputDirectory.c_str())) + { + return false; + } + std::string name = this->GetPathBasename(outputPath); // make sure linked resource name is unique diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 6cdbbf2..652e697 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -105,7 +105,10 @@ bool cmFindLibraryCommand ->GetPropertyAsBool("FIND_LIBRARY_USE_LIB64_PATHS")) { // add special 64 bit paths if this is a 64 bit compile. - this->AddLib64Paths(); + if(this->Makefile->PlatformIs64Bit()) + { + this->AddArchitecturePaths("64"); + } } std::string library = this->FindLibrary(); @@ -129,90 +132,55 @@ bool cmFindLibraryCommand //---------------------------------------------------------------------------- void cmFindLibraryCommand::AddArchitecturePaths(const char* suffix) { - std::vector<std::string> newPaths; - bool found = false; - std::string subpath = "lib"; - subpath += suffix; - subpath += "/"; - for(std::vector<std::string>::iterator i = this->SearchPaths.begin(); - i != this->SearchPaths.end(); ++i) + std::vector<std::string> original; + original.swap(this->SearchPaths); + for(std::vector<std::string>::iterator i = original.begin(); + i != original.end(); ++i) { - // Try replacing lib/ with lib<suffix>/ - std::string s = *i; - cmSystemTools::ReplaceString(s, "lib/", subpath.c_str()); - if((s != *i) && cmSystemTools::FileIsDirectory(s.c_str())) - { - found = true; - newPaths.push_back(s); - } + this->AddArchitecturePath(*i, 0, suffix); + } +} - // Now look for lib<suffix> - s = *i; - s += suffix; - if(cmSystemTools::FileIsDirectory(s.c_str())) +//---------------------------------------------------------------------------- +void cmFindLibraryCommand::AddArchitecturePath( + std::string const& dir, std::string::size_type start_pos, + const char* suffix, bool fresh) +{ + std::string::size_type pos = dir.find("lib/", start_pos); + if(pos != std::string::npos) + { + std::string cur_dir = dir.substr(0,pos+3); + + // Follow "lib<suffix>". + std::string next_dir = cur_dir + suffix; + if(cmSystemTools::FileIsDirectory(next_dir.c_str())) { - found = true; - newPaths.push_back(s); + next_dir += dir.substr(pos+3); + std::string::size_type next_pos = pos+3+strlen(suffix)+1; + this->AddArchitecturePath(next_dir, next_pos, suffix); } - // now add the original unchanged path - if(cmSystemTools::FileIsDirectory(i->c_str())) + + // Follow "lib". + if(cmSystemTools::FileIsDirectory(cur_dir.c_str())) { - newPaths.push_back(*i); + this->AddArchitecturePath(dir, pos+3+1, suffix, false); } } - - // If any new paths were found replace the original set. - if(found) + if(fresh) { - this->SearchPaths = newPaths; - } -} - -void cmFindLibraryCommand::AddLib64Paths() -{ - std::string voidsize = - this->Makefile->GetSafeDefinition("CMAKE_SIZEOF_VOID_P"); - int size = atoi(voidsize.c_str()); - if(size != 8) - { - return; - } - std::vector<std::string> path64; - bool found64 = false; - for(std::vector<std::string>::iterator i = this->SearchPaths.begin(); - i != this->SearchPaths.end(); ++i) - { - std::string s = *i; - std::string s2 = *i; - cmSystemTools::ReplaceString(s, "lib/", "lib64/"); - // try to replace lib with lib64 and see if it is there, - // then prepend it to the path - // Note that all paths have trailing slashes. - if((s != *i) && cmSystemTools::FileIsDirectory(s.c_str())) + // Check for <dir><suffix>/. + std::string cur_dir = dir + suffix + "/"; + if(cmSystemTools::FileIsDirectory(cur_dir.c_str())) { - path64.push_back(s); - found64 = true; - } - // now just add a 64 to the path name and if it is there, - // add it to the path - s2 += "64/"; - if(cmSystemTools::FileIsDirectory(s2.c_str())) - { - found64 = true; - path64.push_back(s2); - } - // now add the original unchanged path - if(cmSystemTools::FileIsDirectory(i->c_str())) + this->SearchPaths.push_back(cur_dir); + } + + // Now add the original unchanged path + if(cmSystemTools::FileIsDirectory(dir.c_str())) { - path64.push_back(*i); + this->SearchPaths.push_back(dir); } } - // now replace the SearchPaths with the 64 bit converted path - // if any 64 bit paths were discovered - if(found64) - { - this->SearchPaths = path64; - } } //---------------------------------------------------------------------------- diff --git a/Source/cmFindLibraryCommand.h b/Source/cmFindLibraryCommand.h index b880be2..31a5c3f 100644 --- a/Source/cmFindLibraryCommand.h +++ b/Source/cmFindLibraryCommand.h @@ -62,7 +62,10 @@ public: protected: void AddArchitecturePaths(const char* suffix); - void AddLib64Paths(); + void AddArchitecturePath(std::string const& dir, + std::string::size_type start_pos, + const char* suffix, + bool fresh = true); std::string FindLibrary(); virtual void GenerateDocumentation(); private: diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 938977b..c366bcb 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3739,7 +3739,7 @@ cmGlobalXCodeGenerator const char* configName = this->GetCMakeCFGIntDir(); std::string dir = this->GetObjectsNormalDirectory( - this->CurrentProject, configName, gt->Target); + "$(PROJECT_NAME)", configName, gt->Target); if(this->XcodeVersion >= 21) { dir += "$(CURRENT_ARCH)/"; diff --git a/Source/cmake.cxx b/Source/cmake.cxx index fdc42fa..75aa471 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1043,7 +1043,7 @@ int cmake::AddCMakePaths() { cMakeRoot = cMakeRoot.substr(0, slashPos); } - // is there no Modules direcory there? + // is there no Modules directory there? modules = cMakeRoot + "/Modules/CMake.cmake"; } @@ -1072,7 +1072,7 @@ int cmake::AddCMakePaths() { // next try exe cMakeRoot = cmSystemTools::GetProgramPath(cMakeSelf.c_str()); - // is there no Modules direcory there? + // is there no Modules directory there? modules = cMakeRoot + "/Modules/CMake.cmake"; } if (!cmSystemTools::FileExists(modules.c_str())) @@ -1421,7 +1421,7 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args) int retval = 0; int timeout = 0; if ( cmSystemTools::RunSingleCommand(command.c_str(), 0, &retval, - directory.c_str(), cmSystemTools::OUTPUT_MERGE, timeout) ) + directory.c_str(), cmSystemTools::OUTPUT_NORMAL, timeout) ) { return retval; } diff --git a/Tests/CMakeOnly/CMakeLists.txt b/Tests/CMakeOnly/CMakeLists.txt index a1551ca..6fe91c7 100644 --- a/Tests/CMakeOnly/CMakeLists.txt +++ b/Tests/CMakeOnly/CMakeLists.txt @@ -23,6 +23,8 @@ add_CMakeOnly_test(AllFindModules) add_CMakeOnly_test(TargetScope) +add_CMakeOnly_test(find_library) + add_test(CMakeOnly.ProjectInclude ${CMAKE_CMAKE_COMMAND} -DTEST=ProjectInclude -DCMAKE_ARGS=-DCMAKE_PROJECT_ProjectInclude_INCLUDE=${CMAKE_CURRENT_SOURCE_DIR}/ProjectInclude/include.cmake diff --git a/Tests/CMakeOnly/find_library/CMakeLists.txt b/Tests/CMakeOnly/find_library/CMakeLists.txt new file mode 100644 index 0000000..08f9331 --- /dev/null +++ b/Tests/CMakeOnly/find_library/CMakeLists.txt @@ -0,0 +1,61 @@ +cmake_minimum_required(VERSION 2.8) +project(FindLibraryTest NONE) + +set(CMAKE_FIND_DEBUG_MODE 1) + +macro(test_find_library expected) + get_filename_component(dir ${expected} PATH) + get_filename_component(name ${expected} NAME) + string(REGEX REPLACE "lib/?64" "lib" dir "${dir}") + unset(LIB CACHE) + find_library(LIB + NAMES ${name} + PATHS ${CMAKE_CURRENT_SOURCE_DIR}/${dir} + NO_DEFAULT_PATH + ) + if(LIB) + # Convert to relative path for comparison to expected location. + file(RELATIVE_PATH REL_LIB "${CMAKE_CURRENT_SOURCE_DIR}" "${LIB}") + + # Debugging output. + if(CMAKE_FIND_DEBUG_MODE) + message(STATUS "Library ${expected} searched as ${dir}, found as [${REL_LIB}].") + endif() + + # Check and report failure. + if(NOT "${REL_LIB}" STREQUAL "${expected}") + message(SEND_ERROR "Library ${l} should have been [${expected}] but was [${REL_LIB}]") + endif() + else() + message(SEND_ERROR "Library ${expected} searched as ${dir}, NOT FOUND!") + endif() +endmacro() + +set(CMAKE_FIND_LIBRARY_PREFIXES "lib") +set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") +set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE) + +set(CMAKE_SIZEOF_VOID_P 4) +foreach(lib + lib/A/lib/libtest1.a + lib/A/libtest1.a + lib/libtest1.a + lib/libtest2.a + lib/libtest3.a + lib/libtest3.a + ) + test_find_library(${lib}) +endforeach() + +set(CMAKE_SIZEOF_VOID_P 8) +foreach(lib64 + lib/64/libtest2.a + lib/A/lib64/libtest3.a + lib/libtest3.a + lib64/A/lib/libtest2.a + lib64/A/lib64/libtest1.a + lib64/A/libtest1.a + lib64/libtest1.a + ) + test_find_library(${lib64}) +endforeach() diff --git a/Tests/CMakeOnly/find_library/lib/64/libtest2.a b/Tests/CMakeOnly/find_library/lib/64/libtest2.a new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/CMakeOnly/find_library/lib/64/libtest2.a diff --git a/Tests/CMakeOnly/find_library/lib/A/lib/libtest1.a b/Tests/CMakeOnly/find_library/lib/A/lib/libtest1.a new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/CMakeOnly/find_library/lib/A/lib/libtest1.a diff --git a/Tests/CMakeOnly/find_library/lib/A/lib64/libtest3.a b/Tests/CMakeOnly/find_library/lib/A/lib64/libtest3.a new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/CMakeOnly/find_library/lib/A/lib64/libtest3.a diff --git a/Tests/CMakeOnly/find_library/lib/A/libtest1.a b/Tests/CMakeOnly/find_library/lib/A/libtest1.a new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/CMakeOnly/find_library/lib/A/libtest1.a diff --git a/Tests/CMakeOnly/find_library/lib/libtest1.a b/Tests/CMakeOnly/find_library/lib/libtest1.a new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/CMakeOnly/find_library/lib/libtest1.a diff --git a/Tests/CMakeOnly/find_library/lib/libtest2.a b/Tests/CMakeOnly/find_library/lib/libtest2.a new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/CMakeOnly/find_library/lib/libtest2.a diff --git a/Tests/CMakeOnly/find_library/lib/libtest3.a b/Tests/CMakeOnly/find_library/lib/libtest3.a new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/CMakeOnly/find_library/lib/libtest3.a diff --git a/Tests/CMakeOnly/find_library/lib64/A/lib/libtest2.a b/Tests/CMakeOnly/find_library/lib64/A/lib/libtest2.a new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/CMakeOnly/find_library/lib64/A/lib/libtest2.a diff --git a/Tests/CMakeOnly/find_library/lib64/A/lib64/libtest1.a b/Tests/CMakeOnly/find_library/lib64/A/lib64/libtest1.a new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/CMakeOnly/find_library/lib64/A/lib64/libtest1.a diff --git a/Tests/CMakeOnly/find_library/lib64/A/libtest1.a b/Tests/CMakeOnly/find_library/lib64/A/libtest1.a new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/CMakeOnly/find_library/lib64/A/libtest1.a diff --git a/Tests/CMakeOnly/find_library/lib64/libtest1.a b/Tests/CMakeOnly/find_library/lib64/libtest1.a new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/CMakeOnly/find_library/lib64/libtest1.a diff --git a/Tests/ObjectLibrary/A/CMakeLists.txt b/Tests/ObjectLibrary/A/CMakeLists.txt index 121a8ac..04ab02f 100644 --- a/Tests/ObjectLibrary/A/CMakeLists.txt +++ b/Tests/ObjectLibrary/A/CMakeLists.txt @@ -1,3 +1,4 @@ +project(ObjectLibraryA) # Add -fPIC so objects can be used in shared libraries. # TODO: Need property for this. if(CMAKE_SHARED_LIBRARY_C_FLAGS AND NOT WATCOM) diff --git a/Tests/ObjectLibrary/B/CMakeLists.txt b/Tests/ObjectLibrary/B/CMakeLists.txt index 67172d1..4b0b07d 100644 --- a/Tests/ObjectLibrary/B/CMakeLists.txt +++ b/Tests/ObjectLibrary/B/CMakeLists.txt @@ -1,3 +1,4 @@ +project(ObjectLibraryB) if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6") # VS 6 generator does not use per-target object locations. set(vs6 _vs6) diff --git a/Utilities/Release/dash2win64_cygwin.cmake b/Utilities/Release/dash2win64_cygwin.cmake index 78e8df0..663c615 100644 --- a/Utilities/Release/dash2win64_cygwin.cmake +++ b/Utilities/Release/dash2win64_cygwin.cmake @@ -16,4 +16,12 @@ set(CC gcc) set(SCRIPT_NAME dash2win64cygwin) set(GIT_EXTRA "git config core.autocrlf true") get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) + +# WARNING: Temporary fix!! This exclusion of the ExternalProject test +# is temporary until we can set up a new cygwin build machine. +# It only fails because of cygwin/non-cygwin "svn" mismatches in this +# particular environment. This is less than ideal, but at least it +# allows us to produce cygwin builds in the short term. +set(EXTRA_CTEST_ARGS "-E ExternalProject") + include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/release_cmake.sh.in b/Utilities/Release/release_cmake.sh.in index 50882c5..b5ff6dd 100755 --- a/Utilities/Release/release_cmake.sh.in +++ b/Utilities/Release/release_cmake.sh.in @@ -121,7 +121,7 @@ check_exit_value $? "Build cmake" || exit 1 if [ -z "@SKIP_TESTS@" ]; then echo "Run cmake tests" - ./bin/ctest --output-on-failure -j @PROCESSORS@ test + ./bin/ctest --output-on-failure -j @PROCESSORS@ @EXTRA_CTEST_ARGS@ check_exit_value $? "Test cmake" || exit 1 fi diff --git a/Utilities/Release/upload_release.cmake b/Utilities/Release/upload_release.cmake index dc6c78f..bd79296 100644 --- a/Utilities/Release/upload_release.cmake +++ b/Utilities/Release/upload_release.cmake @@ -1,4 +1,7 @@ -set(PROJECT_PREFIX cmake-) +set(CTEST_RUN_CURRENT_SCRIPT 0) +if(NOT DEFINED PROJECT_PREFIX) + set(PROJECT_PREFIX cmake-) +endif() if(NOT VERSION) set(VERSION 2.8) endif() @@ -18,11 +21,18 @@ foreach(file ${FILES}) message("upload ${file} ${UPLOAD_LOC}") execute_process(COMMAND scp ${file} ${UPLOAD_LOC} - RESULT_VARIABLE result) - math(EXPR count "${count} + 1") + RESULT_VARIABLE result) if("${result}" GREATER 0) message(FATAL_ERROR "failed to upload file to ${UPLOAD_LOC}") endif() + + # Pause to give each upload a distinct (to the nearest second) + # time stamp + if(COMMAND ctest_sleep) + ctest_sleep(2) + endif() + + math(EXPR count "${count} + 1") endif() endforeach(file) if(${count} EQUAL 0) diff --git a/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c b/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c index 7d7eeca..365a874 100644 --- a/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c +++ b/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c @@ -925,7 +925,7 @@ _archive_read_next_header2(struct archive *_a, struct archive_entry *entry) if (fd < 0) tree_enter_working_dir(t); - /* The current direcotry fd is needed at + /* The current directory fd is needed at * archive_read_disk_entry_from_file() function to read link data * with readlinkat(). */ a->entry_wd_fd = tree_current_dir_fd(t); diff --git a/Utilities/cmlibarchive/libarchive/archive_read_disk_windows.c b/Utilities/cmlibarchive/libarchive/archive_read_disk_windows.c index d8a1f55..217a91a 100644 --- a/Utilities/cmlibarchive/libarchive/archive_read_disk_windows.c +++ b/Utilities/cmlibarchive/libarchive/archive_read_disk_windows.c @@ -955,7 +955,7 @@ _archive_read_disk_open_w(struct archive *_a, const wchar_t *pathname) a->tree = tree_open(pathname, a->symlink_mode, a->restore_time); if (a->tree == NULL) { archive_set_error(&a->archive, ENOMEM, - "Can't allocate direcotry traversal data"); + "Can't allocate directory traversal data"); a->archive.state = ARCHIVE_STATE_FATAL; return (ARCHIVE_FATAL); } |