In case an llvm or clang is set, we need to ensure that cmake finds the Clang package in AOMP.   So we need to set Clang_DIR and LLVM_DIR
@@ -79,8 +79,9 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
BUILDTYPE="Release"
echo $SUDO rm -rf $BUILD_AOMP/build/comgr
$SUDO rm -rf $BUILD_AOMP/build/comgr
- export LLVM_DIR=$AOMP
- MYCMAKEOPTS="-DCMAKE_INSTALL_PREFIX=$INSTALL_COMGR -DCMAKE_BUILD_TYPE=$BUILDTYPE -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON -DCMAKE_INSTALL_RPATH=$AOMP_INSTALL_DIR/lib -DLLVM_BUILD_MAIN_SRC_DIR=$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/llvm -DLLVM_DIR=$LLVM_DIR"
+ export LLVM_DIR=$AOMP_INSTALL_DIR
+ export Clang_DIR=$AOMP_INSTALL_DIR
+ MYCMAKEOPTS="-DCMAKE_INSTALL_PREFIX=$INSTALL_COMGR -DCMAKE_BUILD_TYPE=$BUILDTYPE -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON -DCMAKE_INSTALL_RPATH=$AOMP_INSTALL_DIR/lib -DLLVM_BUILD_MAIN_SRC_DIR=$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/llvm -DLLVM_DIR=$AOMP_INSTALL_DIR -DClang_DIR=$AOMP_INSTALL_DIR"
mkdir -p $BUILD_AOMP/build/comgr
cd $BUILD_AOMP/build/comgr
echo " -----Running comgr cmake ---- "
