Menu

#796 Display error message if wrong target with --target command is selected

Undefined
open
nobody
None
Feature_Request
2022-01-17
2019-02-06
bluehazzard
No

As reported here:
forum entry

If you're open to process improvements, perhaps an error could be added to Code::Blocks if the command line --target doesn't match any of the build target names in the project. Currently it displays "Nothing to be done (all items are up-to-date)." which is not the most helpful thing when trying to debug human errors.

Discussion

  • Miguel Gimenez

    Miguel Gimenez - 2019-02-21

    The code is there (compilergcc.cpp:2659)

            ExpandTargets(prj, targetName, tlist);
    
            if (tlist.GetCount() == 0)
                Manager::Get()->GetLogManager()->LogWarning(F(_T("Warning: No target named '%s' in project '%s'. Project will not be built..."), targetName.wx_str(), prj->GetTitle().wx_str()));
    

    Probably the dependencies list (deps) is empty and the loop with the previous code is not executed, I have no time to check this now.

     

    Last edit: Miguel Gimenez 2021-12-19
  • Miguel Gimenez

    Miguel Gimenez - 2022-01-17

    He is probably doing batch building, in that case the message is generated but goes nowhere.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.