Warning, /pim/sink/cmake/modules/generate_crypto_test_wrapper.cmake is written in an unsupported language. File is not indexed.

0001 # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
0002 # Copyright (c) 2013, Sandro Knauß <mail@sandroknauss.de>
0003 # Copyright (c) 2018, Christian Mollekopf <mollekopf@kolabsys.com>
0004 #
0005 # Redistribution and use is allowed according to the terms of the BSD license.
0006 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
0007 
0008 
0009 if (UNIX)
0010 
0011 file(WRITE "${_filename}"
0012 "#!/usr/bin/env sh
0013 # created by cmake, don't edit, changes will be lost
0014 
0015 # don't mess with a gpg-agent already running on the system
0016 unset GPG_AGENT_INFO
0017 
0018 ${_library_path_variable}=${_ld_library_path}\${${_library_path_variable}:+:\$${_library_path_variable}} GNUPGHOME=${_gnupghome} gpg-agent --daemon \"${_executable}\" \"$@\"
0019 _result=$?
0020 GNUPGHOME=${_gnupghome} gpg-connect-agent killagent /bye
0021 exit \$_result
0022 ")
0023 
0024 # make it executable
0025 # since this is only executed on UNIX, it is safe to call chmod
0026 exec_program(chmod ARGS ug+x \"${_filename}\" OUTPUT_VARIABLE _dummy )
0027 
0028 else (UNIX)
0029 
0030 file(TO_NATIVE_PATH "${_ld_library_path}" win_path)
0031 file(TO_NATIVE_PATH "${_gnupghome}" win_gnupghome)
0032 
0033 file(WRITE "${_filename}"
0034 "
0035 set PATH=${win_path};$ENV{PATH}
0036 set GNUPGHOME=${win_gnupghome};$ENV{GNUPGHOME}
0037 gpg-agent --daemon \"${_executable}\" %*
0038 ")
0039 
0040 endif (UNIX)