1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0030456: Make OCCT_CHECK_AND_UNSET_GROUP more general

Modify OCCT_CHECK_AND_UNSET_GROUP function to allow unset any group of variables
This commit is contained in:
apn 2019-07-19 16:25:59 +03:00
parent 89073268fd
commit 620a6baa59

View File

@ -12,18 +12,12 @@ macro (OCCT_CHECK_AND_UNSET VARNAME)
endif()
endmacro()
macro (OCCT_CHECK_AND_UNSET_GROUP VARNAME)
OCCT_CHECK_AND_UNSET ("${VARNAME}_DIR")
OCCT_CHECK_AND_UNSET ("${VARNAME}_INCLUDE_DIR")
OCCT_CHECK_AND_UNSET ("${VARNAME}_LIBRARY")
OCCT_CHECK_AND_UNSET ("${VARNAME}_LIBRARY_DIR")
if (WIN32)
OCCT_CHECK_AND_UNSET ("${VARNAME}_DLL")
OCCT_CHECK_AND_UNSET ("${VARNAME}_DLL_DIR")
endif()
macro (OCCT_CHECK_AND_UNSET_GROUP GROUPNAME)
get_cmake_property(VARS VARIABLES)
string (REGEX MATCHALL "(^|;)${GROUPNAME}[A-Za-z0-9_]*" GROUPNAME_VARS "${VARS}")
foreach(GROUPNAME_VAR ${GROUPNAME_VARS})
OCCT_CHECK_AND_UNSET(${GROUPNAME_VAR})
endforeach()
endmacro()
macro (OCCT_CHECK_AND_UNSET_INSTALL_DIR_SUBDIRS)