One day in 1978, Intel CEO and co-founder Andy Grove took a call from an executive at Silicon Valley pioneer Varian Associates. Ram Charan, the veteran CEO adviser, was sitting in Grove's office, and Grove let him listen in. "The guy said, 'Andy. You are aggressive. You are bright. You have new ideas,'" Charan recalls. "'I will take a pay cut to come work for you.'"

It's the dream of all CEOs. Top talent comes banging on your door, wanting in. Maybe they salivate over your crazy perks or your cutting-edge tech; maybe they just want your company's blue-chip name on their resumes. Or, if you are a particularly compelling leader, maybe they want to work for you.

CEOs know how to get and keep talent. The good ones offer competitive salaries and benefits, a clear career path, development and training, feedback, appreciation, challenging work, and a collegial environment. But there also are leaders whose personal qualities--courage, commitment, brilliance, integrity--make them beacons for talent in their own rights. These individuals embody a promise to recruits. The companies they shape fulfill that promise, keeping great people onboard.

Leaders must be able to do one of two things: excite people or develop people, says Rob Goffee, emeritus professor of organizational behavior at London Business School. "The superstars do both."

Of course no leader succeeds without a stellar team. Virgin is more than Richard Branson, SpaceX more than Elon Musk. And individuals matter less the larger organizations grow, Goffee points out. In Silicon Valley, Gen-Y and Gen-Z employees increasingly base their decisions about where to work on CTOs rather than CEOs. They follow the lower-level executives they admire out the door.

Still, in the evolution of great businesses, the top leader typically comes first. Entrepreneurs developing their own leadership approaches with hiring and retention in mind can take inspiration from these three talent magnets.

1. The mission obsessive.

When Ken Frazier assumed the CEO role at Merck in 2011, he wasn't the obvious guy to make researchers' hearts go pitter-pat. For one thing, he was a lawyer leading scientists. But Frazier "talks all the time about Merck's science and its role saving people's lives," says Bill George, former CEO of Medtronic and a professor at Harvard Business School. At his first analysts' meeting, Frazier gave employees hope and Wall Street conniptions when he refused to slash R&D to meet projections--the opposite tack from Pfizer. He once said in an interview that he spends lots of time in the lab and takes big risks, such as charging ahead on treatments for Alzheimer's, because "Isn't that exactly what the world wants a company like Merck to do?"

2. The relatable champion.

Like Frazier--the first CEO to quit President Trump's business advisory panel post-Charlottesville--PepsiCo CEO Indra Nooyi has gone out on a limb for what she believes in. Nooyi stayed true to her "Profits with Purpose" initiative to make healthier products, even as analysts fumed at flagging stock prices. Her strategy has since proved successful; PepsiCo has been beating expectations for two years.

While championing PepsiCo's new health-and-sustainability mission, George says, she's had to motivate employees both in the new and existing businesses who were struggling with dramatic change. Nooyi has also humanized herself to employees and applicants alike with accomplished storytelling. Part of her repertoire is a childhood tale about local manufacturers in India depriving her village of water, which she relates to explain the origins of her social consciousness, says Rita Gunther McGrath, a professor at Columbia Business School. Nooyi also waxes self-deprecatingly about her trials as a working mother. "People see her as living the vision, while being funny and relatable," McGrath says.

3. The empathetic motivator.

Most people who know SAS Institute is a constant on "best places to work" lists also know the reason: James Goodnight wants it that way. Goodnight remains majority owner of the data-analytics company 42 years after co-founding it. Staying private makes it easier to offer myriad life-improving perks, such as on-site health care and day care, established by Goodnight in the company's early days. Serious software engineers admire Goodnight's exacting standards; he also inspires people with his pursuit of innovation, listening for hours each week as employees from all over the company offer their best ideas.

The substantial time Goodnight invests thinking about his workforce is evident in his recent quest to reduce, for health reasons, their consumption of the ubiquitous free M&Ms that are an SAS trademark. Concerned that eliminating the candy might seem harsh or unnerve employees, he decided instead to move them from glass to ceramic bowls where they are less conspicuous. "He thought about how the ordinary person would respond to this," McGrath says. "For a CEO to be that tuned into the symbolic is unusual."