netcdf-c/cmake/netcdf_functions_macros.cmake
2024-01-10 16:11:00 -06:00

20 lines
583 B
CMake

macro(set_std_filter filter)
# Upper case the filter name
string(TOUPPER "${filter}" upfilter)
string(TOLOWER "${filter}" downfilter)
if(ENABLE_FILTER_${upfilter})
# Define a test flag for filter
IF(${filter}_FOUND)
INCLUDE_DIRECTORIES(${${filter}_INCLUDE_DIRS})
SET(ENABLE_${upfilter} TRUE)
SET(HAVE_${upfilter} ON)
SET(STD_FILTERS "${STD_FILTERS} ${downfilter}")
MESSAGE(">>> Standard Filter: ${downfilter}")
ELSE()
SET(ENABLE_${upfilter} FALSE)
SET(HAVE_${upfilter} OFF)
ENDIF()
ELSE()
SET(HAVE_${upfilter} OFF)
ENDIF()
endmacro(set_std_filter)