For Olivia Wilde, the challenge of combining high-school hijinks with a serious statement on “the war on women” was too good to resist.

Wilde is a great film beauty, but was never just another pretty face. As an activist for social justice, she jumped at the chance to combine the teen comedies she loved growing up with the message she espouses with her directorial debut “Booksmart,” opening Friday.

“I fell in love with movies because of the high school canon ... all those incredible generational anthems,” said Wilde, 35, citing Amy Heckerling’s “Fast Times at Ridgemont High” and “Clueless,” and John Hughes’ “Ferris Bueller’s Day Off” as favorites.

“That’s how I fell in love with filmmaking, and I just wanted to make my first film an homage to the films that brought me into this business and made me want to be a storyteller.”

But it couldn’t just be funny. For Wilde, it had to speak to today’s issues that face women, such as the wave of restrictive abortion laws being passed in various states.

“This movie is a reflection of the times we’re in, of course,” the “Cowboys & Aliens” star said. “Being a young woman in 2019, it is unavoidable to incorporate the political situation into your daily lives. We are living it. We are expressions of it. We are daily having to fight against this war on women. … There is an exciting upheaval and revolution happening within the culture, in terms of women.”

The film, which premiered to rave reviews at the South by Southwest festival in Texas in March, follows high-achieving, socially conscious best friends Amy (Kaitlyn Dever) and Molly (Beanie Feldstein) through their last day of high school. Type-A Molly has a crisis of faith when she learns that their peers, who she was certain were academic slackers, got into the same high-ranking colleges she and Amy did, despite partying.

That’s because Gen Z icons like Parkland survivor Emma González, who have been “so outspoken and articulate and brave and courageous in what they were putting on the line,” helped inspire the film, said screenwriter Katie Silberman, who also co-produced.

“They’re standing up for things and they’re activists in ways that I don’t feel like I was doing that at their age. I think that’s something I’ve come into later in life and I think, unfortunately, part of it is the world that we’ve left for them."

From Amy’s walls replete with pro-choice and Time’s Up posters, to the real-life voices that influenced “Booksmart,” the film is a joyous celebration of young, brilliant, sexual, multi-dimensional, learning and learned women who are “going out into the world with that kind of moxie and fire lit under [them],” as Silberman put it.

Politicization aside, “Booksmart” has drawn comparisons to high school favorite, “Superbad,” not the least because Feldstein is Jonah Hill’s younger sister. The “Booksmart” ladies love their predecessor, with Silberman agreeing it’s “a wonderful bar to set,” and they do appreciate the parallel.

But their film, they were very clear, is not “the female version of anything,” Wilde explained. “I think ‘Booksmart’ stands on its own, and I think we kind of have to get out of that habit of assigning ‘female’ films as the female versions of a male film.”