0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 20:13:05 +02:00
openvpn3/cmake/mypragmaonce.cmake
Arne Schwabe d56e049ea4 Refactor dependencies to be in a cmake script
This allows the dependencies to be used by multiple parts of the project,
e.g. non public unit tests, ovpncli etc.

Building ovpncli demostrates this
2019-05-13 14:49:36 +02:00

9 lines
264 B
CMake

macro(my_pragma_once)
set(__filename "${CMAKE_CURRENT_LIST_FILE}")
get_property(already_included GLOBAL PROPERTY "pr_${__filename}")
if(already_included)
return()
endif()
set_property(GLOBAL PROPERTY "pr_${__filename}" TRUE)
endmacro()