Skip to content
This repository has been archived by the owner on Jan 9, 2021. It is now read-only.

Commit

Permalink
CMake gcc use native CPU features, Faster Linux builds
Browse files Browse the repository at this point in the history
  • Loading branch information
S74nk0 committed Oct 23, 2016
1 parent 6066375 commit 4d77558
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions nheqminer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,16 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

# LINUX
if(CMAKE_COMPILER_IS_GNUCXX)
# use native cpu features
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
# optimizations
add_definitions(-O3)
endif()

# Common
include_directories(${nheqminer_SOURCE_DIR})

# CPU extension options
#add_definitions(-DHAVE_SSSE2)
#add_definitions(-DHAVE_SSSE3)
#add_definitions(-DHAVE_SSE41)
#add_definitions(-DHAVE_AVX)
#add_definitions(-DHAVE_AVX2)


add_definitions(-DBOOST_ALL_NO_LIB -DBOOST_ALL_DYN_LINK -DBOOST_LOG_DYN_LINK)

find_package(Threads REQUIRED COMPONENTS)
Expand Down

0 comments on commit 4d77558

Please sign in to comment.