Re: [Seqan-dev] FYI: CMake - Seqan - OpenMP support
- From: Manuel Holtgrewe <manuel.holtgrewe@fu-berlin.de>
- To: SeqAn Development <seqan-dev@lists.fu-berlin.de>
- Date: Tue, 10 May 2011 08:45:05 +0200
- Reply-to: SeqAn Development <seqan-dev@lists.fu-berlin.de>
- Subject: Re: [Seqan-dev] FYI: CMake - Seqan - OpenMP support
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 OpenMPsupport 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
-- Manuel Holtgrewe manuel.holtgrewe@fu-berlin.de Freie Universität Berlin http://www.inf.fu-berlin.de/ Institut für Informatik Phone: +49 30 838 75246 Takustraße 9 Algorithmic Bioinformatics 14195 Berlin Room 021
- Follow-Ups:
- Re: [Seqan-dev] FYI: CMake - Seqan - OpenMP support
- From: Fabian Buske <f.buske@uq.edu.au>
- Re: [Seqan-dev] FYI: CMake - Seqan - OpenMP support
- References:
- [Seqan-dev] FYI: CMake - Seqan - OpenMP support
- From: Fabian Buske <f.buske@uq.edu.au>
- [Seqan-dev] FYI: CMake - Seqan - OpenMP support
-
seqan-dev - May 2011 - Archives indexes sorted by:
[ thread ] [ subject ] [ author ] [ date ] - Complete archive of the seqan-dev mailing list
- More info on this list...