Skip to content

Commit

Permalink
CMake CHECK_FUNCTION_EXISTS --> CHECK_SYMBOL_EXISTS
Browse files Browse the repository at this point in the history
  • Loading branch information
derobins committed Mar 16, 2024
1 parent 6d85ea2 commit e78861e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
48 changes: 24 additions & 24 deletions config/cmake/ConfigureChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ if (MINGW OR NOT WINDOWS)
else ()
CHECK_STRUCT_HAS_MEMBER("struct tm" tz_minuteswest "sys/types.h;time.h" ${HDF_PREFIX}_HAVE_STRUCT_TIMEZONE)
endif ()
CHECK_FUNCTION_EXISTS (gettimeofday ${HDF_PREFIX}_HAVE_GETTIMEOFDAY)
CHECK_SYMBOL_EXISTS (gettimeofday ${HDF_PREFIX}_HAVE_GETTIMEOFDAY)
foreach (time_test
# HAVE_TIMEZONE
HAVE_TM_ZONE
Expand All @@ -379,14 +379,14 @@ if (MINGW OR NOT WINDOWS)
# ----------------------------------------------------------------------
# How do we figure out the width of a tty in characters?
#
CHECK_FUNCTION_EXISTS (ioctl ${HDF_PREFIX}_HAVE_IOCTL)
CHECK_SYMBOL_EXISTS (ioctl ${HDF_PREFIX}_HAVE_IOCTL)
CHECK_STRUCT_HAS_MEMBER ("struct videoconfig" numtextcols "" ${HDF_PREFIX}_HAVE_STRUCT_VIDEOCONFIG)
CHECK_STRUCT_HAS_MEMBER ("struct text_info" screenwidth "" ${HDF_PREFIX}_HAVE_STRUCT_TEXT_INFO)
CHECK_FUNCTION_EXISTS (_getvideoconfig ${HDF_PREFIX}_HAVE__GETVIDEOCONFIG)
CHECK_FUNCTION_EXISTS (gettextinfo ${HDF_PREFIX}_HAVE_GETTEXTINFO)
CHECK_FUNCTION_EXISTS (_scrsize ${HDF_PREFIX}_HAVE__SCRSIZE)
CHECK_SYMBOL_EXISTS (_getvideoconfig ${HDF_PREFIX}_HAVE__GETVIDEOCONFIG)
CHECK_SYMBOL_EXISTS (gettextinfo ${HDF_PREFIX}_HAVE_GETTEXTINFO)
CHECK_SYMBOL_EXISTS (_scrsize ${HDF_PREFIX}_HAVE__SCRSIZE)
if (NOT CYGWIN)
CHECK_FUNCTION_EXISTS (GetConsoleScreenBufferInfo ${HDF_PREFIX}_HAVE_GETCONSOLESCREENBUFFERINFO)
CHECK_SYMBOL_EXISTS (GetConsoleScreenBufferInfo ${HDF_PREFIX}_HAVE_GETCONSOLESCREENBUFFERINFO)
endif ()
CHECK_SYMBOL_EXISTS (TIOCGWINSZ "sys/ioctl.h" ${HDF_PREFIX}_HAVE_TIOCGWINSZ)
CHECK_SYMBOL_EXISTS (TIOCGETD "sys/ioctl.h" ${HDF_PREFIX}_HAVE_TIOCGETD)
Expand All @@ -395,27 +395,27 @@ endif ()
#-----------------------------------------------------------------------------
# Check for some functions that are used
#
CHECK_FUNCTION_EXISTS (alarm ${HDF_PREFIX}_HAVE_ALARM)
CHECK_FUNCTION_EXISTS (fcntl ${HDF_PREFIX}_HAVE_FCNTL)
CHECK_FUNCTION_EXISTS (flock ${HDF_PREFIX}_HAVE_FLOCK)
CHECK_FUNCTION_EXISTS (fork ${HDF_PREFIX}_HAVE_FORK)
CHECK_SYMBOL_EXISTS (alarm ${HDF_PREFIX}_HAVE_ALARM)
CHECK_SYMBOL_EXISTS (fcntl ${HDF_PREFIX}_HAVE_FCNTL)
CHECK_SYMBOL_EXISTS (flock ${HDF_PREFIX}_HAVE_FLOCK)
CHECK_SYMBOL_EXISTS (fork ${HDF_PREFIX}_HAVE_FORK)

CHECK_FUNCTION_EXISTS (gethostname ${HDF_PREFIX}_HAVE_GETHOSTNAME)
CHECK_FUNCTION_EXISTS (getrusage ${HDF_PREFIX}_HAVE_GETRUSAGE)
CHECK_SYMBOL_EXISTS (gethostname ${HDF_PREFIX}_HAVE_GETHOSTNAME)
CHECK_SYMBOL_EXISTS (getrusage ${HDF_PREFIX}_HAVE_GETRUSAGE)

CHECK_FUNCTION_EXISTS (pread ${HDF_PREFIX}_HAVE_PREAD)
CHECK_FUNCTION_EXISTS (pwrite ${HDF_PREFIX}_HAVE_PWRITE)
CHECK_FUNCTION_EXISTS (rand_r ${HDF_PREFIX}_HAVE_RAND_R)
CHECK_FUNCTION_EXISTS (random ${HDF_PREFIX}_HAVE_RANDOM)
CHECK_SYMBOL_EXISTS (pread ${HDF_PREFIX}_HAVE_PREAD)
CHECK_SYMBOL_EXISTS (pwrite ${HDF_PREFIX}_HAVE_PWRITE)
CHECK_SYMBOL_EXISTS (rand_r ${HDF_PREFIX}_HAVE_RAND_R)
CHECK_SYMBOL_EXISTS (random ${HDF_PREFIX}_HAVE_RANDOM)

CHECK_FUNCTION_EXISTS (strcasestr ${HDF_PREFIX}_HAVE_STRCASESTR)
CHECK_FUNCTION_EXISTS (strdup ${HDF_PREFIX}_HAVE_STRDUP)
CHECK_FUNCTION_EXISTS (symlink ${HDF_PREFIX}_HAVE_SYMLINK)
CHECK_SYMBOL_EXISTS (strcasestr ${HDF_PREFIX}_HAVE_STRCASESTR)
CHECK_SYMBOL_EXISTS (strdup ${HDF_PREFIX}_HAVE_STRDUP)
CHECK_SYMBOL_EXISTS (symlink ${HDF_PREFIX}_HAVE_SYMLINK)

CHECK_FUNCTION_EXISTS (tmpfile ${HDF_PREFIX}_HAVE_TMPFILE)
CHECK_FUNCTION_EXISTS (asprintf ${HDF_PREFIX}_HAVE_ASPRINTF)
CHECK_FUNCTION_EXISTS (vasprintf ${HDF_PREFIX}_HAVE_VASPRINTF)
CHECK_FUNCTION_EXISTS (waitpid ${HDF_PREFIX}_HAVE_WAITPID)
CHECK_SYMBOL_EXISTS (tmpfile ${HDF_PREFIX}_HAVE_TMPFILE)
CHECK_SYMBOL_EXISTS (asprintf ${HDF_PREFIX}_HAVE_ASPRINTF)
CHECK_SYMBOL_EXISTS (vasprintf ${HDF_PREFIX}_HAVE_VASPRINTF)
CHECK_SYMBOL_EXISTS (waitpid ${HDF_PREFIX}_HAVE_WAITPID)

#-----------------------------------------------------------------------------
# sigsetjmp is special; may actually be a macro
Expand Down Expand Up @@ -628,7 +628,7 @@ endif ()

# Find the library containing clock_gettime()
if (MINGW OR NOT WINDOWS)
CHECK_FUNCTION_EXISTS (clock_gettime CLOCK_GETTIME_IN_LIBC)
CHECK_SYMBOL_EXISTS (clock_gettime CLOCK_GETTIME_IN_LIBC)
CHECK_LIBRARY_EXISTS (rt clock_gettime "" CLOCK_GETTIME_IN_LIBRT)
CHECK_LIBRARY_EXISTS (posix4 clock_gettime "" CLOCK_GETTIME_IN_LIBPOSIX4)
if (CLOCK_GETTIME_IN_LIBC)
Expand Down
6 changes: 3 additions & 3 deletions config/cmake/ZLIB/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ endif ()
#
# Check for unistd.h
#
check_include_file(unistd.h Z_HAVE_UNISTD_H)
CHECK_FUNCTION_EXISTS (memcpy HAVE_MEMCPY)
CHECK_FUNCTION_EXISTS (vsnprintf HAVE_VSNPRINTF)
CHECK_INCLUDE_FILE (unistd.h Z_HAVE_UNISTD_H)
CHECK_SYMBOL_EXISTS (memcpy HAVE_MEMCPY)
CHECK_SYMBOL_EXISTS (vsnprintf HAVE_VSNPRINTF)

#-----------------------------------------------------------------------------
# Define some CMake variables for use later in the project
Expand Down

0 comments on commit e78861e

Please sign in to comment.