Skip to content

Commit

Permalink
[SofaMacros] FIX regex invalid sequence errors
Browse files Browse the repository at this point in the history
\.h\.in is a correct regex but CMake complains about it
  • Loading branch information
guparan committed Sep 26, 2019
1 parent 1b1c2fe commit 5b3d1c4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions SofaKernel/SofaFramework/SofaMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ macro(sofa_install_targets package_name the_targets include_install_dir)
get_target_property(target_sources ${target} SOURCES)
#list(FILTER ${target_sources} INCLUDE REGEX ".*\.h\.in$") # CMake >= 3.6
foreach(filepath ${target_sources})
if(${filepath} MATCHES ".*\.h\.in$")
if(filepath AND ${filepath} MATCHES ".*.h.in$")
get_filename_component(filename ${filepath} NAME_WE)

set(configure_dir "${CMAKE_BINARY_DIR}/include/${include_install_dir}")
Expand Down Expand Up @@ -668,12 +668,12 @@ function(sofa_set_install_relocatable target install_dir)
COMMENT "${target}: Patching cmake_install.cmake"
COMMAND
if not exist \"${target_binary_dir}/cmake_install.cmakepatch\"
echo set ( CMAKE_INSTALL_PREFIX_BACK \"\$$\{CMAKE_INSTALL_PREFIX\}\" )
echo set ( CMAKE_INSTALL_PREFIX_BACK \"$$\{CMAKE_INSTALL_PREFIX\}\" )
> "${target_binary_dir}/cmake_install.cmakepatch"
&& echo set ( CMAKE_INSTALL_PREFIX \"\$$\{CMAKE_INSTALL_PREFIX\}/${install_dir}/${target}\" )
&& echo set ( CMAKE_INSTALL_PREFIX \"$$\{CMAKE_INSTALL_PREFIX\}/${install_dir}/${target}\" )
>> "${target_binary_dir}/cmake_install.cmakepatch"
&& type \"${target_binary_dir_windows}\\\\cmake_install.cmake\" >> \"${target_binary_dir_windows}\\\\cmake_install.cmakepatch\"
&& echo set ( CMAKE_INSTALL_PREFIX \"\$$\{CMAKE_INSTALL_PREFIX_BACK\}\" )
&& echo set ( CMAKE_INSTALL_PREFIX \"$$\{CMAKE_INSTALL_PREFIX_BACK\}\" )
>> "${target_binary_dir}/cmake_install.cmakepatch"
&& ${CMAKE_COMMAND} -E copy ${target_binary_dir}/cmake_install.cmakepatch ${target_binary_dir}/cmake_install.cmake
)
Expand Down

0 comments on commit 5b3d1c4

Please sign in to comment.