Skip to main content

Posts

Showing posts from May, 2019

Bootstrapping a cmake project based on Hunter in Linux and Windows

This is the third post in my exploration of the package managers for C++ in Linux and Windows environments. This time I tested out the Hunter package manager with the same toy C++ program with header-only boost-core and boost-optional and boost-filesystem (linking necessary) dependencies. The previous blog posts in this series were about 1) a simplistic use of vcpkg from cmake and 2) a little more sophisticated use of vcpkg with cmake . The examples work for both Linux and Windows environments. Recap The following is a barebones C++ cmake project hunter_test hunter_test ├── CMakeLists.txt ├── include │   └── driver.h ├── src │   └── driver.cpp └── test └── driver_test.cpp 3 directories, 4 files The driver.cpp and driver_test.cpp files have just a main function that does nothing. driver.h is empty. The CMakeLists.txt looks as follows. cmake_minimum_required (VERSION 3.12) project (vcpkg_test CXX) set(CMAKE_CXX_STANDARD 17) add_executable(driver src/driver.cpp) target_i