I quoted passages from Matthew and Luke. But Luke 21:32 says this generation shall not pass away until all these things have happened. So as all of those things have not happened (e.g. Jesus' return in verse 27), the only logical conclusion I can draw is that the passage is referring to (at least) two separate events - the fall of Jerusalem (which that generation did not pass away before those things happened) and the future return of the Messiah (which hasn't occurred yet).
Matthew 24
15 When ye therefore shall see the abomination of desolation, spoken of by Daniel the prophet, stand in the holy place, (whoso readeth, let him understand
16 Then let them which be in Judaea flee into the mountains:
17 Let him which is on the housetop not come down to take any thing out of his house:
18 Neither let him which is in the field return back to take his clothes.
19 And woe unto them that are with child, and to them that give suck in those days!
20 But pray ye that your flight be not in the winter, neither on the sabbath day:
21 For then shall be great tribulation, such as was not since the beginning of the world to this time, no, nor ever shall be.
29 Immediately after the tribulation of those days shall the sun be darkened, and the moon shall not give her light, and the stars shall fall from heaven, and the powers of the heavens shall be shaken:
30 And then shall appear the sign of the Son of man in heaven: and then shall all the tribes of the earth mourn, and they shall see the Son of man coming in the clouds of heaven with power and great glory.
31 And he shall send his angels with a great sound of a trumpet, and they shall gather together his elect from the four winds, from one end of heaven to the other.
Luke 21
20 And when ye shall see Jerusalem compassed with armies, then know that the desolation thereof is nigh.
21 Then let them which are in Judaea flee to the mountains; and let them which are in the midst of it depart out; and let not them that are in the countries enter thereinto.
22 For these be the days of vengeance, that all things which are written may be fulfilled.
23 But woe unto them that are with child, and to them that give suck, in those days! for there shall be great distress in the land, and wrath upon this people.
24 And they shall fall by the edge of the sword, and shall be led away captive into all nations: and Jerusalem shall be trodden down of the Gentiles, until the times of the Gentiles be fulfilled.
25 And there shall be signs in the sun, and in the moon, and in the stars; and upon the earth distress of nations, with perplexity; the sea and the waves roaring;
26 Men's hearts failing them for fear, and for looking after those things which are coming on the earth: for the powers of heaven shall be shaken.
27 And then shall they see the Son of man coming in a cloud with power and great glory.
28 And when these things begin to come to pass, then look up, and lift up your heads; for your redemption draweth nigh.
29 And he spake to them a parable; Behold the fig tree, and all the trees;
30 When they now shoot forth, ye see and know of your own selves that summer is now nigh at hand.
31 So likewise ye, when ye see these things come to pass, know ye that the kingdom of God is nigh at hand.
32 Verily I say unto you, This generation shall not pass away, till all be fulfilled.
33 Heaven and earth shall pass away: but my words shall not pass away.
34 And take heed to yourselves, lest at any time your hearts be overcharged with surfeiting, and drunkenness, and cares of this life, and so that day come upon you unawares.
35 For as a snare shall it come on all them that dwell on the face of the whole earth.
36 Watch ye therefore, and pray always, that ye may be accounted worthy to escape all these things that shall come to pass, and to stand before the Son of man.
37 And in the day time he was teaching in the temple; and at night he went out, and abode in the mount that is called the mount of Olives.
38 And all the people came early in the morning to him in the temple, for to hear him.