diff --git a/tests/platform-native/cmake/platform-options.cmake b/tests/platform-native/cmake/platform-options.cmake
index 7f9b411..f526e8b 100644
--- a/tests/platform-native/cmake/platform-options.cmake
+++ b/tests/platform-native/cmake/platform-options.cmake
@@ -20,7 +20,7 @@ message(VERBOSE "Including 'tests/platform-native/cmake/platform.cmake'...")
 
 # Validate.
 if(NOT DEFINED xpack_platform_compile_definition)
-  message(FATAL_ERROR "Define xpack_platform_compile_definition in platform*/cmake/dependencies.cmake")
+  message(FATAL_ERROR "Define xpack_platform_compile_definition in ${PLATFORM_NAME}/cmake/dependencies.cmake")
 endif()
 
 # -----------------------------------------------------------------------------
diff --git a/tests/platform-qemu-cortex-a15/cmake/platform-options.cmake b/tests/platform-qemu-cortex-a15/cmake/platform-options.cmake
index d859b8f..db913b8 100644
--- a/tests/platform-qemu-cortex-a15/cmake/platform-options.cmake
+++ b/tests/platform-qemu-cortex-a15/cmake/platform-options.cmake
@@ -18,7 +18,7 @@ message(VERBOSE "Including 'tests/platform-qemu-cortex-a15/cmake/platform.cmake'
 
 # Validate.
 if(NOT DEFINED xpack_platform_compile_definition)
-  message(FATAL_ERROR "Define xpack_platform_compile_definition in platform*/cmake/dependencies.cmake")
+  message(FATAL_ERROR "Define xpack_platform_compile_definition in ${PLATFORM_NAME}/cmake/dependencies.cmake")
 endif()
 
 # -----------------------------------------------------------------------------
diff --git a/tests/platform-qemu-cortex-a72/cmake/platform-options.cmake b/tests/platform-qemu-cortex-a72/cmake/platform-options.cmake
index e18c8f5..fe17b0d 100644
--- a/tests/platform-qemu-cortex-a72/cmake/platform-options.cmake
+++ b/tests/platform-qemu-cortex-a72/cmake/platform-options.cmake
@@ -16,6 +16,13 @@ message(VERBOSE "Including 'tests/platform-qemu-cortex-a72/cmake/platform.cmake'
 
 # -----------------------------------------------------------------------------
 
+# Validate.
+if(NOT DEFINED xpack_platform_compile_definition)
+  message(FATAL_ERROR "Define xpack_platform_compile_definition in ${PLATFORM_NAME}/cmake/dependencies.cmake")
+endif()
+
+# -----------------------------------------------------------------------------
+
 # Define the platform library.
 add_library(platform-qemu-cortex-a72-interface INTERFACE EXCLUDE_FROM_ALL)
 
diff --git a/tests/platform-qemu-cortex-m0/cmake/platform-options.cmake b/tests/platform-qemu-cortex-m0/cmake/platform-options.cmake
index 7d2c48f..a50e91f 100644
--- a/tests/platform-qemu-cortex-m0/cmake/platform-options.cmake
+++ b/tests/platform-qemu-cortex-m0/cmake/platform-options.cmake
@@ -18,6 +18,13 @@ message(VERBOSE "Including 'tests/platform-qemu-cortex-m0/cmake/platform.cmake'.
 
 # -----------------------------------------------------------------------------
 
+# Validate.
+if(NOT DEFINED xpack_platform_compile_definition)
+  message(FATAL_ERROR "Define xpack_platform_compile_definition in ${PLATFORM_NAME}/cmake/dependencies.cmake")
+endif()
+
+# -----------------------------------------------------------------------------
+
 # Define the platform library.
 add_library(platform-qemu-cortex-m0-interface INTERFACE EXCLUDE_FROM_ALL)
 
diff --git a/tests/platform-qemu-cortex-m7f/cmake/platform-options.cmake b/tests/platform-qemu-cortex-m7f/cmake/platform-options.cmake
index a25dc77..8726844 100644
--- a/tests/platform-qemu-cortex-m7f/cmake/platform-options.cmake
+++ b/tests/platform-qemu-cortex-m7f/cmake/platform-options.cmake
@@ -16,6 +16,13 @@ message(VERBOSE "Including 'tests/platform-qemu-cortex-m7f/cmake/platform.cmake'
 
 # -----------------------------------------------------------------------------
 
+# Validate.
+if(NOT DEFINED xpack_platform_compile_definition)
+  message(FATAL_ERROR "Define xpack_platform_compile_definition in ${PLATFORM_NAME}/cmake/dependencies.cmake")
+endif()
+
+# -----------------------------------------------------------------------------
+
 # Define the platform library.
 add_library(platform-qemu-cortex-m7f-interface INTERFACE EXCLUDE_FROM_ALL)
 
diff --git a/tests/platform-qemu-riscv-rv32imac/cmake/platform-options.cmake b/tests/platform-qemu-riscv-rv32imac/cmake/platform-options.cmake
index ae4c6f4..fa66d2f 100644
--- a/tests/platform-qemu-riscv-rv32imac/cmake/platform-options.cmake
+++ b/tests/platform-qemu-riscv-rv32imac/cmake/platform-options.cmake
@@ -16,6 +16,13 @@ message(VERBOSE "Including 'tests/platform-qemu-riscv-rv32imac/cmake/platform.cm
 
 # -----------------------------------------------------------------------------
 
+# Validate.
+if(NOT DEFINED xpack_platform_compile_definition)
+  message(FATAL_ERROR "Define xpack_platform_compile_definition in ${PLATFORM_NAME}/cmake/dependencies.cmake")
+endif()
+
+# -----------------------------------------------------------------------------
+
 # Define the platform library.
 add_library(platform-qemu-riscv-rv32imac-interface INTERFACE EXCLUDE_FROM_ALL)
 
diff --git a/tests/platform-qemu-riscv-rv64imafdc/cmake/platform-options.cmake b/tests/platform-qemu-riscv-rv64imafdc/cmake/platform-options.cmake
index 2b6e39f..567fe81 100644
--- a/tests/platform-qemu-riscv-rv64imafdc/cmake/platform-options.cmake
+++ b/tests/platform-qemu-riscv-rv64imafdc/cmake/platform-options.cmake
@@ -16,6 +16,13 @@ message(VERBOSE "Including 'tests/platform-qemu-riscv-rv64imafdc/cmake/platform.
 
 # -----------------------------------------------------------------------------
 
+# Validate.
+if(NOT DEFINED xpack_platform_compile_definition)
+  message(FATAL_ERROR "Define xpack_platform_compile_definition in ${PLATFORM_NAME}/cmake/dependencies.cmake")
+endif()
+
+# -----------------------------------------------------------------------------
+
 # Define the platform library.
 add_library(platform-qemu-riscv-rv64imafdc-interface INTERFACE EXCLUDE_FROM_ALL)