<div dir="ltr"><div><div>Hello,<br><br></div>I'm trying to install an Metis as an 
external package to our software and I'm having some issues. The typical
 shell script that I ran before to install Metis was:<br><br>
$ make config shared=1 prefix=/path/to/installation<br>$ make<br>$ make install<br><br></div><div>So I tried to use the following in the ExternalPackage_Add function:<br><br>ExternalProject_Add(<br>  Metis<br>  <br>  URL ${CMAKE_SOURCE_DIR}/contrib/Metis/metis-5.1.0.tar.gz<br>

  PREFIX Metis<br>  UPDATE_COMMAND ""<br>  <br>  CONFIGURE_COMMAND cd ${CMAKE_CURRENT_BINARY_DIR}/Metis/src/Metis && make config shared=1 prefix=${CMAKE_INSTALL_PREFIX}/contrib/Metis<br>  <br>  BUILD_COMMAND cd ${CMAKE_CURRENT_BINARY_DIR}/Metis/src/Metis && make<br>

 <br>  INSTALL_COMMAND cd ${CMAKE_CURRENT_BINARY_DIR}/Metis/src/Metis && make install<br>  <br>  INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/contrib/Metis<br>)<br></div><div><br></div><div>However, near the end of the Build phase I get this error:<br>

<br>[100%] Built target ndmetis<br>make[4]: *** No rule to make target `s'.  Stop.<br>make[3]: *** [all] Error 2<br>make[2]: *** [Metis/src/Metis-stamp/Metis-build] Error 2<br>make[1]: *** [CMakeFiles/Metis.dir/all] Error 2<br>

make: *** [all] Error 2<br><br></div><div>I don't get where this error is coming from because when I run these commands in terminal it runs perfectly fine and it says:<br><br>[100%] Built target ndmetis<br>make[2]: Leaving directory `/home/cbalen/ConvertCmake/CMakeTutorial/Mine/12a_Metis/Build/Metis/src/Metis/build/Linux-x86_64'<br>
/usr/bin/cmake -E cmake_progress_start /home/cbalen/ConvertCmake/CMakeTutorial/Mine/12a_Metis/Build/Metis/src/Metis/build/Linux-x86_64/CMakeFiles 0<br>make[1]: Leaving directory `/home/cbalen/ConvertCmake/CMakeTutorial/Mine/12a_Metis/Build/Metis/src/Metis/build/Linux-x86_64'<br>
<br><br></div><div>My questions are:<br></div><div>1. From what I see from other examples, other people do not put the following: <br>
<br>cd ${CMAKE_CURRENT_BINARY_DIR}/Metis/src/Metis &&<br><br></div><div>to run bash commands<br></div><div><br></div><div>However if I do that it claims: make[3]: *** No rule to make target `config'.  Stop<br>

</div><div><br></div><div>2. From my understanding I should be able to leave the BUILD_COMMAND and INSTALL_COMMAND empty however if I do that it claims:<br><br>make[3]: *** No targets specified and no makefile found.  Stop.<br>

<br></div><div>But a makefile in Build/Metis/src/Metis where CMake CMake extracts the Metis 
tar file into. So I guess this is related to 1 but
 where does CMake do these commands that it can't see the Makefile and I
 have to send it to the folder specifically to run these commands?<br>
<br></div><div>3. I've also built a simple shell script that runs these 
three commands, when I run the script in terminal it installs without 
errors. But when I have CMake run that same shell script like so:<br><br>ExternalProject_Add(<br>
  Metis<br>  URL ${CMAKE_SOURCE_DIR}/contrib/Metis/metis-5.1.0.tar.gz<br>  PREFIX Metis<br>  UPDATE_COMMAND ""<br>  <br>  CONFIGURE_COMMAND ""<br>  BUILD_COMMAND ""<br>  INSTALL_COMMAND cd ${CMAKE_SOURCE_DIR}/contrib/Metis && ./configure_metis<br>

)<br><br></div><div>I get the same error as before saying: No rule to make target `s'.  Stop.<br><br></div><div>what is CMake doing differently then when I run my shell script by itself?<br></div><div><br></div><div>
4.
 Does anyone know what is going on and how to fix this issue. Is this a 
possible bug cause I've done the same thing with other non cmake 
projects (like p4est, PETSc) and I do not have this issue.<br>
<br><br></div>Thanks for the help,<br>Chad<br><br><div><div dir="ltr"><div></div><div>--<br></div><div>Chad Balen<b><br></b></div><div>Energy Systems Design Laboratory,<br></div><div>3-23 Mechanical Engineering Building,<br>
</div><div>University of Alberta,<br>Edmonton, AB<b><br></b></div></div></div>
</div>