diff options
author | David Cole <david.cole@kitware.com> | 2008-10-24 15:39:10 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2008-10-24 15:39:10 (GMT) |
commit | 86ded1ba589b54591bc4cf0639dae7e80e09ad9a (patch) | |
tree | 5553279e0e6e2510af825580bff0d605976df67b | |
parent | 9ccd0bd4ff68c4af3f4aace9a0447872fbafcc6c (diff) | |
download | CMake-86ded1ba589b54591bc4cf0639dae7e80e09ad9a.zip CMake-86ded1ba589b54591bc4cf0639dae7e80e09ad9a.tar.gz CMake-86ded1ba589b54591bc4cf0639dae7e80e09ad9a.tar.bz2 |
ENH: Activate GetPrerequisites code on Linux. Thanks to Mike Arthur for finishing it off.
-rw-r--r-- | Modules/GetPrerequisites.cmake | 16 | ||||
-rw-r--r-- | Tests/CMakeTests/CMakeLists.txt | 12 |
2 files changed, 16 insertions, 12 deletions
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake index 68b17bc..13a918d 100644 --- a/Modules/GetPrerequisites.cmake +++ b/Modules/GetPrerequisites.cmake @@ -69,9 +69,17 @@ function(gp_file_type original_file file type_var) endif("${file}" MATCHES "^@(executable|loader)_path") if(NOT is_embedded) - if("${file}" MATCHES "^(/System/Library/|/usr/lib/)") - set(is_system 1) - endif("${file}" MATCHES "^(/System/Library/|/usr/lib/)") + if(UNIX) + if("${file}" MATCHES "^(/lib/|/lib32/|/lib64/)") + set(is_system 1) + endif("${file}" MATCHES "^(/lib/|/lib32/|/lib64/)") + endif(UNIX) + + if(APPLE) + if("${file}" MATCHES "^(/System/Library/|/usr/lib/)") + set(is_system 1) + endif("${file}" MATCHES "^(/System/Library/|/usr/lib/)") + endif(APPLE) if(WIN32) string(TOLOWER "$ENV{SystemRoot}" sysroot) @@ -406,7 +414,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa if("${gp_tool}" STREQUAL "ldd") set(gp_cmd_args "") - set(gp_regex "^\t([\t ]+)[\t ].*${eol_char}$") + set(gp_regex "^[\t ]*[^\t ]+ => ([^\t ]+).*${eol_char}$") set(gp_regex_cmp_count 1) set(gp_tool_known 1) endif("${gp_tool}" STREQUAL "ldd") diff --git a/Tests/CMakeTests/CMakeLists.txt b/Tests/CMakeTests/CMakeLists.txt index b2b29e6..9f91abc 100644 --- a/Tests/CMakeTests/CMakeLists.txt +++ b/Tests/CMakeTests/CMakeLists.txt @@ -15,11 +15,7 @@ AddCMakeTest(Include "") AddCMakeTest(FindBase "") AddCMakeTest(Toolchain "") -# Not ready for Unix testing yet. Coming "soon"... -# -IF(WIN32 OR APPLE) - SET(GetPrerequisites_PreArgs - "-DCTEST_CONFIGURATION_TYPE:STRING=\\\${CTEST_CONFIGURATION_TYPE}" - ) - AddCMakeTest(GetPrerequisites "${GetPrerequisites_PreArgs}") -ENDIF(WIN32 OR APPLE) +SET(GetPrerequisites_PreArgs + "-DCTEST_CONFIGURATION_TYPE:STRING=\\\${CTEST_CONFIGURATION_TYPE}" + ) +AddCMakeTest(GetPrerequisites "${GetPrerequisites_PreArgs}") |