I know that static is bad, but in order to be consistent with an upper-level project I must TRY_COMPILE a static executable. This means I must somehow pass CMAKE_EXE_LINKER_FLAGS to it which holds -static. Does anybody know a way? Denis