<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    By quick Google search, I meant for "cmake project command". Not
    sure how I determined this originally. It was a long time ago.
    Probably read, re-read, and re-read the doco - it wasn't obvious.
    Anyway, hope it helps.<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 18/03/14 17:22, Bruce Cartland
      wrote:<br>
    </div>
    <blockquote cite="mid:5327E60B.406@pobox.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      Try the project command<br>
      <br>
      * project(yourProjectName C)<br>
      <br>
      It's what I use.<br>
      <br>
      Quick Google found this <br>
      <br>
      * <a moz-do-not-send="true" class="moz-txt-link-freetext"
        href="http://www.cmake.org/cmake/help/cmake2.6docs.html#command:project">http://www.cmake.org/cmake/help/cmake2.6docs.html#command:project</a><br>
      <br>
      <br>
      <div class="moz-cite-prefix">On 18/03/14 17:09, Bibrak Qamar
        wrote:<br>
      </div>
      <blockquote
cite="mid:CANFHntC0CUcCp-oAEk5jTXNRXhBSj-XhcShJapqOF=C2B2drzg@mail.gmail.com"
        type="cite">
        <div dir="ltr">
          <div>Hi,<br>
            <br>
          </div>
          I am using cmake to create Makefile. I am using MPI in my
          project but I only want to use the C (mpicc) not C++ (mpicxx)
          following is the CMakeLists.txt:<br>
          <div>
            <div><br>
            </div>
            <div>I have tested it but on some platforms it seems that it
              only detects the C++ mpi (mpicxx) and uses its libraries.
              This creates errors (mpi.h not found) as the project only
              needs C (mpicc and its libraries).<br>
              <br>
            </div>
            <div>So how to force cmake to only search for C (mpicc) and
              use its libraries (the mpi.h not mpicxx.h).<br>
            </div>
            <div><br>
              <span style="font-family:courier new,monospace"><br>
                <br>
                ADD_LIBRARY(nativempjdev SHARED ${SOURCE_FILES})<br>
                <br>
                find_package(MPI)<br>
                if(MPI_FOUND)<br>
                set(CMAKE_C_COMPILE_FLAGS ${CMAKE_C_COMPILE_FLAGS}
                ${MPI_C_COMPILE_FLAGS})<br>
                set(CMAKE_C_LINK_FLAGS ${CMAKE_C_LINK_FLAGS}
                ${MPI_C_LINK_FLAGS})<br>
                <br>
                include_directories(${MPI_C_INCLUDE_PATH}
                $ENV{JAVA_HOME}/include $ENV{JAVA_HOME}/include/linux)<br>
                endif(MPI_FOUND)<br>
                target_link_libraries(nativempjdev ${MPI_C_LIBRARIES})<br>
                install(TARGETS nativempjdev DESTINATION
                $ENV{MPJ_HOME}/lib)</span><br>
              <br>
              <br>
              <br>
            </div>
            <div>Thanks<br clear="all">
            </div>
            <div>
              <div>
                <div dir="ltr"> <span style="">Bibrak Qamar</span><br
                    style="">
                  <span style=""><br>
                  </span></div>
              </div>
            </div>
          </div>
        </div>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
  </body>
</html>