The Red Tails actor will play a man who is "obsessively in love" with an old Army friend in the film, reported Deadline.
Things are turned upside down for his character, Peter Snowden, as the couple's reunion approaches and his life starts to spiral out of control.
Elliott Lester will direct the film, which is due to start shooting in Los Angeles. So far no other casting details have been announced.
British star David, 37, can next be seen in Lee Daniels' historical drama The Butler.
COMMENT RULES: Comments that are judged to be defamatory, abusive or in bad taste are not acceptable and contributors who consistently fall below certain criteria will be permanently blacklisted. The moderator will not enter into debate with individual contributors and the moderator’s decision is final. It is Belfast Telegraph policy to close comments on court cases, tribunals and active legal investigations. We may also close comments on articles which are being targeted for abuse. Problems with commenting? email@example.com
You are being overly critical of your best friend or romantic partner. Even if you think their plans are ill founded, you should keep such thoughts to yourself. Undermining a person's enthusiasm will only create resentment. If you're tired of being implicated in your loved one's harebrained schemes, have a heart to heart discussion. A temporary separation can help each of you figure out what you want from your relationship. It may be time for you to seek a more practical companion.More