source /theoryfs2/common/software/intel2015/bin/compilervars.sh intel64
export TLIBC=/theoryfs2/ds/cdsgroup/psi4-compile/psi4cmake/psi4/glibc2.12rpm

mkdir build
cd build
cmake \
    -DCMAKE_C_COMPILER=icc \
    -DCMAKE_CXX_COMPILER=icpc \
    -DCMAKE_Fortran_COMPILER=ifort \
    -DPYTHON_INTERPRETER=${PYTHON} \
    -DLIBINT_OPT_AM=6 \
    -DENABLE_STATIC_LINKING=ON \
    -DENABLE_XHOST=OFF \
    -DCMAKE_BUILD_TYPE=release \
    -DLIBC_INTERJECT="-L${TLIBC}/usr/lib64 ${TLIBC}/lib64/libpthread.so.0 ${TLIBC}/lib64/libc.so.6" \
    -DCMAKE_INSTALL_PREFIX=${PREFIX} \
    ${SRC_DIR}
make -j3
#make -j${CPU_COUNT}
make install

#/theoryfs2/ds/cdsgroup/psi4-install/miniconda/pkgs/cmake-3.1.0-0/bin/cmake  
#-DCMAKE_Fortran_COMPILER=ifort 
#-DCMAKE_C_COMPILER=icc 
#-DCMAKE_CXX_COMPILER=icpc 
#-DENABLE_MPI=OFF 
#-DENABLE_SGI_MPT=OFF 
#-DENABLE_OMP=ON 
#-DENABLE_VECTORIZATION=OFF 
#-DENABLE_CSR=OFF 
#-DENABLE_SCALAPACK=OFF 
#-DENABLE_SCALASCA=OFF 
#-DENABLE_UNIT_TESTS=OFF 
#-DENABLE_STATIC_LINKING=OFF 
#-DENABLE_PLUGINS=ON 
#-DENABLE_LIBERD=OFF 
#-DENABLE_JKFACTORY=OFF 
#-DENABLE_GPU_DFCC=OFF 
#-DENABLE_DUMMY_PLUGIN=OFF 
#-DENABLE_PCMSOLVER=OFF 
#-DENABLE_CXX11_SUPPORT=ON 
#-DLIBINT_OPT_AM=5 
#-DEXECUTABLE_SUFFIX= 
#-DBOOST_INCLUDEDIR=/theoryfs2/ds/cdsgroup/psi4-install/miniconda/include/boost 
#-DBOOST_LIBRARYDIR=/theoryfs2/ds/cdsgroup/psi4-install/miniconda/lib 
#-DPYTHON_INTERPRETER=/theoryfs2/ds/cdsgroup/psi4-install/miniconda/bin/python 
#-DCMAKE_INSTALL_PREFIX=/usr/local/psi4 
#-DCMAKE_BUILD_TYPE=release /theoryfs2/ds/cdsgroup/psi4-compile/psi4mangle/psi4


    #-DBUILD_CUSTOM_BOOST=OFF \
    #-DBOOST_LIBRARYDIR=/theoryfs2/ds/cdsgroup/psi4-install/miniconda/lib \
    #-DBOOST_LIBRARY_DIR=/theoryfs2/ds/cdsgroup/psi4-install/miniconda/lib \
    #-DBOOST_INCLUDEDIR=/theoryfs2/ds/cdsgroup/psi4-install/miniconda/include/boost \
    #-DBOOST_INCLUDE_DIR=/theoryfs2/ds/cdsgroup/psi4-install/miniconda/include/boost \
#make

#../setup --cc icc --cxx icpc --fc ifort --plugins on --python=/theoryfs2/ds/cdsgroup/psi4-install/miniconda/bin/python
# cmake  
#    -DCMAKE_Fortran_COMPILER=ifort \
#-DENABLE_MPI=OFF \
#-DENABLE_SGI_MPT=OFF \
#-DENABLE_OMP=ON \
#-DENABLE_VECTORIZATION=OFF \
#-DENABLE_CSR=OFF \
#-DENABLE_SCALAPACK=OFF \
#-DENABLE_SCALASCA=OFF \
#-DENABLE_UNIT_TESTS=OFF \
#-DENABLE_STATIC_LINKING=OFF \
#-DENABLE_PLUGINS=ON \
#-DENABLE_LIBERD=OFF \
#-DENABLE_JKFACTORY=OFF \
#-DENABLE_GPU_DFCC=OFF \
#-DENABLE_DUMMY_PLUGIN=OFF \
#-DENABLE_PCMSOLVER=OFF \
#-DENABLE_CXX11_SUPPORT=ON \
#    -DPYTHON_INTERPRETER=/theoryfs2/ds/cdsgroup/psi4-install/miniconda/bin/python \
#-DEXECUTABLE_SUFFIX= \
#-DCMAKE_INSTALL_PREFIX=/usr/local/psi4 \
#/theoryfs2/ds/cdsgroup/psi4-compile/psi4cmake/psi4

#mkdir build
#cd build
#cmake                                                               \
#    -DPYTHON_EXECUTABLE=$PREFIX/bin/python                          \
#    -DPYTHON_INCLUDE_DIR=$PREFIX/include/python2.7/                 \
#    -DPYTHON_LIBRARY=$PREFIX/lib/libpython2.7.dylib                 \
#    -DPYTHON_PACKAGES_PATH=$PREFIX/lib/python2.7/site-packages/     \
#    -DCMAKE_INSTALL_PREFIX=$PREFIX                                  \
#    -DWITH_CUDA=OFF                                                 \
#    -DWITH_AVFOUNDATION=OFF                                         \
#    -DWITH_FFMPEG=OFF                                               \
#    -DJPEG_INCLUDE_DIR:PATH=$PREFIX/include                         \
#    -DJPEG_LIBRARY:FILEPATH=$PREFIX/lib/libjpeg.so                  \
#    -DPNG_PNG_INCLUDE_DIR:PATH=$PREFIX/include                      \
#    -DPNG_LIBRARY:FILEPATH=$PREFIX/lib/libpng.so                    \
#    -DZLIB_INCLUDE_DIR:PATH=$PREFIX/include                         \
#    -DZLIB_LIBRARY:FILEPATH=$PREFIX/lib/libz.so                     \
#    ..
#make
#make install

