Link error if OpenMP is enabled
Summary
The linker reports undefined symbols if OpenMP is enabled.
Steps to reproduce
cmake -DENABLE_OPENMP=TRUE ...
What is the current bug behavior?
libOPAL.a(EnvelopeBunch.cpp.o): En la función `EnvelopeBunch::calcI() [clone ._omp_fn.0]':
EnvelopeBunch.cpp:(.text+0x82): referencia a `omp_get_num_threads' sin definir
EnvelopeBunch.cpp:(.text+0x89): referencia a `omp_get_thread_num' sin definir
libOPAL.a(EnvelopeBunch.cpp.o): En la función `EnvelopeBunch::calcI()':
EnvelopeBunch.cpp:(.text+0x9451): referencia a `GOMP_parallel' sin definir
../ippl/src/libippl.a(CommMPI.cpp.o): En la función `CommMPI::CommMPI(int&, char**&, int, bool, ompi_communicator_t*)':
CommMPI.cpp:(.text+0xf40): referencia a `omp_get_max_threads' sin definir
collect2: error: ld devolvió el estado de salida 1
make[2]: *** [src/CMakeFiles/opal.dir/build.make:117: src/opal] Error 1
make[1]: *** [CMakeFiles/Makefile2:738: src/CMakeFiles/opal.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Possible fixes
Set -fopenmp
as a linker option.