瀏覽代碼

openmp flags tested for

enhancement_3
Trevor Irons 8 年之前
父節點
當前提交
c5c20ab6d9
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5
    0
      CMakeLists.txt

+ 5
- 0
CMakeLists.txt 查看文件

@@ -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…
取消
儲存