Skip to content

Commit

Permalink
Fixed string replacement. Refs #4368.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Dec 29, 2011
1 parent 2ca9fb1 commit d27c9c6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Code/Mantid/Build/CMake/FindCppcheck.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ function(add_cppcheck _name) # additional arguments are files to ignore
list(FIND _cppcheck_ignores "${_cppcheck_loc}" _cppcheck_ignore_index)
if (_cppcheck_ignore_index LESS 0)
list(APPEND _files_absolute "${_cppcheck_loc}")
string ( REPLACE ${CMAKE_SOURCE_DIR} "" _cppcheck_loc "${_cppcheck_loc}" )
string ( REGEX REPLACE "^/" "" _cppcheck_loc "${_cppcheck_loc}" )
string ( REGEX REPLACE "^${CMAKE_SOURCE_DIR}/?" "" _cppcheck_loc "${_cppcheck_loc}" )
list(APPEND _files "${_cppcheck_loc}")
endif (_cppcheck_ignore_index LESS 0)
endif()
Expand Down

0 comments on commit d27c9c6

Please sign in to comment.