ENH: avoid the use of GET_TARGET_PROPERTY by testing the CMake executable instead of the test executable