layers: Enable testing through ctest

This Cl addes the necessary configuration to register the layer tests
to be run with ctest.

Change-Id: I960dcab30a2f8f0c949f22948357f56bcb25557b
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 23bfd9d..7122b2c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,6 +25,8 @@
 
 project(Vulkan-ValidationLayers)
 
+enable_testing()
+
 # User-interface declarations ----------------------------------------------------------------------------------------------------
 # This section contains variables that affect development GUIs (e.g. CMake GUI and IDEs), such as option(), folders, and variables
 # with the CACHE property.
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 59e7359..cf62ba6 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -110,6 +110,7 @@
                ../layers/convert_to_renderpass2.cpp
                ${PROJECT_BINARY_DIR}/vk_safe_struct.cpp
                ${COMMON_CPP})
+add_test(NAME vk_layer_validation_tests COMMAND vk_layer_validation_tests)
 add_dependencies(vk_layer_validation_tests Vulkan::Vulkan)
 if(NOT GTEST_IS_STATIC_LIB)
     set_target_properties(vk_layer_validation_tests PROPERTIES COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1")