Проверка наличия каталогов

This commit is contained in:
Andrei Astafev 2019-07-02 10:13:20 +03:00
parent 40d824a999
commit dcfc5e9e03
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ foreach(_m ${CMAKE_MODULE_PATH})
endif() endif()
endforeach() endforeach()
if(CMLIB_MODULE_DIR) if(IS_DIRECTORY "${CMLIB_MODULE_DIR}")
if(NOT DEFINED CMLIB_THIRDPARTY_DIR) if(NOT DEFINED CMLIB_THIRDPARTY_DIR)
set(CMLIB_THIRDPARTY_DIR "${CMLIB_MODULE_DIR}/thirdparty") set(CMLIB_THIRDPARTY_DIR "${CMLIB_MODULE_DIR}/thirdparty")
list(APPEND CMAKE_MODULE_PATH ${CMLIB_THIRDPARTY_DIR}) list(APPEND CMAKE_MODULE_PATH ${CMLIB_THIRDPARTY_DIR})

View File

@ -1,6 +1,6 @@
if(DIRECTORY CMLIB_MODULE_DIR) if(IS_DIRECTORY "${CMLIB_MODULE_DIR}")
set(CMLIB_SANITIZERS_DIR "${CMLIB_MODULE_DIR}/thirdparty/sanitizers/cmake") set(CMLIB_SANITIZERS_DIR "${CMLIB_MODULE_DIR}/thirdparty/sanitizers/cmake")
if(DIRECTORY CMLIB_SANITIZERS_DIR) if(IS_DIRECTORY "${CMLIB_SANITIZERS_DIR}")
list(APPEND CMAKE_MODULE_PATH ${CMLIB_SANITIZERS_DIR}) list(APPEND CMAKE_MODULE_PATH ${CMLIB_SANITIZERS_DIR})
else() else()
message(WARNING "Sanitizers submodule not found.") message(WARNING "Sanitizers submodule not found.")