Browse Source

openmp flags tested for

enhancement_3
Trevor Irons 9 years ago
parent
commit
c5c20ab6d9
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      CMakeLists.txt

+ 5
- 0
CMakeLists.txt View File

@@ -120,6 +120,7 @@ endif()
120 120
 include(CheckCXXCompilerFlag)
121 121
 CHECK_CXX_COMPILER_FLAG(-std=c++11 COMPILER_SUPPORTS_CXX11)
122 122
 CHECK_CXX_COMPILER_FLAG(-std=c++0x COMPILER_SUPPORTS_CXX0X)
123
+CHECK_CXX_COMPILER_FLAG(-fopenmp COMPILER_SUPPORTS_OPENMP)
123 124
 if(COMPILER_SUPPORTS_CXX11)
124 125
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
125 126
 elseif(COMPILER_SUPPORTS_CXX0X)
@@ -128,6 +129,10 @@ else()
128 129
 	message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
129 130
 endif()
130 131
 
132
+if(COMPILER_SUPPORTS_OPENMP)
133
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
134
+endif()
135
+
131 136
 set(LEMMA_VERSION_MAJOR "0")
132 137
 set(LEMMA_VERSION_MINOR "0")
133 138
 set(LEMMA_VERSION_PATCH "1")

Loading…
Cancel
Save