@brad.king Ah. I didn’t know about CheckSourceRuns
! I will stare at it and try it out. (Warning: I might be back here to ask “what did I break now?” )
Unfortunately, it might be a bit before I can require CMake 3.19 (supercomputing cluster modules move slowly!), but I suppose I can use the try_run
hack on older CMake’s. Time to make a macro()
.
(That is, unless there is a CMake way to figure out if I’m on AMD Rome instead of, say, an Intel Cascade Lake? I’m pretty sure there isn’t a simple built-in way to check “CMAKE_CPU_TYPE” or the like.)