* compiler: Fix crash when building single file and the compiler for the selected target is invalid

git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@9576 2a5c6006-c6dd-42ca-98ab-0921f2732cef
* compiler: Select the active target using the proper array

The old code uses the list of targets for the file only. This has several
problems:
1. the wrong target would be selected if the file is not added to all
   targets
2. the wrong target would be selected if some of the targets is not valid
   for the current platform

git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@9577 2a5c6006-c6dd-42ca-98ab-0921f2732cef
* compiler: Rework CompilerGCC::GetBuildTargetForFile

> Replaced 0 with nullptrs.
> Removed the check for single target. This case could be used to build the
  file for the wrong target if there are more targets in the project and
  the current file belongs to only one target that is not active at the
  moment.

git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@9578 2a5c6006-c6dd-42ca-98ab-0921f2732cef
- compiler: Remove unused method GetBuildTargetForFile

git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@9579 2a5c6006-c6dd-42ca-98ab-0921f2732cef
* compiler: Reorder the checks a bit. Call CompilerValid for the proper target

git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@9580 2a5c6006-c6dd-42ca-98ab-0921f2732cef
* compiler: Better logging for the CompileFile method

git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@9581 2a5c6006-c6dd-42ca-98ab-0921f2732cef