mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2024-11-17 21:26:04 +00:00
Merge pull request #875 from majestrate/cmake-avx
add AVX option to cmake build system
This commit is contained in:
commit
3219de235c
@ -8,6 +8,7 @@ project ( "i2pd" )
|
|||||||
|
|
||||||
# configurale options
|
# configurale options
|
||||||
option(WITH_AESNI "Use AES-NI instructions set" OFF)
|
option(WITH_AESNI "Use AES-NI instructions set" OFF)
|
||||||
|
option(WITH_AVX "Use AVX instructions" OFF)
|
||||||
option(WITH_HARDENING "Use hardening compiler flags" OFF)
|
option(WITH_HARDENING "Use hardening compiler flags" OFF)
|
||||||
option(WITH_LIBRARY "Build library" ON)
|
option(WITH_LIBRARY "Build library" ON)
|
||||||
option(WITH_BINARY "Build binary" ON)
|
option(WITH_BINARY "Build binary" ON)
|
||||||
@ -213,6 +214,10 @@ if (WITH_AESNI)
|
|||||||
add_definitions ( -DAESNI )
|
add_definitions ( -DAESNI )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (WITH_AVX)
|
||||||
|
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx" )
|
||||||
|
endif()
|
||||||
|
|
||||||
if (WITH_ADDRSANITIZER)
|
if (WITH_ADDRSANITIZER)
|
||||||
if (NOT MSVC)
|
if (NOT MSVC)
|
||||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer" )
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer" )
|
||||||
@ -379,6 +384,7 @@ message(STATUS "Compiler path : ${CMAKE_CXX_COMPILER}")
|
|||||||
message(STATUS "Install prefix: : ${CMAKE_INSTALL_PREFIX}")
|
message(STATUS "Install prefix: : ${CMAKE_INSTALL_PREFIX}")
|
||||||
message(STATUS "Options:")
|
message(STATUS "Options:")
|
||||||
message(STATUS " AESNI : ${WITH_AESNI}")
|
message(STATUS " AESNI : ${WITH_AESNI}")
|
||||||
|
message(STATUS " AVX : ${WITH_AVX}")
|
||||||
message(STATUS " HARDENING : ${WITH_HARDENING}")
|
message(STATUS " HARDENING : ${WITH_HARDENING}")
|
||||||
message(STATUS " LIBRARY : ${WITH_LIBRARY}")
|
message(STATUS " LIBRARY : ${WITH_LIBRARY}")
|
||||||
message(STATUS " BINARY : ${WITH_BINARY}")
|
message(STATUS " BINARY : ${WITH_BINARY}")
|
||||||
|
Loading…
Reference in New Issue
Block a user