CMakeLists.txt 1.02 KB
Newer Older
perdacherMartin's avatar
perdacherMartin committed
1 2 3
cmake_minimum_required(VERSION 3.6)
project(blasMeans)

perdacherMartin's avatar
perdacherMartin committed
4
set(SOURCE_FILES main.cpp util/allocation.cpp util/arguments.cpp util/timer.cpp util/dataIo.cpp bmeans/blasmeans.cpp)
perdacherMartin's avatar
perdacherMartin committed
5 6 7 8

SET(CMAKE_C_COMPILER   gcc)
SET(CMAKE_CXX_COMPILER g++)

martin's avatar
martin committed
9
set(CMAKE_CXX_FLAGS  "-std=c++11 -march=corei7-avx -mavx -mavx2 -O3 -fopenmp -ffast-math -fassociative-math -Wa,-q -lmkl_core -lmkl_intel_lp64 -lmkl_intel_thread -liomp5 -lpthread")
perdacherMartin's avatar
perdacherMartin committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32

# adding MKL include directory
include_directories($ENV{MKLROOT}/include)

# laptop
link_directories($ENV{MKLROOT}/lib)

# server
# link_directories($ENV{MKLROOT}/lib/intel64)


# libraries
find_library ( mkl_lp64_LIB NAMES libmkl_intel_lp64.a
        PATHS $ENV{MKLROOT} PATH_SUFFIXES lib)
find_library ( mkl_core_LIB NAMES libmkl_core.a
        PATHS $ENV{MKLROOT} PATH_SUFFIXES lib)
find_library ( mkl_thread_LIB NAMES libmkl_intel_thread.a
        PATHS $ENV{MKLROOT} PATH_SUFFIXES lib)
find_library ( mkl_omp_LIB NAMES libiomp5.a
        PATHS $ENV{MKLROOT} PATH_SUFFIXES lib)


add_executable(blasMeans ${SOURCE_FILES})