[CMake] Make openmp build under runtimes/

runtimes/CMakeLists.txt in LLVM passes OPENMP_STANDALONE_BUILD.

Differential Revision: https://reviews.llvm.org/D28280

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@290978 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
index 6b896aa..33225b6 100644
--- a/runtime/CMakeLists.txt
+++ b/runtime/CMakeLists.txt
@@ -17,7 +17,8 @@
 
 # Standalone build or part of LLVM?
 set(LIBOMP_STANDALONE_BUILD FALSE)
-if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}" OR
+if(OPENMP_STANDALONE_BUILD OR
+   "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}" OR
    "${CMAKE_SOURCE_DIR}/runtime" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
   project(libomp C CXX)
   set(LIBOMP_STANDALONE_BUILD TRUE)