Using the new structure, you have to do this yourself. Currently,
OpenMP is already searched for on the top level structure, so the
OPENMP_FOUND flags are available. However, you have to add the define
yourself in your CMakeLists.txt. With the new structure, you are
mostly responsible for adding dependencies yourself.
For example:
cmake_minimum_required (VERSION 2.6)
project (sandbox_weese_apps_razers3)
if (OPENMP_FOUND)
# We need a configuration header file. First, configure this file,
then
# add the target directory to the inclue path.
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
${CMAKE_CURRENT_BINARY_DIR}/config.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
# Enable OpenMP.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
# Add executable for RazerS 3.
seqan_add_executable (razers3 razers.cpp)
elseif (OPENMP_FOUND)
message(STATUS "Not building RazerS3, since OpenMP could not be
found.")
endif (OPENMP_FOUND)
Am 10.05.2011 um 08:42 schrieb Fabian Buske:
Hi,
After porting my project to the new structure I noticed that the
OpenMP
support didn't work properly anymore.
In Xcode you always have to tick the "Enable OpenMP Support"
checkbox in
"Project Info/Build" after running the cmake command (which isn't too
much of a hassle).
For the Makefile version one, however, seems to have to add some flags
to tell the compiler to do as it is told, i.e. for gcc:
cmake ../.. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-fopenmp"
seems to work. I assumed cmake would take care of this.
Cheers,
Fabian
--
Fabian Buske
Institute for Molecular Bioscience
The University of Queensland
Brisbane, Qld. 4072 Australia
Phone: (61)-(7)-334-62641
_______________________________________________
seqan-dev mailing list
seqan-dev@lists.fu-berlin.de
https://lists.fu-berlin.de/listinfo/seqan-dev