diff options
24 files changed, 588 insertions, 87 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/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/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/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 71bba12..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 20120728) +SET(CMake_VERSION_PATCH 9) +SET(CMake_VERSION_TWEAK 20120813) #SET(CMake_VERSION_RC 1) 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/cmake.cxx b/Source/cmake.cxx index fdc42fa..24ac966 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -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/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) |