1 Kings 8:18

And the LORD said unto David my father, Whereas it was in thine heart to build an house unto my name, thou didst well that it was in thine heart.

It was good that David carried in his heart the purpose to build a house for God's name, even though it was Solomon who actually erected the temple. That house was raised to honor the name of the Lord God of Israel. Through Solomon's apostasy the building came to be called Solomon's temple. That name turned the honor toward its human builder rather than toward God.