IntelliJ Idea, run code regardless of errors in unrelated project files
Modify your configuration to use Make, no error check option instead of Make. For more information see this answer Note that this may not be enough in your use case. Last resort is to use the solution provided by Vics answer.