File: UserChangedWarning.cmake

package info (click to toggle)
broccoli-python 0.62-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 460 kB
  • ctags: 105
  • sloc: python: 407; sh: 202; makefile: 21
file content (15 lines) | stat: -rw-r--r-- 760 bytes parent folder | download | duplicates (22)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Show warning when installing user is different from the one that configured,
# except when the install is root.
if ("${PROJECT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
    install(CODE "
    if (NOT \"$ENV{USER}\" STREQUAL \"\$ENV{USER}\" AND
        NOT \"\$ENV{USER}\" STREQUAL root)
        message(STATUS \"WARNING: Install is being performed by user \"
                \"'\$ENV{USER}', but the build directory was configured by \"
                \"user '$ENV{USER}'. This may result in a permissions error \"
                \"when writing the install manifest, but you can ignore it \"
                \"and consider the installation as successful if you don't \"
                \"care about the install manifest.\")
    endif ()
    ")
endif ()