Warning, /frameworks/extra-cmake-modules/modules/ECMSourceVersionControl.cmake is written in an unsupported language. File is not indexed.
0001 # SPDX-FileCopyrightText: 2019 Harald Sitter <sitter@kde.org> 0002 # 0003 # SPDX-License-Identifier: BSD-3-Clause 0004 0005 #[=======================================================================[.rst: 0006 ECMSourceVersionControl 0007 -------------------------- 0008 0009 Tries to determine whether the source is under version control (git clone, 0010 svn checkout, etc). 0011 0012 ``ECM_SOURCE_UNDER_VERSION_CONTROL`` is set when indication is found that 0013 ``CMAKE_SOURCE_DIR`` is under version control. 0014 0015 Since 5.63 0016 #]=======================================================================] 0017 0018 if(EXISTS "${CMAKE_SOURCE_DIR}/.git" OR 0019 EXISTS "${CMAKE_SOURCE_DIR}/.svn" OR 0020 EXISTS "${CMAKE_SOURCE_DIR}/.hg" OR 0021 EXISTS "${CMAKE_SOURCE_DIR}/.bzr") 0022 set(ECM_SOURCE_UNDER_VERSION_CONTROL TRUE) 0023 else() 0024 set(ECM_SOURCE_UNDER_VERSION_CONTROL FALSE) 0025 endif()