Build: Fix build if FORWARD_PROT_MSG is set

qcbor and t_cose libraries are required and NV counters cannot be
tested in that configuration.

Signed-off-by: Mark Horvath <mark.horvath@arm.com>
Change-Id: I1e657a32f42500409c62d95451d34a7a945bedb3
diff --git a/test/suites/ps/CMakeLists.txt b/test/suites/ps/CMakeLists.txt
index 20bfb49..3546553 100644
--- a/test/suites/ps/CMakeLists.txt
+++ b/test/suites/ps/CMakeLists.txt
@@ -55,10 +55,12 @@
             $<$<BOOL:${PS_TEST_NV_COUNTERS}>:${CMAKE_CURRENT_SOURCE_DIR}/secure/ps_rollback_protection_testsuite.c>
     )
 
+if (NOT FORWARD_PROT_MSG)
     target_sources(tfm_app_rot_partition_ps
         PRIVATE
             $<$<BOOL:${PS_TEST_NV_COUNTERS}>:${CMAKE_CURRENT_SOURCE_DIR}/secure/nv_counters/test_ps_nv_counters.c>
     )
+endif()
 
     target_include_directories(tfm_test_suite_ps_s
         PUBLIC
diff --git a/test/suites/qcbor/CMakeLists.txt b/test/suites/qcbor/CMakeLists.txt
index ab20dad..59f7b8d 100644
--- a/test/suites/qcbor/CMakeLists.txt
+++ b/test/suites/qcbor/CMakeLists.txt
@@ -5,7 +5,7 @@
 #
 #-------------------------------------------------------------------------------
 
-if(NOT TFM_PARTITION_INITIAL_ATTESTATION)
+if(NOT TFM_PARTITION_INITIAL_ATTESTATION AND NOT FORWARD_PROT_MSG)
     return()
 endif()
 
diff --git a/test/suites/t_cose/CMakeLists.txt b/test/suites/t_cose/CMakeLists.txt
index 48b101b..9cb59b5 100644
--- a/test/suites/t_cose/CMakeLists.txt
+++ b/test/suites/t_cose/CMakeLists.txt
@@ -7,7 +7,8 @@
 
 cmake_policy(SET CMP0079 NEW)
 
-if((NOT TFM_PARTITION_INITIAL_ATTESTATION) OR SYMMETRIC_INITIAL_ATTESTATION)
+if((NOT TFM_PARTITION_INITIAL_ATTESTATION AND NOT FORWARD_PROT_MSG)
+   OR SYMMETRIC_INITIAL_ATTESTATION)
     return()
 endif()