[asterisk-scf-commits] asterisk-scf/release/cmake.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Jun 23 14:59:46 CDT 2011


branch "master" has been updated
       via  e28b4b692734af626abbec236f09535c450cfd30 (commit)
      from  29891bab0001cd9aad40e22ed7f30aec34b65daf (commit)

Summary of changes:
 AsteriskSCF.cmake |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit e28b4b692734af626abbec236f09535c450cfd30
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Thu Jun 23 14:57:49 2011 -0500

    Ensure that bare filenames are properly converted to absolute paths.
    
    Some versions of CMake don't expand a bare filename into a full path when
    get_filename_component(REALPATH) is called, even though they should. In order
    to work around this bug, in __astscf_ensure_abs_paths, the script will now
    check for a bare filename as input, and if one is found, CMAKE_CURRENT_SOURCE_DIR
    will be prepended to the input filename.

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 70fa132..c89a042 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -417,14 +417,17 @@ function(astscf_project NAME ICE_VERSION)
 endfunction()
 
 # Ensures that a list of paths are all absolute paths.
-macro(__astscf_ensure_abs_paths pathlist)
-  unset(eap_temp)
+function(__astscf_ensure_abs_paths pathlist)
   foreach(p ${${pathlist}})
+    get_filename_component(inpath "${p}" PATH)
+    if(NOT inpath)
+      set(p "${CMAKE_CURRENT_SOURCE_DIR}/${p}")
+    endif()
     get_filename_component(newpath "${p}" REALPATH)
     list(APPEND eap_temp "${newpath}")
   endforeach()
-  set(${pathlist} ${eap_temp})
-endmacro()
+  set(${pathlist} ${eap_temp} PARENT_SCOPE)
+endfunction()
 
 # Function which initializes a component for building
 function(astscf_component_init COMPONENT)

-----------------------------------------------------------------------


-- 
asterisk-scf/release/cmake.git



More information about the asterisk-scf-commits mailing list