From 118e0035dfd433a151680437823dc43b771e96be Mon Sep 17 00:00:00 2001 From: James Zern Date: Thu, 6 Apr 2023 15:24:12 -0700 Subject: [PATCH] deps.cmake: remove unneeded header checks These were picked up when matching autoconf's default checks and aren't useful except to compare the generated config.h. Removing them speeds up cmake, especially on windows where creating new processes is slow. Change-Id: Ie891aad0a809af16357168d2ff7fd65922ee4011 --- cmake/config.h.in | 33 --------------------------------- cmake/deps.cmake | 20 -------------------- 2 files changed, 53 deletions(-) diff --git a/cmake/config.h.in b/cmake/config.h.in index 3770935c..fe1c53ad 100644 --- a/cmake/config.h.in +++ b/cmake/config.h.in @@ -16,48 +16,18 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_CPU_FEATURES_H 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_DLFCN_H 1 - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_GLUT_GLUT_H 1 /* Define to 1 if you have the header file. */ #cmakedefine HAVE_GL_GLUT_H 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_MEMORY_H 1 - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_OPENGL_GLUT_H 1 -/* Have PTHREAD_PRIO_INHERIT. */ -#cmakedefine HAVE_PTHREAD_PRIO_INHERIT @HAVE_PTHREAD_PRIO_INHERIT@ - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SHLWAPI_H 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TYPES_H 1 - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_UNISTD_H 1 @@ -93,9 +63,6 @@ /* Define to the version of this package. */ #cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@" -/* Define to 1 if you have the ANSI C header files. */ -#cmakedefine STDC_HEADERS 1 - /* Version number of package */ #cmakedefine VERSION "@VERSION@" diff --git a/cmake/deps.cmake b/cmake/deps.cmake index 48c821e6..c5aef9b4 100644 --- a/cmake/deps.cmake +++ b/cmake/deps.cmake @@ -43,16 +43,6 @@ if(WEBP_USE_THREAD) if(CMAKE_USE_PTHREADS_INIT AND NOT CMAKE_SYSTEM_NAME STREQUAL "QNX") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread") endif() - check_c_source_compiles( - " - #include - int main (void) { - int attr = PTHREAD_PRIO_INHERIT; - return attr; - } - " - FLAG_HAVE_PTHREAD_PRIO_INHERIT) - set(HAVE_PTHREAD_PRIO_INHERIT ${FLAG_HAVE_PTHREAD_PRIO_INHERIT}) list(APPEND WEBP_DEP_LIBRARIES Threads::Threads) endif() set(WEBP_USE_THREAD ${Threads_FOUND}) @@ -136,20 +126,10 @@ endif() # Check for specific headers. include(CheckIncludeFiles) -check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS) -check_include_files(dlfcn.h HAVE_DLFCN_H) check_include_files(GLUT/glut.h HAVE_GLUT_GLUT_H) check_include_files(GL/glut.h HAVE_GL_GLUT_H) -check_include_files(inttypes.h HAVE_INTTYPES_H) -check_include_files(memory.h HAVE_MEMORY_H) check_include_files(OpenGL/glut.h HAVE_OPENGL_GLUT_H) check_include_files(shlwapi.h HAVE_SHLWAPI_H) -check_include_files(stdint.h HAVE_STDINT_H) -check_include_files(stdlib.h HAVE_STDLIB_H) -check_include_files(strings.h HAVE_STRINGS_H) -check_include_files(string.h HAVE_STRING_H) -check_include_files(sys/stat.h HAVE_SYS_STAT_H) -check_include_files(sys/types.h HAVE_SYS_TYPES_H) check_include_files(unistd.h HAVE_UNISTD_H) check_include_files(wincodec.h HAVE_WINCODEC_H) check_include_files(windows.h HAVE_WINDOWS_H)