CodeCompass

Форк
0
/
Exports.cmake 
46 строк · 1.6 Кб
1
#
2
# Fetch some of the environment information that is necessary to run CodeCompass
3
#
4

5
# Transforms the given list of files to a list of their directory names.
6
# The names are uniqued.
7
# @parameter _outputName - The variable where the output
8
# @parameter _fileList - The list of files to transform.
9
function(filelist_to_dirlist_unique _outputName _fileList)
10
  list(APPEND _dirs "")
11
  foreach(_file IN LISTS _fileList)
12
    get_filename_component(_dir "${_file}" DIRECTORY)
13
    list(APPEND _dirs "${_dir}")
14
  endforeach()
15
  list(REMOVE_DUPLICATES _dirs)
16
  set(${_outputName} "${_dirs}" PARENT_SCOPE)
17
endfunction(filelist_to_dirlist_unique)
18

19
# Adds the given path to one of the paths that are exported to the install
20
# location into an environment script.
21
# @parameter _envVar - The variable to which the value should be exported.
22
# @parameter _value - The value to export.
23
function(mark_as_run_env_path _envVar _value)
24
  if (NOT RUNENV_${_envVar})
25
    set(_envList "${_value}")
26
  else()
27
    set(_envList "${RUNENV_${_envVar}}")
28
    list(APPEND _envList ${_value})
29
  endif()
30

31
  set(RUNENV_${_envVar} "${_envList}"
32
    CACHE INTERNAL "Environment variable exported to install." FORCE)
33
  mark_as_advanced(RUNENV_${_envVar})
34
endfunction(mark_as_run_env_path)
35

36
# Reset environment variables that were cached.
37
set(RUNENV_LD_LIBRARY_PATH ""
38
  CACHE INTERNAL "Environment variable exported to install." FORCE)
39

40
# ODB
41
filelist_to_dirlist_unique(_odbLibDirs "${ODB_LIBRARIES}")
42
mark_as_run_env_path(LD_LIBRARY_PATH "${_odbLibDirs}")
43

44
# Thrift
45
filelist_to_dirlist_unique(_thriftLibDirs "${THRIFT_LIBTHRIFT_LIBRARIES}")
46
mark_as_run_env_path(LD_LIBRARY_PATH "${_thriftLibDirs}")
47

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.