As a kind of back-to-school gift to students, professors at three of the nation’s prestige schools offered them a piece of good advice: “Think for yourself.”

“The danger any student — or faculty member — faces today is falling into the vice of conformism, yielding to groupthink,” warned these 26 scholars at Princeton, Harvard and Yale. Among the document’s signers were prominent Catholics Robert P. George of Princeton and Mary Ann Glendon of Harvard.

The professor’s statement came at the same time as — and could be read as a complement to — a statement by 180 evangelical leaders, including heads of seminaries, theologians, pastors and journalists.

The Nashville Statement, so named for the city in which it was issued, is a forthright and fundamentally pastoral reiteration of traditional Christian teaching on sex in the context of our increasingly “post-Christian” culture. Among other things, it rejects same-sex marriage and insists it is “sinful to approve of homosexual immorality or transgenderism.”

Predictably, these views and those who hold them have been pilloried by progressive critics.

A writer in The New York Times, identified as founder of a group called Faithfully LGBT, no doubt spoke for many others in decrying the statement as supposedly representing “a renewed commitment to open bigotry.”

The mayor of Nashville, who one suspects may perhaps not have read the professors’ warning against groupthink, hastened to tell the world that, despite the Nashville Statement’s name, it didn’t represent her city’s right-thinking views on the subject of sex.

This uproar is disturbingly typical of what’s likely to happen these days whenever serious Christians speak up on behalf of Christian ideas about sexual morality in the face of contemporary groupthink. Now, it seems, the Supreme Court itself will be weighing these issues during its new term that begins Oct. 2.

The case — Masterpiece Cakeshop v. Colorado Civil Rights Commissioninvolves a Lakewood, Colorado, baker named Jack Phillips whose religious beliefs moved him to refuse to bake a cake celebrating the marriage of two men. Phillips was hauled before the state civil rights commission, which found him guilty of sexual orientation discrimination. State courts ruled against him, and now he has taken his case to the Supreme Court (where it may be joined by another, similar case involving a florist in Washington state).

The baker’s lawyers make a novel argument. Phillips, they say, is a “cake artist” for whom baking cakes is a form of expression. Compelling him to create a cake for a gay marriage would mean in effect forcing him to say something he doesn’t believe — a form of “compulsion of speech” ruled out by other Supreme Court rulings.

Phillips’ argument may be novel, but his situation isn’t. Since the Supreme Court in a 5-4 ruling discovered a constitutional right to same-sex marriage two years ago, others have been forced to lend their support over their conscientious objections. It will be a surprise if the Supreme Court doesn’t join the lower courts in pummeling the baker for resisting this imposition of groupthink.

Things like this don’t happen by accident. They reflect careful planning and generous funding by people pushing a new morality and the groupthink to go with it.

In their statement urging students to think for themselves, the 26 professors warn of a “tyranny of public opinion” which seeks to create the impression that the views currently “dominant” on many campuses are “so obviously correct that only a bigot or a crank could question them.”

To which I would only add: not just students, and not just on campuses.