Document build and test instructions.
Also automatically download git submodules with CMake.
Change-Id: I3da095f49d0a9c577ea5dbb50d3db951417f4755
Reviewed-on: https://swiftshader-review.googlesource.com/20088
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 17b488d..7a30cc1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -81,6 +81,19 @@
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
###########################################################
+# Initialize submodules
+###########################################################
+
+if(NOT EXISTS ${CMAKE_SOURCE_DIR}/third_party/googletest)
+ message(WARNING "
+ third_party/googletest submodule missing.
+ Running 'git submodule update --init' to download it:
+ ")
+
+ execute_process(COMMAND git submodule update --init)
+endif()
+
+###########################################################
# Convenience macros
###########################################################