Teuchos: Some CMake checks happen at run time unconditionally; this hinders cross compilation
Created by: mhoemmen
@trilinos/teuchos @trilinos/framework @theguruat12 @vbrunini @rrdrake
@theguruat12 and I found that teuchos/CMakeLists.txt
does some checks that involve running code. That's normally OK, except that it's not OK for cross compilation. For example, when building KNL-specific binaries on a login node that's not KNL, a lot of tests (like HAVE_TEUCHOS_BLASFLOAT
) will incorrectly report back false. This will break the build if Scalar=float
is enabled, which @vbrunini needs.
@theguruat12 and I have prototyped a fix that seems to work. It follows the preexisting Trilinos idiom of letting users set CMake options in advance, if they want to avoid CMake tests that run code. I will submit a PR soon that implements this fix.