[Cmake-commits] CMake branch, next, updated. v2.8.4-1085-g4d54531
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 4d54531341664fdc8e07d8892aa90ebcfe0f7a44 (commit) via ed1cd2daf6bedbfc9870852184940494bfacec42 (commit) from 2bdac994e5f4e9ce8e1810ea80f7fd8a693e6443 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d54531341664fdc8e07d8892aa90ebcfe0f7a44 commit 4d54531341664fdc8e07d8892aa90ebcfe0f7a44 Merge: 2bdac99 ed1cd2d Author: Brad King brad.k...@kitware.com AuthorDate: Fri Mar 4 08:06:08 2011 -0500 Commit: Brad King brad.k...@kitware.com CommitDate: Fri Mar 4 08:06:08 2011 -0500 Merge branch 'master' into next --- Summary of changes: Source/kwsys/kwsysDateStamp.cmake |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v2.8.4-1088-g5bdb411
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 5bdb41118dc7b529c1180d5253081958b2ff5429 (commit) via 077954d4cbd0d2f8b8ae96964bfe5c9747934fe8 (commit) via 5abfb571843dba949e010f3b2840d8882d0f3d73 (commit) from 4d54531341664fdc8e07d8892aa90ebcfe0f7a44 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5bdb41118dc7b529c1180d5253081958b2ff5429 commit 5bdb41118dc7b529c1180d5253081958b2ff5429 Merge: 4d54531 077954d Author: Brad King brad.k...@kitware.com AuthorDate: Fri Mar 4 08:41:54 2011 -0500 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Fri Mar 4 08:41:54 2011 -0500 Merge topic 'link-static' into next 077954d Test static linking with LINK_SEARCH_START_STATIC 5abfb57 Add target property LINK_SEARCH_START_STATIC to aid static linking http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=077954d4cbd0d2f8b8ae96964bfe5c9747934fe8 commit 077954d4cbd0d2f8b8ae96964bfe5c9747934fe8 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 3 18:02:53 2011 -0500 Commit: Brad King brad.k...@kitware.com CommitDate: Fri Mar 4 08:37:57 2011 -0500 Test static linking with LINK_SEARCH_START_STATIC Add LinkStatic test that links a static executable against libm.a. Pass both /usr/lib/libm.a and -lm to target_link_libraries to trigger the link type logic for both cases. If CMake incorrectly switches the link type to shared for -lm then the link will fail. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index f418058..d025b1e 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -999,6 +999,22 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ SET_TESTS_PROPERTIES ( linkorder2 PROPERTIES DEPENDS linkorder1) SET_TESTS_PROPERTIES ( SimpleInstall-Stage2 PROPERTIES DEPENDS SimpleInstall) + # Test static linking on toolchains known to support it. + IF(${CMAKE_C_COMPILER_ID} MATCHES ^(GNU)$ + AND NOT APPLE AND NOT WIN32 AND NOT CYGWIN + AND EXISTS /usr/lib/libm.a) +ADD_TEST(LinkStatic ${CMAKE_CTEST_COMMAND} + --build-and-test + ${CMake_SOURCE_DIR}/Tests/LinkStatic + ${CMake_BINARY_DIR}/Tests/LinkStatic + --build-generator ${CMAKE_TEST_GENERATOR} + --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} + --build-project LinkStatic + --build-options -DMATH_LIBRARY:FILEPATH=/usr/lib/libm.a + --test-command LinkStatic + ) + ENDIF() + IF(NOT CMAKE_TEST_DIFFERENT_GENERATOR) ADD_TEST(kwsys ${CMAKE_CTEST_COMMAND} --build-and-test diff --git a/Tests/LinkStatic/CMakeLists.txt b/Tests/LinkStatic/CMakeLists.txt new file mode 100644 index 000..2062c43 --- /dev/null +++ b/Tests/LinkStatic/CMakeLists.txt @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 2.8.4.20110303 FATAL_ERROR) +project(LinkStatic C) + +if(NOT ${CMAKE_C_COMPILER_ID} MATCHES ^(GNU)$) + message(FATAL_ERROR This test works only with the GNU compiler!) +endif() + +find_library(MATH_LIBRARY NAMES libm.a) +if(MATH_LIBRARY) + get_filename_component(MATH_LIB_DIR ${MATH_LIBRARY} PATH) + link_directories(${MATH_LIB_DIR}) + # Name the library both with a full path and as -lm to + # activate the link type switching code for both cases. + # If the second one links shared then the link will fail. + set(MATH_LIBRARIES ${MATH_LIBRARY} -lm) +else() + message(FATAL_ERROR Cannot find libm.a needed for this test) +endif() + +add_executable(LinkStatic LinkStatic.c) +target_link_libraries(LinkStatic ${MATH_LIBRARIES}) + +# Enable static linking. +set(LinkStatic_FLAG -static CACHE STRING Flag to link statically) +set_property(TARGET LinkStatic PROPERTY LINK_FLAGS ${LinkStatic_FLAG}) +set_property(TARGET LinkStatic PROPERTY LINK_SEARCH_START_STATIC 1) +#set_property(TARGET LinkStatic PROPERTY LINK_SEARCH_END_STATIC 1) # insufficient diff --git a/Tests/LinkStatic/LinkStatic.c b/Tests/LinkStatic/LinkStatic.c new file mode 100644 index 000..3600977 --- /dev/null +++ b/Tests/LinkStatic/LinkStatic.c @@ -0,0 +1,5 @@ +#include math.h +int main(void) +{ + return (int)sin(0); +} http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5abfb571843dba949e010f3b2840d8882d0f3d73 commit 5abfb571843dba949e010f3b2840d8882d0f3d73 Author: Brad King brad.k...@kitware.com AuthorDate: Thu Mar 3 17:08:31 2011 -0500 Commit: Brad King brad.k...@kitware.com CommitDate: Thu Mar 3 17:12:32 2011 -0500 Add target property LINK_SEARCH_START_STATIC to aid static linking Commit afd7d4ca (Add target property LINK_SEARCH_END_STATIC, 2008-01-31) defined a property to ensure that
[Cmake-commits] CMake branch, next, updated. v2.8.4-1097-g44c437e
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via 44c437ea65b58ed05f9e2ba80c2471dc0f852dbf (commit) via 77333a92c215bb796c8df8a889118b32f64e38e4 (commit) from 375d9eac7333c3a8f442f24223a8e5e5bca50846 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=44c437ea65b58ed05f9e2ba80c2471dc0f852dbf commit 44c437ea65b58ed05f9e2ba80c2471dc0f852dbf Merge: 375d9ea 77333a9 Author: Eric Noulard eric.noul...@gmail.com AuthorDate: Fri Mar 4 16:18:26 2011 -0500 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Fri Mar 4 16:18:26 2011 -0500 Merge topic 'CPack-MoreRobustComponentFileList' into next 77333a9 CPack more robust way to collect files belonging to a component http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=77333a92c215bb796c8df8a889118b32f64e38e4 commit 77333a92c215bb796c8df8a889118b32f64e38e4 Author: Eric NOULARD eric.noul...@gmail.com AuthorDate: Thu Mar 3 22:43:31 2011 +0100 Commit: Eric NOULARD eric.noul...@gmail.com CommitDate: Thu Mar 3 22:43:31 2011 +0100 CPack more robust way to collect files belonging to a component diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 86200c1..2cc2f34 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -810,7 +810,52 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( { mf-AddDefinition(CMAKE_INSTALL_DO_STRIP, 1); } +// Remember the list of files before installation +// of the current component (if we are in component install) +const char* InstallPrefix = tempInstallDirectory.c_str(); +std::vectorstd::string filesBefore; +std::string findExpr(InstallPrefix); +if (componentInstall) + { + cmsys::Glob glB; + findExpr += /*; + glB.RecurseOn(); + glB.FindFiles(findExpr); + filesBefore = glB.GetFiles(); + sort(filesBefore.begin(),filesBefore.end()); + } +// do installation int res = mf-ReadListFile(0, installFile.c_str()); +// Now rebuild the list of files after installation +// of the current component (if we are in component install) +if (componentInstall) + { + cmsys::Glob glA; + glA.RecurseOn(); + glA.FindFiles(findExpr); + std::vectorstd::string filesAfter = glA.GetFiles(); + sort(filesAfter.begin(),filesAfter.end()); + std::vectorstd::string::iterator diff; + std::vectorstd::string result(filesAfter.size()); + diff = set_difference ( + filesAfter.begin(),filesAfter.end(), + filesBefore.begin(),filesBefore.end(), + result.begin()); + + std::vectorstd::string::iterator fit; + std::string localFileName; + // Populate the File field of each component + for (fit=result.begin();fit!=diff;++fit) +{ +localFileName = cmSystemTools::RelativePath(InstallPrefix, fit-c_str()); +localFileName = localFileName.substr(localFileName.find('/')+1,std::string::npos); +Components[installComponent].Files.push_back(localFileName); +cmCPackLogger(cmCPackLog::LOG_DEBUG, Adding file +localFileName to component +installComponentstd::endl); +} + } + if (NULL !=mf-GetDefinition(CPACK_ABSOLUTE_DESTINATION_FILES)) { if (absoluteDestFiles.length()0) { absoluteDestFiles +=;; @@ -952,35 +997,6 @@ int cmCPackGenerator::DoPackage() // The files to be installed files = gl.GetFiles(); - // For component installations, determine which files go into which - // components. - if (!this-Components.empty()) -{ -std::vectorstd::string::const_iterator it; -for ( it = files.begin(); it != files.end(); ++ it ) - { - // beware we cannot just use tempDirectory as before - // because some generator will CPACK_INCLUDE_TOPLEVEL_DIRECTORY - // we really want CPACK_TEMPORARY_DIRECTORY - std::string fileN = -cmSystemTools::RelativePath( - this-GetOption(CPACK_TEMPORARY_DIRECTORY), it-c_str()); - - // Determine which component we are in. - std::string componentName = fileN.substr(0, fileN.find('/')); - - // Strip off the component part of the path. - fileN = fileN.substr(fileN.find('/')+1, std::string::npos); - - // Add this file to the list of files for the
[Cmake-commits] CMake branch, next, updated. v2.8.4-1099-geb92381
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via eb92381eb6cb509b5f64f295a2ed85ff16b17e43 (commit) via b813f863e6ba9fca7ba216810564c268099db16c (commit) from 44c437ea65b58ed05f9e2ba80c2471dc0f852dbf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb92381eb6cb509b5f64f295a2ed85ff16b17e43 commit eb92381eb6cb509b5f64f295a2ed85ff16b17e43 Merge: 44c437e b813f86 Author: Eric Noulard eric.noul...@gmail.com AuthorDate: Fri Mar 4 16:58:31 2011 -0500 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Fri Mar 4 16:58:31 2011 -0500 Merge topic 'CPack-MoreRobustComponentFileList' into next b813f86 CPack fix compile error on VS70 and avoid KWStyle warnings http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b813f863e6ba9fca7ba216810564c268099db16c commit b813f863e6ba9fca7ba216810564c268099db16c Author: Eric NOULARD eric.noul...@gmail.com AuthorDate: Fri Mar 4 22:57:37 2011 +0100 Commit: Eric NOULARD eric.noul...@gmail.com CommitDate: Fri Mar 4 22:57:37 2011 +0100 CPack fix compile error on VS70 and avoid KWStyle warnings diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 2cc2f34..5f314c6 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -24,6 +24,7 @@ #include cmsys/SystemTools.hxx #include cmsys/Glob.hxx #include memory // auto_ptr +#include algorithm #if defined(__HAIKU__) #include StorageKit.h @@ -822,7 +823,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( glB.RecurseOn(); glB.FindFiles(findExpr); filesBefore = glB.GetFiles(); - sort(filesBefore.begin(),filesBefore.end()); + std::sort(filesBefore.begin(),filesBefore.end()); } // do installation int res = mf-ReadListFile(0, installFile.c_str()); @@ -834,10 +835,10 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( glA.RecurseOn(); glA.FindFiles(findExpr); std::vectorstd::string filesAfter = glA.GetFiles(); - sort(filesAfter.begin(),filesAfter.end()); + std::sort(filesAfter.begin(),filesAfter.end()); std::vectorstd::string::iterator diff; std::vectorstd::string result(filesAfter.size()); - diff = set_difference ( + diff = std::set_difference ( filesAfter.begin(),filesAfter.end(), filesBefore.begin(),filesBefore.end(), result.begin()); @@ -847,8 +848,11 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( // Populate the File field of each component for (fit=result.begin();fit!=diff;++fit) { -localFileName = cmSystemTools::RelativePath(InstallPrefix, fit-c_str()); -localFileName = localFileName.substr(localFileName.find('/')+1,std::string::npos); +localFileName = +cmSystemTools::RelativePath(InstallPrefix, fit-c_str()); +localFileName = +localFileName.substr(localFileName.find('/')+1, + std::string::npos); Components[installComponent].Files.push_back(localFileName); cmCPackLogger(cmCPackLog::LOG_DEBUG, Adding file localFileName to component --- Summary of changes: Source/CPack/cmCPackGenerator.cxx | 14 +- 1 files changed, 9 insertions(+), 5 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits
[Cmake-commits] CMake branch, next, updated. v2.8.4-1101-ge8f3c30
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project CMake. The branch, next has been updated via e8f3c307077bb50011019608c535bfa11aa6d781 (commit) via 7f10b137e1e75a57346b566a8818718b7f851625 (commit) from eb92381eb6cb509b5f64f295a2ed85ff16b17e43 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e8f3c307077bb50011019608c535bfa11aa6d781 commit e8f3c307077bb50011019608c535bfa11aa6d781 Merge: eb92381 7f10b13 Author: David Cole david.c...@kitware.com AuthorDate: Fri Mar 4 17:29:30 2011 -0500 Commit: CMake Topic Stage kwro...@kitware.com CommitDate: Fri Mar 4 17:29:30 2011 -0500 Merge topic 'improve-ExternalProject-file-name-recognition' into next 7f10b13 ExternalProject: Extract file names from more urls http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f10b137e1e75a57346b566a8818718b7f851625 commit 7f10b137e1e75a57346b566a8818718b7f851625 Author: David Cole david.c...@kitware.com AuthorDate: Fri Mar 4 16:51:46 2011 -0500 Commit: David Cole david.c...@kitware.com CommitDate: Fri Mar 4 17:09:41 2011 -0500 ExternalProject: Extract file names from more urls Notably, downloads from sourceforge.net and gitweb snapshots. diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 3de6b7e..390b8f9 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -403,11 +403,11 @@ endfunction(_ep_write_verifyfile_script) function(_ep_write_extractfile_script script_filename name filename directory) set(args ) - if(filename MATCHES (\\.bz2|\\.tar\\.gz|\\.tgz|\\.zip)$) + if(filename MATCHES (\\.|=)(bz2|tar\\.gz|tgz|zip)$) set(args xfz) endif() - if(filename MATCHES \\.tar$) + if(filename MATCHES (\\.|=)tar$) set(args xf) endif() @@ -1109,10 +1109,15 @@ function(_ep_add_download_command name) else() if(${url} MATCHES ^[a-z]+://) # TODO: Should download and extraction be different steps? -string(REGEX MATCH [^/]*$ fname ${url}) -if(NOT ${fname} MATCHES \\.(bz2|tar|tgz|tar\\.gz|zip)$) +string(REGEX MATCH [^/\\?]*$ fname ${url}) +if(NOT ${fname} MATCHES (\\.|=)(bz2|tar|tgz|tar\\.gz|zip)$) + string(REGEX MATCH ([^/\\?]+(\\.|=)(bz2|tar|tgz|tar\\.gz|zip))/.*$ match_result ${url}) + set(fname ${CMAKE_MATCH_1}) +endif() +if(NOT ${fname} MATCHES (\\.|=)(bz2|tar|tgz|tar\\.gz|zip)$) message(FATAL_ERROR Could not extract tarball filename from url:\n ${url}) endif() +string(REPLACE ; - fname ${fname}) set(file ${download_dir}/${fname}) get_property(timeout TARGET ${name} PROPERTY _EP_TIMEOUT) _ep_write_downloadfile_script(${stamp_dir}/download-${name}.cmake ${url} ${file} ${timeout} ${md5}) --- Summary of changes: Modules/ExternalProject.cmake | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits