[CMake] How to force cmake to only look for C MPI not C++

2014-03-18 Thread Bibrak Qamar
Hi, 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: 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

Re: [CMake] How to force cmake to only look for C MPI not C++

2014-03-18 Thread Bruce Cartland
Try the project command * project(yourProjectName C) It's what I use. Quick Google found this * http://www.cmake.org/cmake/help/cmake2.6docs.html#command:project On 18/03/14 17:09, Bibrak Qamar wrote: Hi, I am using cmake to create Makefile. I am using MPI in my project but I only want

Re: [CMake] How to force cmake to only look for C MPI not C++

2014-03-18 Thread Bibrak Qamar
Thanks for the help. I did that but still the error persists. The C compiler identification is GNU -- Check for working C compiler: /export/home/bibrak/MPJExpress_Project/work/programs/installs/bin/gcc -- Check for working C compiler:

Re: [CMake] How to force cmake to only look for C MPI not C++

2014-03-18 Thread Bruce Cartland
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. On 18/03/14 17:22, Bruce Cartland wrote: Try the project command *

Re: [CMake] How to force cmake to only look for C MPI not C++

2014-03-18 Thread Micha Hergarden
Can you verify that *${MPI_C_INCLUDE_PATH} is actually set? I normally use 'printf' debugging to find out: message(WARNING HELLO: **${MPI_C_INCLUDE_PATH}*) Regards, Micha On 03/18/2014 07:34 AM, Bibrak Qamar wrote: Thanks for the help. I did that but still the error persists. The C compiler

Re: [CMake] How to force cmake to only look for C MPI not C++

2014-03-18 Thread Bruce Cartland
Since I haven't worked with MPI, I don't think I can help much. Try using the message command to dump variable contents e.g. message(STATUS CMAKE_C_FLAGS = ${CMAKE_C_FLAGS}) You may need to add includes explicitly with the include_directories (or similar) command. Hopefully some else using MPI can

Re: [CMake] How to force cmake to only look for C MPI not C++

2014-03-18 Thread Bibrak Qamar
And I did it. It wasn't populating *MPI_C_INCLUDE_PATH *instead it populated *MPI_INCLUDE_PATH.* So now I am using only *MPI_INCLUDE_PATH, MPI_COMPILE_FLAGS, MPI_LINK_FLAGS and MPI_LIBRARIES *not * MPI_C_* * Thanks Bibrak Qamar On Tue, Mar 18, 2014 at 11:38 AM, Bruce Cartland