Skip to content

Commit

Permalink
Fixed #66
Browse files Browse the repository at this point in the history
  • Loading branch information
milasudril committed Jan 1, 2018
1 parent c3cd1c3 commit 65335ee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
11 changes: 7 additions & 4 deletions targetcxx/targetcxx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,15 @@ TargetCxx::TargetCxx(const ResourceObject& obj,const TargetCxxCompiler& compiler
// or the assembler.
case Type::OBJECT:
dependencyAdd(Dependency(cxxoptions.objcompileGet().nameGet(),root,Dependency::Relation::TOOL));
m_options_extra_local.modeSet(cxxoptions.modeGet());
break;
case Type::APPLICATION:
dependencyAdd(Dependency(cxxoptions.appcompileGet().nameGet(),root,Dependency::Relation::TOOL));
m_options_extra_local.modeSet(cxxoptions.modeGet());
break;
case Type::LIB_DYNAMIC:
dependencyAdd(Dependency(cxxoptions.dllcompileGet().nameGet(),root,Dependency::Relation::TOOL));
m_options_extra_local.modeSet(cxxoptions.modeGet());
break;
case Type::LIB_STATIC:
dependencyAdd(Dependency(cxxoptions.libcompileGet().nameGet(),root,Dependency::Relation::TOOL));
Expand Down Expand Up @@ -142,19 +145,19 @@ bool TargetCxx::generated() const noexcept
void TargetCxx::dumpDetails(ResourceObject& target) const
{
target.objectSet("type",target.create(type(typeGet())));

{
auto cxxoptions=target.createObject();
m_options_extra.configDump(cxxoptions);
target.objectSet("cxxoptions",std::move(cxxoptions));
}

{
auto cxxoptions=target.createObject();
m_options_extra_local.configDump(cxxoptions);
target.objectSet("cxxoptions_local",std::move(cxxoptions));
}

}

static void optionsCollect(Twins<const Dependency*> deps
Expand Down Expand Up @@ -337,7 +340,7 @@ bool TargetCxx::upToDate(Twins<const Dependency*> dependency_list

auto up_to_date=[&name_full](const char* name,Dependency::Relation)
{return !FileUtils::newer(name,name_full.c_str());};

switch(m_type)
{
case Type::OBJECT:
Expand Down
8 changes: 7 additions & 1 deletion targetcxx/targetcxxoptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,16 @@ namespace Maike

const char* includeFormatGet() const noexcept
{return m_include_format.c_str();}

const char* modeGet() const noexcept
{return m_mode.c_str();}

TargetCxxOptions& modeSet(const char* mode)
{
m_mode=mode;
return *this;
}

private:
std::vector< std::string > m_includedir;
std::set<Stringkey> m_includedir_dup;
Expand Down

0 comments on commit 65335ee

Please sign in to comment.