Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes regex for library config types #723

Merged
merged 1 commit into from
Mar 30, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmake/catkin_libraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ macro(catkin_pack_libraries_with_build_configuration VAR)
set(_index 0)
while(${_index} LESS ${_count})
list(GET _argn ${_index} lib)
if("${lib}" MATCHES "^debug|optimized|general$")
if("${lib}" MATCHES "^(debug|optimized|general)$")
math(EXPR _index "${_index} + 1")
if(${_index} EQUAL ${_count})
message(FATAL_ERROR "catkin_pack_libraries_with_build_configuration() the list of libraries '${_argn}' ends with '${lib}' which is a build configuration keyword and must be followed by a library")
Expand Down Expand Up @@ -124,7 +124,7 @@ endmacro()
macro(catkin_replace_imported_library_targets VAR)
set(${VAR} "")
foreach(lib ${ARGN})
if((NOT "${lib}" MATCHES "^debug|optimized|general$") AND TARGET ${lib})
if((NOT "${lib}" MATCHES "^(debug|optimized|general)$") AND TARGET ${lib})
# sometimes cmake dependencies define imported targets, in which
# case the imported library information is not the target name, but
# the information embedded in cmake properties inside the imported library
Expand Down
4 changes: 2 additions & 2 deletions cmake/templates/pkgConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ macro(_pack_libraries_with_build_configuration VAR)
set(_index 0)
while(${_index} LESS ${_count})
list(GET _argn ${_index} lib)
if("${lib}" MATCHES "^debug|optimized|general$")
if("${lib}" MATCHES "^(debug|optimized|general)$")
math(EXPR _index "${_index} + 1")
if(${_index} EQUAL ${_count})
message(FATAL_ERROR "_pack_libraries_with_build_configuration() the list of libraries '${ARGN}' ends with '${lib}' which is a build configuration keyword and must be followed by a library")
Expand Down Expand Up @@ -112,7 +112,7 @@ endif()
set(libraries "@PKG_CONFIG_LIBRARIES@")
foreach(library ${libraries})
# keep build configuration keywords, target names and absolute libraries as-is
if("${library}" MATCHES "^debug|optimized|general$")
if("${library}" MATCHES "^(debug|optimized|general)$")
list(APPEND @PROJECT_NAME@_LIBRARIES ${library})
elseif(TARGET ${library})
list(APPEND @PROJECT_NAME@_LIBRARIES ${library})
Expand Down