Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there anyway to speed-up "configure" step with CPM? #118

Closed
bolu-atx opened this issue May 17, 2020 · 5 comments
Closed

Is there anyway to speed-up "configure" step with CPM? #118

bolu-atx opened this issue May 17, 2020 · 5 comments

Comments

@bolu-atx
Copy link

bolu-atx commented May 17, 2020

Because I inherited an old project and there's a lot of dependencies, I don't really have a say in whether to include them or not.

Right now when I make any chanegs to the CMakeLists file, reconfiguring the cmake project literally takes like 5 mins to finish. This is largely because of CPM calling "configure" on a few old projects that do a lot of testing of different headers / platforms.

Would it be possible to mark a project as "CACHED" to configure it only once at the first load and just skip it in subsequent configures?

i.e. this is an example output I have for one such "configure" step, majority of the dependencies are never changing, so i don't think there's any need to reconfigure them

"C:\Program Files\JetBrains\CLion 2020.1\bin\cmake\win\bin\cmake.exe" -j 8 -G "Visual Studio 16 2019" -A x64 -Wno-dev -DCPM_SOURCE_CACHE=C:/Users/justb/tmp C:\Users\justb\Repos\kintek-explorer
-- The CXX compiler identification is MSVC 19.24.28314.0
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- MSVC toolchain runtime library is set to: MultiThreaded$<$<CONFIG:Debug>:Debug>
-- -Building MSVC 64 bit, x64
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.24.0.windows.2") 
-- Version header directory: C:/Users/justb/Repos/kintek-explorer/cmake-build-debug/include
-- Version target: version
-- Getting version of Git failed (maybe not tagged?), using backup: v0.0.0-dev-4923cbb
-- CPM: adding package zbslib@0 (v0)
-- ----- Library zbslib-1.0 start -----
-- >>> Library configured options
--      ZBSLIB_USE_KINFIT:         ON
--      ZBSLIB_USE_GLFW2:          OFF
--      ZBSLIB_USE_MULTITHREAD:    ON
--      ZBSLIB_USE_TRACEMSG:       OFF
-- CPM: zbslib: adding package gsl@2.5.0 (C:/Users/justb/tmp/gsl/ae31971594955d23ea61f9e8584cbfb6d8092a02)
-- The C compiler identification is MSVC 19.24.28314.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Got VERSION=2.5 from configure.ac
-- Got GSL_CURRENT=24 from configure.ac
-- Got GSL_REVISION=0 from configure.ac
-- Got GSL_AGE=1 from configure.ac
-- Got CBLAS_CURRENT=0 from configure.ac
-- Got CBLAS_REVISION=0 from configure.ac
-- Got CBLAS_AGE=0 from configure.ac
-- Looking for cos in m
-- Looking for cos in m - not found
-- Performing Test C_HAS_inline
-- Performing Test C_HAS_inline - Success
-- Performing Test C_EXTERN_INLINE
-- Performing Test C_EXTERN_INLINE - Failed
-- Performing Test C_C99INLINE
-- Performing Test C_C99INLINE - Success
-- Looking for include file ieeefp.h
-- Looking for include file ieeefp.h - not found
-- Looking for include file dlfcn.h
-- Looking for include file dlfcn.h - not found
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for include file memory.h
-- Looking for include file memory.h - found
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for include file stdlib.h
-- Looking for include file stdlib.h - found
-- Looking for include file strings.h
-- Looking for include file strings.h - not found
-- Looking for include file string.h
-- Looking for include file string.h - found
-- Looking for include file sys/stat.h
-- Looking for include file sys/stat.h - found
-- Looking for include file sys/types.h
-- Looking for include file sys/types.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - not found
-- Looking for include file stdio.h
-- Looking for include file stdio.h - found
-- Looking for EXIT_SUCCESS
-- Looking for EXIT_SUCCESS - found
-- Looking for EXIT_FAILURE
-- Looking for EXIT_FAILURE - found
-- Looking for feenableexcept
-- Looking for feenableexcept - not found
-- Looking for fesettrapenable
-- Looking for fesettrapenable - not found
-- Looking for hypot
-- Looking for hypot - found
-- Looking for expm1
-- Looking for expm1 - found
-- Looking for acosh
-- Looking for acosh - found
-- Looking for asinh
-- Looking for asinh - found
-- Looking for atanh
-- Looking for atanh - found
-- Looking for ldexp
-- Looking for ldexp - found
-- Looking for frexp
-- Looking for frexp - found
-- Looking for fprnd_t
-- Looking for fprnd_t - not found
-- Looking for isinf
-- Looking for isinf - found
-- Looking for isfinite
-- Looking for isfinite - found
-- Looking for finite
-- Looking for finite - not found
-- Looking for isnan
-- Looking for isnan - found
-- Looking for log1p
-- Looking for log1p - found
-- Looking for memcpy
-- Looking for memcpy - found
-- Looking for memmove
-- Looking for memmove - found
-- Looking for strdup
-- Looking for strdup - found
-- Looking for strtol
-- Looking for strtol - found
-- Looking for strtoul
-- Looking for strtoul - found
-- Looking for vprintf
-- Looking for vprintf - found
-- CPM: zbslib: adding package GLFW@3.3.2 (C:/Users/justb/tmp/glfw/2f31e09fde64fd490349fe2a2cd52987d2adb363)
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE  
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Using Win32 for window creation
-- CPM: zbslib: adding package CLAPACK@3.2.1 (C:/Users/justb/tmp/clapack/e5ae963fe2624cb05654378e04bfd231fae53345)
-- CPM: zbslib: adding package freetype@1.3.1-cmake (C:/Users/justb/tmp/freetype/3b8bfc95faa8deb2b5a7aade44a3f8c019b61769)
DIST_NAME: freetype
DIST_VERSION: 1.3.1
DIST_LICENSE: FreeType License/GNU General Public License version 2
DIST_AUTHOR: David Turner, Robert Wilhelm, and Werner Lemberg
DIST_MAINTAINER: Bo Lu
DIST_URL: http://www.freetype.org
DIST_DESC: Freetype library.
DIST_DEPENDS: 
-- CPM: zbslib: adding package FreeImage@0 (C:/Users/justb/tmp/freeimage/d757ba79ca5586c0b5ce8f5ea2f02fe212273b4e)
-- CPM: zbslib: adding package nr3@0 (v0)
-- CPM: zbslib: adding package Eigen@3.2.8 (C:/Users/justb/tmp/eigen/ce1fd8534701c94772980db1f9aede16d8fcc4fd)
-- Found OpenGL: opengl32   
-- OpenGL libs: opengl32;glu32
-- CPM: zbslib: adding package pcre@3.2.1 (C:/Users/justb/tmp/pcre/8c5e4d9075a09a0b2efb979456ee100bf6f2c50a)
-- Could NOT find BZip2 (missing: BZIP2_LIBRARIES) (found version "1.0.6")
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.11")
-- Could not find OPTIONAL package Readline
-- Could not find OPTIONAL package Editline
-- Looking for dirent.h
-- Looking for dirent.h - not found
-- Looking for windows.h
-- Looking for windows.h - found
-- Looking for C++ include type_traits.h
-- Looking for C++ include type_traits.h - not found
-- Looking for C++ include bits/type_traits.h
-- Looking for C++ include bits/type_traits.h - not found
-- Looking for bcopy
-- Looking for bcopy - not found
-- Looking for strerror
-- Looking for strerror - found
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for strtoq
-- Looking for strtoq - not found
-- Looking for _strtoi64
-- Looking for _strtoi64 - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long long
-- Check size of long long - done
-- Check size of unsigned long long
-- Check size of unsigned long long - done
-- ** MSVC and PCRE_STATIC_RUNTIME: modifying compiler flags to use static runtime library
-- CPM: zbslib: adding package pthreads-win32@0 (v0)
-- Building pthreads-win32 with C setjmp/longjmp (default/recommended exception scheme).
-- Library name of pthreads-win32: pthreads-win32.
-- CPM: adding package plugin_kin@0 (v0)
-- ----- Library plugin_kin-1.0 start -----
-- >>> Library configured options
--      BUILD_STATIC_LIBS:       ON
-- CPM: plugin_kin: adding package common@0 (v0)
-- ----- Library common-1.0 start -----
-- CPM: plugin_kin: adding package levmar@2.6.0 (C:/Users/justb/tmp/levmar/80e588f1a41525213cfa01a38e5f738b51f1bcba)
-- CPM: plugin_kin: adding package openssl-cmake@0 (C:/Users/justb/tmp/openssl-cmake/b00042477cdbbcd887e9aa71689f328cc34718ef)
-- OpenSSL version 1.1.1g
-- MSVC: using statically-linked runtime (/MT and /MTd).
-- Check size of long
-- Check size of long - done
-- Check size of long long
-- Check size of long long - done
-- Check size of int
-- Check size of int - done
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- CPM: plugin_kin: adding package curl@7.67.0 (C:/Users/justb/tmp/curl/dc5643b6537cf22e5b34400f19cea161a0629222)
CMake Warning at C:/Users/justb/tmp/curl/dc5643b6537cf22e5b34400f19cea161a0629222/CMakeLists.txt:50 (message):
  the curl cmake build system is poorly maintained.  Be aware


-- curl version=[7.67.0]
CMake Warning at C:/Users/justb/tmp/curl/dc5643b6537cf22e5b34400f19cea161a0629222/CMake/Macros.cmake:86 (message):
  Found no *nroff program
Call Stack (most recent call first):
  C:/Users/justb/tmp/curl/dc5643b6537cf22e5b34400f19cea161a0629222/CMakeLists.txt:202 (curl_nroff_check)


-- Found Perl: C:/Strawberry/perl/bin/perl.exe (found version "5.30.1") 
-- Looking for getch in ws2_32;
-- Looking for getch in ws2_32; - found
-- Looking for getch in winmm;ws2_32
-- Looking for getch in winmm;ws2_32 - found
-- Looking for cldap_open in wldap32;winmm;ws2_32;advapi32;crypt32
-- Looking for cldap_open in wldap32;winmm;ws2_32;advapi32;crypt32 - found
-- Looking for include file winldap.h
-- Looking for include file winldap.h - not found
-- Looking for include file winber.h
-- Looking for include file winber.h - not found
-- Looking for include file ldap_ssl.h
-- Looking for include file ldap_ssl.h - not found
-- Looking for include file ldapssl.h
-- Looking for include file ldapssl.h - not found
-- Looking for idn2_lookup_ul in idn2;wldap32;winmm;ws2_32;advapi32;crypt32
-- Looking for idn2_lookup_ul in idn2;wldap32;winmm;ws2_32;advapi32;crypt32 - not found
-- Performing Test USE_UNIX_SOCKETS
-- Performing Test USE_UNIX_SOCKETS - Failed
-- Looking for include files windows.h, winsock.h
-- Looking for include files windows.h, winsock.h - found
-- Looking for 3 include files windows.h, ..., ws2tcpip.h
-- Looking for 3 include files windows.h, ..., ws2tcpip.h - found
-- Looking for 4 include files windows.h, ..., winsock2.h
-- Looking for 4 include files windows.h, ..., winsock2.h - found
-- Looking for 5 include files windows.h, ..., stdio.h
-- Looking for 5 include files windows.h, ..., stdio.h - found
-- Looking for 6 include files windows.h, ..., sys/filio.h
-- Looking for 6 include files windows.h, ..., sys/filio.h - not found
-- Looking for 6 include files windows.h, ..., sys/ioctl.h
-- Looking for 6 include files windows.h, ..., sys/ioctl.h - not found
-- Looking for 6 include files windows.h, ..., sys/resource.h
-- Looking for 6 include files windows.h, ..., sys/resource.h - not found
-- Looking for 8 include files windows.h, ..., sys/uio.h
-- Looking for 8 include files windows.h, ..., sys/uio.h - not found
-- Looking for 8 include files windows.h, ..., sys/un.h
-- Looking for 8 include files windows.h, ..., sys/un.h - not found
-- Looking for 9 include files windows.h, ..., sys/xattr.h
-- Looking for 9 include files windows.h, ..., sys/xattr.h - not found
-- Looking for 9 include files windows.h, ..., arpa/tftp.h
-- Looking for 9 include files windows.h, ..., arpa/tftp.h - not found
-- Looking for 9 include files windows.h, ..., assert.h
-- Looking for 9 include files windows.h, ..., assert.h - found
-- Looking for 10 include files windows.h, ..., crypto.h
-- Looking for 10 include files windows.h, ..., crypto.h - not found
-- Looking for 10 include files windows.h, ..., des.h
-- Looking for 10 include files windows.h, ..., des.h - not found
-- Looking for 10 include files windows.h, ..., err.h
-- Looking for 10 include files windows.h, ..., err.h - not found
-- Looking for 10 include files windows.h, ..., errno.h
-- Looking for 10 include files windows.h, ..., errno.h - found
-- Looking for 12 include files windows.h, ..., idn2.h
-- Looking for 12 include files windows.h, ..., idn2.h - not found
-- Looking for 12 include files windows.h, ..., ifaddrs.h
-- Looking for 12 include files windows.h, ..., ifaddrs.h - not found
-- Looking for 13 include files windows.h, ..., krb.h
-- Looking for 13 include files windows.h, ..., krb.h - not found
-- Looking for 13 include files windows.h, ..., libgen.h
-- Looking for 13 include files windows.h, ..., libgen.h - not found
-- Looking for 13 include files windows.h, ..., locale.h
-- Looking for 13 include files windows.h, ..., locale.h - found
-- Looking for 14 include files windows.h, ..., netinet/tcp.h
-- Looking for 14 include files windows.h, ..., netinet/tcp.h - not found
-- Looking for 14 include files windows.h, ..., pem.h
-- Looking for 14 include files windows.h, ..., pem.h - not found
-- Looking for 14 include files windows.h, ..., poll.h
-- Looking for 14 include files windows.h, ..., poll.h - not found
-- Looking for 14 include files windows.h, ..., rsa.h
-- Looking for 14 include files windows.h, ..., rsa.h - not found
-- Looking for 16 include files windows.h, ..., ssl.h
-- Looking for 16 include files windows.h, ..., ssl.h - not found
-- Looking for 16 include files windows.h, ..., stdbool.h
-- Looking for 16 include files windows.h, ..., stdbool.h - found
-- Looking for 20 include files windows.h, ..., stropts.h
-- Looking for 20 include files windows.h, ..., stropts.h - not found
-- Looking for 25 include files windows.h, ..., sys/utsname.h
-- Looking for 25 include files windows.h, ..., sys/utsname.h - not found
-- Check size of size_t
-- Check size of size_t - done
-- Check size of ssize_t
-- Check size of ssize_t - failed
-- Check size of long long
-- Check size of long long - done
-- Check size of long
-- Check size of long - done
-- Check size of short
-- Check size of short - done
-- Check size of int
-- Check size of int - done
-- Check size of __int64
-- Check size of __int64 - done
-- Check size of time_t
-- Check size of time_t - done
-- Looking for basename
-- Looking for basename - not found
-- Looking for strncmpi
-- Looking for strncmpi - not found
-- Looking for alarm
-- Looking for alarm - not found
-- Looking for getpwuid_r
-- Looking for getpwuid_r - not found
-- Looking for usleep
-- Looking for usleep - not found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for strerror_r
-- Looking for strerror_r - not found
-- Looking for siginterrupt
-- Looking for siginterrupt - not found
-- Looking for fork
-- Looking for fork - not found
-- Looking for freeaddrinfo
-- Looking for freeaddrinfo - found
-- Looking for freeifaddrs
-- Looking for freeifaddrs - not found
-- Looking for pipe
-- Looking for pipe - not found
-- Looking for ftruncate
-- Looking for ftruncate - not found
-- Looking for getprotobyname
-- Looking for getprotobyname - found
-- Looking for getpeername
-- Looking for getpeername - found
-- Looking for getsockname
-- Looking for getsockname - found
-- Looking for if_nametoindex
-- Looking for if_nametoindex - not found
-- Looking for getrlimit
-- Looking for getrlimit - not found
-- Looking for setlocale
-- Looking for setlocale - found
-- Looking for setmode
-- Looking for setmode - found
-- Looking for setrlimit
-- Looking for setrlimit - not found
-- Looking for fcntl
-- Looking for fcntl - not found
-- Looking for ioctl
-- Looking for ioctl - not found
-- Looking for setsockopt
-- Looking for setsockopt - found
-- Looking for mach_absolute_time
-- Looking for mach_absolute_time - not found
-- Looking for inet_pton
-- Looking for inet_pton - found
-- Looking for fsetxattr
-- Looking for fsetxattr - not found
-- Performing Curl Test HAVE_FCNTL_O_NONBLOCK
-- Performing Curl Test HAVE_FCNTL_O_NONBLOCK - Failed
-- Performing Curl Test HAVE_IOCTLSOCKET
-- Performing Curl Test HAVE_IOCTLSOCKET - Success
-- Performing Curl Test HAVE_IOCTLSOCKET_CAMEL
-- Performing Curl Test HAVE_IOCTLSOCKET_CAMEL - Failed
-- Performing Curl Test HAVE_IOCTLSOCKET_CAMEL_FIONBIO
-- Performing Curl Test HAVE_IOCTLSOCKET_CAMEL_FIONBIO - Success
-- Performing Curl Test HAVE_IOCTLSOCKET_FIONBIO
-- Performing Curl Test HAVE_IOCTLSOCKET_FIONBIO - Success
-- Performing Curl Test HAVE_IOCTL_FIONBIO
-- Performing Curl Test HAVE_IOCTL_FIONBIO - Failed
-- Performing Curl Test HAVE_IOCTL_SIOCGIFADDR
-- Performing Curl Test HAVE_IOCTL_SIOCGIFADDR - Failed
-- Performing Curl Test HAVE_SETSOCKOPT_SO_NONBLOCK
-- Performing Curl Test HAVE_SETSOCKOPT_SO_NONBLOCK - Failed
-- Performing Curl Test HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
-- Performing Curl Test HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID - Failed
-- Performing Curl Test HAVE_BOOL_T
-- Performing Curl Test HAVE_BOOL_T - Success
-- Performing Curl Test HAVE_FILE_OFFSET_BITS
-- Performing Curl Test HAVE_FILE_OFFSET_BITS - Failed
-- Performing Curl Test HAVE_VARIADIC_MACROS_C99
-- Performing Curl Test HAVE_VARIADIC_MACROS_C99 - Success
-- Performing Curl Test HAVE_VARIADIC_MACROS_GCC
-- Performing Curl Test HAVE_VARIADIC_MACROS_GCC - Failed
-- Check size of off_t
-- Check size of off_t - done
-- Check size of curl_off_t
-- Check size of curl_off_t - done
-- Performing Curl Test HAVE_GLIBC_STRERROR_R
-- Performing Curl Test HAVE_GLIBC_STRERROR_R - Failed
-- Performing Curl Test HAVE_POSIX_STRERROR_R
-- Performing Curl Test HAVE_POSIX_STRERROR_R - Failed
-- Performing Curl Test HAVE_CLOCK_GETTIME_MONOTONIC
-- Performing Curl Test HAVE_CLOCK_GETTIME_MONOTONIC - Failed
-- Performing Curl Test HAVE_BUILTIN_AVAILABLE
-- Performing Curl Test HAVE_BUILTIN_AVAILABLE - Failed
-- Performing Test curl_cv_recv
-- Performing Test curl_cv_recv - Success
-- Performing Test curl_cv_func_recv_test
-- Performing Test curl_cv_func_recv_test - Success
-- Tested: int recv(SOCKET, char *, int, int)
-- Performing Test curl_cv_send
-- Performing Test curl_cv_send - Success
-- Performing Test curl_cv_func_send_test
-- Performing Test curl_cv_func_send_test - Success
-- Tested: int send(SOCKET, const char *, int, int)
-- Performing Test HAVE_MSG_NOSIGNAL
-- Performing Test HAVE_MSG_NOSIGNAL - Failed
-- Performing Test HAVE_STRUCT_TIMEVAL
-- Performing Test HAVE_STRUCT_TIMEVAL - Success
-- Check size of sig_atomic_t
-- Check size of sig_atomic_t - done
-- Performing Test HAVE_SIG_ATOMIC_T_NOT_VOLATILE
-- Performing Test HAVE_SIG_ATOMIC_T_NOT_VOLATILE - Success
-- Check size of struct sockaddr_storage
-- Check size of struct sockaddr_storage - done
-- Performing Test HAVE_POLL_FINE
-- Performing Test HAVE_POLL_FINE - Failed
-- Enabled features: SSL IPv6 AsynchDNS SSPI SPNEGO Kerberos NTLM
-- Enabled protocols: DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP POP3 POP3S RTSP SMTP SMTPS TELNET TFTP
-- Enabled SSL backends: WinSSL
CMake Error at bin/CMakeLists.txt:10 (include):
  include could not find load file:

    ECMAddAppIcon.cmake


-- ---------------------------Configure done----------------------
-- Project source dir: C:/Users/justb/Repos/kintek-explorer
-- Project binary dir: C:/Users/justb/Repos/kintek-explorer/cmake-build-debug
-- Project build type: Release
-- CMAKE_C_FLAGS: /DWIN32 /D_WINDOWS /W2
-- CMAKE_CXX_FLAGS: /DWIN32 /D_WINDOWS /W2 /GR /EHsc
-- Configuring incomplete, errors occurred!
See also "C:/Users/justb/Repos/kintek-explorer/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "C:/Users/justb/Repos/kintek-explorer/cmake-build-debug/CMakeFiles/CMakeError.log".

[
@TheLartians
Copy link
Member

Hm I don't think it's possible for CMake to "cache" a subdirectory, as it needs to run all dependency's CMakeLists to ensure that all contained targets and functions etc are defined and in the correct order.
One thing you could do is to pre-build and install the dependency "normally" and then use CPMFindPackage instead of CPMAddPackage too add it. That way CPM should pick up the installed version and will use the pre-built libraries and headers (assuming the CMake Module path is set up correctly).
Another way to speed up configure time is setting a generator such as ninja, which is noticeably faster than make in configuration and build times.

@bolu-atx
Copy link
Author

Thanks, good suggestion, I'll try precompiling and use CPMFindPackage. I thought you added an option for CPMAddPackage to prefer to find_package first, is this correct?

@TheLartians
Copy link
Member

TheLartians commented May 19, 2020

Yeah, you could also get this behaviour globally for CPMAddPackage by defining CPM_USE_LOCAL_PACKAGES=1 as a CMake option or environmental variable.

@TheLartians
Copy link
Member

Closing as there is nothing that CPM can really do against slow dependency configure times.
Did installing and CPMFindPackage work for you?

@TheLartians
Copy link
Member

TheLartians commented Jan 20, 2021

As it turns out the largest bottleneck for us was CMake's FetchContent doing essentially nothing. Therefore the most recent release bypasses FetchContent for previously cached dependencies. For us this reduced configuration time from minutes to seconds. @bolu-atx perhaps you could try updating CPM.cmake to at least 0.28.0 and see if it reduces configuration time for your projects as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants