GoogleTest Improvement
In https://cliutils.gitlab.io/modern-cmake/chapters/testing/googletest.html you are using:
add_test(${TESTNAME} ${TESTNAME})
But according to the doc:
Unlike the above NAME signature no transformation is performed on the command-line to support target names or generator expressions.
src: https://cmake.org/cmake/help/v3.0/command/add_test.html
So, instead, you should definitively use:
add_test(NAME ${TESTNAME} COMMAND ${TESTNAME})