From: vsr Date: Thu, 8 May 2014 12:46:57 +0000 (+0400) Subject: SALOME_GENERATE_TESTS_ENVIRONMENT() macro: strip "Salome" prefix from project name... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8a2394d7173f5260c4503cbbeb2167c6aad31852;p=modules%2Fyacs.git SALOME_GENERATE_TESTS_ENVIRONMENT() macro: strip "Salome" prefix from project name only for Salome project --- diff --git a/salome_adm/cmake_files/SalomeMacros.cmake b/salome_adm/cmake_files/SalomeMacros.cmake index 8c85651f3..65983c995 100644 --- a/salome_adm/cmake_files/SalomeMacros.cmake +++ b/salome_adm/cmake_files/SalomeMacros.cmake @@ -837,7 +837,12 @@ MACRO(SALOME_GENERATE_TESTS_ENVIRONMENT output) ENDFOREACH() # Get module name as substring of "Salome" - STRING(SUBSTRING "${PROJECT_NAME}" 6 -1 PRNAME) + STRING(REGEX MATCH "^Salome" _is_salome_project ${PROJECT_NAME}) + IF(_is_salome_project) + STRING(SUBSTRING "${PROJECT_NAME}" 6 -1 PRNAME) + ELSE() + SET(PRNAME ${PROJECT_NAME}) + ENDIF() SET(_env "${PRNAME}_ROOT_DIR=${CMAKE_INSTALL_PREFIX}${sep}${_env}") # Creating follow string for Windows environement: