[flang] unit test support for out-of-tree and in-tree using google tests framework

Review comments addressed.
diff --git a/flang/unittests/CMakeLists.txt b/flang/unittests/CMakeLists.txt
index 2171927..440ab4e 100644
--- a/flang/unittests/CMakeLists.txt
+++ b/flang/unittests/CMakeLists.txt
@@ -1,3 +1,11 @@
+add_custom_target(FlangUnitTests)
+set_target_properties(FlangUnitTests PROPERTIES FOLDER "Flang Unit Tests")
+
+function(add_flang_unittest test_dirname)
+  add_unittest(FlangUnitTests ${test_dirname} ${ARGN})
+endfunction()
+
+add_subdirectory(Optimizer)
 add_subdirectory(Decimal)
 add_subdirectory(Evaluate)
 add_subdirectory(Runtime)