different include file for different test

I have found the solution.

instead of trying to get the CMAKE_CXX_FLAGS I set some additional COMPILE_AND_LINK_FLAGS, like this:

if (test-item STREQUAL "ftl_pagesize_4kb")
set(COMPILE_AND_LINK_FLAGS "${COMPILE_AND_LINK_FLAGS} -include ${CMAKE_CURRENT_SOURCE_DIR}/../../app/src/storage/test/flash_nand_4kpage_only.hpp")
else()
set(COMPILE_AND_LINK_FLAGS "${COMPILE_AND_LINK_FLAGS} -include ${CMAKE_CURRENT_SOURCE_DIR}/../../app/src/storage/test/flash_nand_2kpage_only.hpp")
endif()

Note that the content of the added hpp files ONLY contain the additional #define, and do NOT have added: #include “…/…/…/…/tests/unit/autoconf.h”