Compiling ParMetis v4.02 on Windows with Intel Compiler and MPI libraries

Just thought I would contribute some changes that allowed me to compile on this platform, in case it interests anyone. My first time working with CMake and the FindMPI package does not like the Intel MPI wrappers very much (initially started with v.4.0.1). Even if this was commented out in v.4.0.2, one still needs to define a few things.

Calls inside Intel Compiler command prompt:
# Motivation: default mpicc calls MS Visual C++ compiler (cl.exe); mpiicc calls icl.exe instead.
# Also, exact name with .bat extension seems to be required by cmake to locate the files.
set comp=mpiicc.bat
call make config openmp=1 debug=0 cc=%comp% cxx=%comp%

Changes to top-level Makefile:
# Motivation: cmake defaults to link.exe as linker, strips out
# important flags that need to be set by compiler wrapper.
# Also, cmake defaults to Visual Studio project files do not seem to inherit important
# paths that are present in the shell: use nmake instead.
CONFIG_FLAGS += -G "NMake Makefiles"

Changes to CMakeLists.txt:
# Motivation:
# Pass flags to compiler wrapper to use multi-threaded MPI libraries (-mt_mpi)
# This is important because we configure OpenMP with make config.
# Also pass -Qparallel, just in case Intel C compiler finds automatic parallelization
# opportunities: this also requires -mt_mpi for the link stage.
# Important: even if icl.exe complains about non-existing /mt_mpi flag during compilation,
# this is needed by the wrapper to force linking to right lib file (impimt.lib instead of impi.lib).
set(MPI_LINK_FLAGS "-mt_mpi -Qparallel")

RE: One extra detail I forgot to

One extra detail I forgot to include. Satisfied the #include requirement with header files from the PCRE project ( Just copied those in the top-level ParMETIS include folder.

The Intel compiler does not have a regular expression library, nor does the underlying Visual Studio compiler (for VS 2008 at least). Even installing VS 2008 SP1 only provides support for TR1 regex and it did not seem to be compatible.