From 55569b39422c980d051e1da9b476a249ec2b64af Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 3 Jan 2023 19:09:48 +0200 Subject: [PATCH] Move FileTarget's constructors to the .cpp file This avoids an undefined reference error on MSVC. --- source/lib/filetarget.cpp | 8 ++++++++ source/lib/filetarget.h | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/source/lib/filetarget.cpp b/source/lib/filetarget.cpp index a2d4ea4..f799f49 100644 --- a/source/lib/filetarget.cpp +++ b/source/lib/filetarget.cpp @@ -13,6 +13,14 @@ using namespace std; using namespace Msp; +FileTarget::FileTarget(Builder &b, const FS::Path &a): + FileTarget(b, 0, a) +{ } + +FileTarget::FileTarget(Builder &b, const SourcePackage &p, const FS::Path &a): + FileTarget(b, &p, a) +{ } + FileTarget::FileTarget(Builder &b, const SourcePackage *p, const FS::Path &a): Target(b, generate_name(b, p, a)), path(a) diff --git a/source/lib/filetarget.h b/source/lib/filetarget.h index 124b3c5..64128d6 100644 --- a/source/lib/filetarget.h +++ b/source/lib/filetarget.h @@ -19,8 +19,8 @@ protected: bool nested_build_sig = false; bool arch_in_build_sig = false; - FileTarget(Builder &b, const Msp::FS::Path &a): FileTarget(b, 0, a) { } - FileTarget(Builder &b, const SourcePackage &p, const Msp::FS::Path &a): FileTarget(b, &p, a) { } + FileTarget(Builder &b, const Msp::FS::Path &a); + FileTarget(Builder &b, const SourcePackage &p, const Msp::FS::Path &a); private: FileTarget(Builder &, const SourcePackage *, const Msp::FS::Path &); void stat(); -- 2.45.2