Integrate libiomp CMake into LLVM CMake build system.

Doesn’t the commit of…

Technically no, the llvm/projects/CMakeLists.txt file has logic to include any project that has a top level CMakeLists.txt file. So automatic building will still build fine.

I thought we could commit this separately since it changes the main llvm repo, and the automatic build still works without it.

The benefits of having the logic in the llvm/projects/CMakeLists.txt file include:

  1. -DLLVM_EXTERNAL_OPENMP_SOURCE_DIR=/path/to/openmp is an available cmake option.

  2. -DLLVM_EXTERNAL_OPENMP_BUILD=[on|off] is an available cmake option.

  3. if -DLLVM_BUILD_RUNTIME=off, then openmp won’t build (neither will compiler-rt nor libcxx)

I assume we want this in there so I will create a separate patch and send it out for the llvm people to review.

– Johnny