]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
SALOME_GENERATE_TESTS_ENVIRONMENT() macro: strip "Salome" prefix from project name...
authorvsr <vsr@opencascade.com>
Thu, 8 May 2014 12:46:57 +0000 (16:46 +0400)
committervsr <vsr@opencascade.com>
Thu, 8 May 2014 12:46:57 +0000 (16:46 +0400)
salome_adm/cmake_files/SalomeMacros.cmake

index 8c85651f31fd1ada802d8544d171b3ad5eb9f237..65983c99590714b9fd1d1febe73d540f58b3df03 100644 (file)
@@ -837,7 +837,12 @@ MACRO(SALOME_GENERATE_TESTS_ENVIRONMENT output)
  ENDFOREACH()
 
  # Get module name as substring of "Salome<ModuleName>"
- 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: