cmake_minimum_required(VERSION 3.18) # set the project name project(QDPBench VERSION 0.1) # specify the C standard set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED True) #set flags on need cross compile for sapphirerapids architecture set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=sapphirerapids") #set flags on need cross compile for skylake micro architecture #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=skylake-avx512") #set flags on need cross compile for knights landing micro architecture (for debugging) #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx512f -mavx512cd -mavx512er -mavx512pf") #suppress selected! warnigs that are not very important to resolve. This is to keep the compileation output clean set(SUPPRESS_WARNINGS "-Wno-literal-suffix -Wno-volatile") set(DEBUG_FLAGS "-g3" "-ggdb") set(RELEASE_FLAGS "-O3") #set flags used for Release and Debug build type add_compile_options( "$<$:${RELEASE_FLAGS}>" "$<$:${DEBUG_FLAGS}>" ) # include directories include_directories(src/utils) # link libraries link_libraries(-lnuma -lpthread -l:libdml.a) # Add targets only below # specify build targets add_executable(QDPBench src/Benchmark.cpp)