Assume that volume scales linearly with height (i.e. we'll roughly approximate the building shape as a cube).
The mass/weight of your constructions will scale roughly as the cube of height (we'll assume the volume of the building scales linearly with height - meaning the x-y footprint goes up as the height does). However the structural strength only scales as the square of volume. So no matter how strong our materials, we eventually get too big to support a bigger building.
Increased materials strength can improve your results but it can't change the shape of the curve - no matter how strong the material. If the building exceeds the size above, it will always collapse under its own weight.
Materials
To look at this from a materials perspective it helps to have an idea of the pertinent equations.
The force on the building is the weight (mass * acceleration) of the portions of the building above the current floor.
$$ W = a_{gravity} \cdot m = a_{gravity} \cdot \rho \cdot V = a_{gravity} \cdot \rho \cdot l^3 $$
$$ F_{compression} = A \cdot \sigma_{compression} = l^2 \cdot \sigma_{compression} $$
At max load, the maximum compressive force your structure can support is equal to its weight, so you get this:
$$ a_{gravity} \cdot \rho \cdot l^3 = l^2 \cdot \sigma_{compression} \rightarrow l_{max} = \frac{\sigma_{compression}}{a_{gravity} \cdot \rho} $$
V = volume ($m^3$)
A = Area ($m^2$)
l = distance ($m$)
$\sigma$ = material strength (Pascals - $Pa$)
g = acceleration due to gravity ($\frac{m}{s^2}$)
$\rho$ = density ($\frac{kg}{m^3}$)
Maximum measured compressive strength of any material (diamond) comes in at something between 100 & 300 GPa. So make the following assumptions
$g = 9.8 \frac{m}{s^2}$
$\sigma = 300 GPa$
$\rho = 2,500 \frac{kg}{m^3}$
Solve for $l$:
$$ l_{max} = \frac{300,000,000,000 \frac{kg}{m \cdot s}}{9.8 \frac{m}{s^2} \cdot 2,500 \frac{kg}{m^3}} = 12,244,898 m$$
12 million meters (12,000 km) is a pretty tall building. Your limitation on height would not be due to materials constraints (if you use the right materials).
Bear in mind that this structure would be solid at the base with no room for anything other than structure, the material would have to be diamond, and the crust of the planet it was on would sag so the actual height would be substantially smaller. In fact the shear amount of materials involved would probably be the equivalent of a planetoid (that's not a moon!).
Foundation
But what sort of foundation can hold up that kind of mass. Although the Earth's crust seems rigid, the reality is it floats on top of the Earth's mantle and is not rigid enough to support even its own mass - it has to float on the Earth's mantle.
The highest points on Earth all exist in the Himalayan Mountain range. In that range, one continental crust is subducting under another. It has pushed the top plate over 5 miles high but this lofty altitude can only be supported by the crust sagging 60 miles or more deep beneath it.
What this means for your building project is that even a sufficiently advanced society are likely to be unable to create large structures of more than 5 miles or before the crust starts sagging beneath the weight of the structure.
Otherstuff
Typical engineering for ground structures (like buildings) uses a factor of safety of 10x. Meaning you design the building for 10x the load its supposed to support.
This ignores any other forces such as wind, dynamic stresses, buckling, earthquakes, etc.