Commit Graph
3 Commits
Author SHA1 Message Date
Eirik Marthinsen 316cb222d9 CMake: Add fast_float to list of submodules to init
CMake is set to import submodules by default but fast_float was missing
from the list.
2022-02-07 13:10:13 +01:00
Eirik Marthinsen 200d5c65a3 AutoVcpkg: Include Vcpkg toolchain
Include the Vcpkg toolchain file after the installation of the first
package.

When building for the first time from a clean source tree, the Vcpkg
toolchain file does not exist. At the same time CMake is only reading
the toolchain file the very first time it is configuring, but since the
toolchain file is only created when vcpkg is configured on the first
call to vcpkg_install it will never read it. So it is not enough to just
reconfigure.

Note: It is not ideal to include it here since one might at some point
install and search for a package at an erlier point in the script and
fail to find it.

Alternative approaces that I considered:
- Include this file right after including AutoVcpkg. This would require
  1 recompilation for the file to be found and read which is
  unfortunate.
- Include this file in the config function in AutoVcpkg. This seemed
  difficult without including the file for every call to vcpkg_install,
  which seems unecessary.
2021-08-30 19:40:35 +02:00
Eirik Marthinsen 697da887c4 AutoVcpkg: Copy bootstrap file from cmake folder
AutoVcpkg assumed that the bootstrap file was in the root project
folder, and not in a cmake subfolder.

Note: It is not correct to use ${CMAKE_CURRENT_LIST_DIR} since this is
inside a function and whould still refer to the folder of the calling
file. The more elegant solution would be to use
${CMAKE_CURRENT_FUNCTION_LIST_DIR}, but that is not available until
CMake 3.17.
2021-08-30 19:40:35 +02:00