SalomePlatform / kernel

GNU Lesser General Public License v2.1
3 stars 0 forks source link

STRING sub-command REGEX, mode REPLACE failed to compile regex #2

Open wrxhardworking opened 3 days ago

wrxhardworking commented 3 days ago
[cmake] CMake Error at /home/ethan/c++pro/salome/configuration/cmake/SalomeMacros.cmake:167 (STRING):
[cmake]   STRING sub-command REGEX, mode REPLACE failed to compile regex
[cmake]   "/home/ethan/c++pro/salome_kernel/kernel".
[cmake] Call Stack (most recent call first):
[cmake]   bin/CMakeLists.txt:70 (SALOME_INSTALL_SCRIPTS)

so should i modify the SalomeMacros.cmake?

nitawa commented 3 days ago

I believe that the use of special characters in your installation directory, here c++pro, results in the cmake regexp error. Thus, try instead to use another directory name.

You can also if you wish, fix this issue in SalomeMacros.cmake file and open a pull request that we will review and integrate.

Thanks

wrxhardworking commented 3 days ago

thank you i have solved.

nitawa commented 2 days ago

Thanks for reporting about the issue. Internal tracker reference: bos #42420

A fix:

-  STRING(REGEX REPLACE ${CMAKE_SOURCE_DIR} "" rel_dir ${CMAKE_CURRENT_SOURCE_DIR})
+  FILE(RELATIVE_PATH rel_dir ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
wrxhardworking commented 1 day ago

感谢您报告有关该问题的信息。内部跟踪器参考编号:bos #42420

A fix:

-  STRING(REGEX REPLACE ${CMAKE_SOURCE_DIR} "" rel_dir ${CMAKE_CURRENT_SOURCE_DIR})
+  FILE(RELATIVE_PATH rel_dir ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})

yeah, it may be more friedly,thank you.