Skip to content

Commit

Permalink
Fix errata in FCLMacros.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 committed Aug 22, 2016
1 parent 67a45f7 commit e7a55e6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions CMakeModules/FCLMacros.cmake
Expand Up @@ -14,14 +14,14 @@ endmacro()
# Usage:
# fcl_get_filename_components(_var _cacheDesc [items...])
#===============================================================================
macro(fcl_get_filename_components _var _cacheDesc _suffix_to_remove)
macro(fcl_get_filename_components _var _cacheDesc _prefix_to_remove)
set(${_var} "" CACHE INTERNAL ${_cacheDesc} FORCE)
string(LENGTH ${_suffix_to_remove} suffix_length)
string(LENGTH ${_prefix_to_remove} prefix_length)
foreach(header ${ARGN})
string(LENGTH ${header} full_length)
math(EXPR relative_path_length "${full_length} - ${suffix_length}")
string(SUBSTRING ${header} ${suffix_length} ${relative_path_length} header)
if(NOT ${header} MATCHES "/detail/" AND NOT ${header} MATCHES "-impl.h")
math(EXPR relative_path_length "${full_length} - ${prefix_length}")
string(SUBSTRING ${header} ${prefix_length} ${relative_path_length} header)
if(NOT ${header} MATCHES "/detail/" AND NOT ${header} MATCHES "-inl.h")
fcl_append_to_cached_string(
${_var}
${_cacheDesc}"_HEADER_NAMES"
Expand Down

0 comments on commit e7a55e6

Please sign in to comment.