Passing MPI parameters via cmake

Hello,
I need to pass the following parameters to gcc :
-L/software/openmpi/1.8.4_gcc/lib -lmpi_usempi -lmpi_mpifh -lmpi
When I build code now, linker does not find MPI library.
The issue is that I have to use cmake for configuration and cannot pass above parameters directly to gcc.
How can I archive the same effect in CMAKELISTS.TXT?
OS is linux, for which I modify anything besides my home directory (access is via ssh).
Thank you.
anybody?
My experience with cmake is limited.

maybe something like this

1
2
3
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
	set (CMAKE_EXE_LINKER_FLAGS "Your flags here" )
endif()
Topic archived. No new replies allowed.