feat(deps): add FindBoost module with components
Fetch the Boost CMake release archive (default 1.92.0) and build only the libraries requested via find_package(Boost COMPONENTS ...), plus their dependencies. Each component is exposed as Boost::<name>, e.g. Boost::serialization. cmat now uses this module instead of a system Boost install, so the Boost exercises are always available. Also fix SolutionEx62Bonus: Employee.h used base_object without including <boost/serialization/base_object.hpp>. This was not an intentional exercise bug; it likely relied on a transitive include in older Boost versions. Co-authored-by: Claude Opus 5.5 <claude.opus5.5@anthropic.com>
This commit is contained in:
+2
-4
@@ -56,10 +56,8 @@ else()
|
||||
# Windows-specific; there is nothing portable to build with.
|
||||
endif()
|
||||
|
||||
# Exercises using Boost.Serialization (system install; not fetched). CONFIG
|
||||
# mode uses Boost's own CMake package, since the FindBoost module was removed
|
||||
# in CMake 4.
|
||||
find_package(Boost CONFIG QUIET COMPONENTS serialization)
|
||||
# Exercises using Boost.Serialization (fetched via deps/FindBoost.cmake).
|
||||
find_package(Boost QUIET COMPONENTS serialization)
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Target helpers
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#define EMPLYOEE_H
|
||||
#include "Person.h"
|
||||
|
||||
#include <boost/serialization/base_object.hpp>
|
||||
|
||||
class Employee : public Person {
|
||||
public:
|
||||
void askForInfo();
|
||||
|
||||
Reference in New Issue
Block a user