Lines Matching +full:- +full:- +full:disable +full:- +full:openmp
5 # guard against in-source builds
8 …message(FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build dir…
16 # guard against bad build-type strings
26 …pe \"${CMAKE_BUILD_TYPE}\". Allowed values are Debug, Release, RelWithDebInfo (case-insensitive).")
36 string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen_world_version_match "${_e…
38 string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen_major_version_match "${_e…
40 string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen_minor_version_match "${_e…
46 execute_process(COMMAND hg tip -R ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE EIGEN_HGTIP_OUTPUT)
47 execute_process(COMMAND hg branch -R ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE EIGEN_BRANCH_OUTPUT)
51 string(REGEX MATCH "^changeset: *[0-9]*:([0-9;a-f]+).*" EIGEN_HG_CHANGESET_MATCH "${EIGEN_HGTIP_OUT…
102 # Disable pkgconfig only for native Windows builds
104 option(EIGEN_BUILD_PKGCONFIG "Build pkg-config .pc file for Eigen" ON)
111 option(EIGEN_DEFAULT_TO_ROW_MAJOR "Use row-major as default matrix storage order" OFF)
113 add_definitions("-DEIGEN_DEFAULT_TO_ROW_MAJOR")
119 string(REGEX REPLACE "-" "" SFLAG1 ${FLAG})
131 # adding -Werror turns such warnings into errors
132 check_cxx_compiler_flag("-Werror" COMPILER_SUPPORT_WERROR)
134 set(CMAKE_REQUIRED_FLAGS "-Werror")
136 ei_add_cxx_compiler_flag("-pedantic")
137 ei_add_cxx_compiler_flag("-Wall")
138 ei_add_cxx_compiler_flag("-Wextra")
139 #ei_add_cxx_compiler_flag("-Weverything") # clang
141 ei_add_cxx_compiler_flag("-Wundef")
142 ei_add_cxx_compiler_flag("-Wcast-align")
143 ei_add_cxx_compiler_flag("-Wchar-subscripts")
144 ei_add_cxx_compiler_flag("-Wnon-virtual-dtor")
145 ei_add_cxx_compiler_flag("-Wunused-local-typedefs")
146 ei_add_cxx_compiler_flag("-Wpointer-arith")
147 ei_add_cxx_compiler_flag("-Wwrite-strings")
148 ei_add_cxx_compiler_flag("-Wformat-security")
149 ei_add_cxx_compiler_flag("-Wshorten-64-to-32")
150 ei_add_cxx_compiler_flag("-Wlogical-op")
151 ei_add_cxx_compiler_flag("-Wenum-conversion")
152 ei_add_cxx_compiler_flag("-Wc++11-extensions")
153 ei_add_cxx_compiler_flag("-Wdouble-promotion")
154 # ei_add_cxx_compiler_flag("-Wconversion")
156 # -Wshadow is insanely too strict with gcc, hopefully it will become usable with gcc 6
159 ei_add_cxx_compiler_flag("-Wshadow")
162 ei_add_cxx_compiler_flag("-Wno-psabi")
163 ei_add_cxx_compiler_flag("-Wno-variadic-macros")
164 ei_add_cxx_compiler_flag("-Wno-long-long")
166 ei_add_cxx_compiler_flag("-fno-check-new")
167 ei_add_cxx_compiler_flag("-fno-common")
168 ei_add_cxx_compiler_flag("-fstrict-aliasing")
169 …ei_add_cxx_compiler_flag("-wd981") # disable ICC's "operands are evaluated in u…
170 …-wd2304") # disable ICC's "warning #2304: non-explicit constructor with single a…
173 …# The -ansi flag must be added last, otherwise it is also used as a linker flag by check_cxx_compi…
174 # Moreover we should not set both -strict-ansi and -ansi
175 check_cxx_compiler_flag("-strict-ansi" COMPILER_SUPPORT_STRICTANSI)
176 …ei_add_cxx_compiler_flag("-Qunused-arguments") # disable clang warning: argument unused dur…
179 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -strict-ansi")
181 ei_add_cxx_compiler_flag("-ansi")
185 ei_add_cxx_compiler_flag("-pie")
186 ei_add_cxx_compiler_flag("-fPIE")
191 option(EIGEN_TEST_SSE2 "Enable/Disable SSE2 in tests/examples" OFF)
193 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2")
197 option(EIGEN_TEST_SSE3 "Enable/Disable SSE3 in tests/examples" OFF)
199 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse3")
203 option(EIGEN_TEST_SSSE3 "Enable/Disable SSSE3 in tests/examples" OFF)
205 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mssse3")
209 option(EIGEN_TEST_SSE4_1 "Enable/Disable SSE4.1 in tests/examples" OFF)
211 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.1")
215 option(EIGEN_TEST_SSE4_2 "Enable/Disable SSE4.2 in tests/examples" OFF)
217 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2")
221 option(EIGEN_TEST_AVX "Enable/Disable AVX in tests/examples" OFF)
223 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx")
227 option(EIGEN_TEST_FMA "Enable/Disable FMA in tests/examples" OFF)
229 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfma")
233 option(EIGEN_TEST_AVX512 "Enable/Disable AVX512 in tests/examples" OFF)
235 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx512f -fabi-version=6 -DEIGEN_ENABLE_AVX512")
239 option(EIGEN_TEST_F16C "Enable/Disable F16C in tests/examples" OFF)
241 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mf16c")
245 option(EIGEN_TEST_ALTIVEC "Enable/Disable AltiVec in tests/examples" OFF)
247 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maltivec -mabi=altivec")
251 option(EIGEN_TEST_VSX "Enable/Disable VSX in tests/examples" OFF)
253 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -mvsx")
257 option(EIGEN_TEST_NEON "Enable/Disable Neon in tests/examples" OFF)
260 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon-vfpv4")
262 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon")
264 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfloat-abi=hard")
268 option(EIGEN_TEST_NEON64 "Enable/Disable Neon in tests/examples" OFF)
274 option(EIGEN_TEST_ZVECTOR "Enable/Disable S390X(zEC13) ZVECTOR in tests/examples" OFF)
276 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=z13 -mzvector")
280 check_cxx_compiler_flag("-fopenmp" COMPILER_SUPPORT_OPENMP)
282 option(EIGEN_TEST_OPENMP "Enable/Disable OpenMP in tests/examples" OFF)
284 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
285 message(STATUS "Enabling OpenMP in tests/examples")
291 # C4127 - conditional expression is constant
292 # C4714 - marked as __forceinline not inlined (I failed to deactivate it selectively)
293 # We can disable this warning in the unit tests since it is clear that it occurs
295 # throw exceptions - in particular in the unit tests we are throwing extra many
297 # C4505 - unreferenced local function has been removed (impossible to deactive selectively)
301 string(REGEX REPLACE "/W[0-9]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
303 check_cxx_compiler_flag("/openmp" COMPILER_SUPPORT_OPENMP)
305 option(EIGEN_TEST_OPENMP "Enable/Disable OpenMP in tests/examples" OFF)
307 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp")
308 message(STATUS "Enabling OpenMP in tests/examples")
312 option(EIGEN_TEST_SSE2 "Enable/Disable SSE2 in tests/examples" OFF)
322 option(EIGEN_TEST_NO_EXPLICIT_VECTORIZATION "Disable explicit vectorization in tests/examples" OFF)
329 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpmath=387")
338 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
339 message(STATUS "Forcing generation of 32-bit code in tests/examples")
346 add_definitions(-DEIGEN_DONT_VECTORIZE=1)
350 option(EIGEN_TEST_NO_EXPLICIT_ALIGNMENT "Disable explicit alignment (hence vectorization) in tests/…
352 add_definitions(-DEIGEN_DONT_ALIGN=1)
358 ei_add_cxx_compiler_flag("-fno-exceptions")
396 …# if the property wasn't previously set, ${previous} is now "previous-NOTFOUND" which cmake allows…
478 message(STATUS "--------------+--------------------------------------------------------------")
480 message(STATUS "--------------+--------------------------------------------------------------")
487 message(STATUS " | cmake . -DCMAKE_INSTALL_PREFIX=yourprefix")
489 message(STATUS " | cmake . -DINCLUDE_INSTALL_DIR=yourdir")
491 message(STATUS "make check | Build and run the unit-tests. Read this page:")
495 message(STATUS "--------------+--------------------------------------------------------------")
596 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/EigenUninstall.cmake)