You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.4 KiB
39 lines
1.4 KiB
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(RELWITHDEBINFO_FLAGS "-O2" "-ggdb3" "-fno-omit-frame-pointer")
|
|
|
|
#set flags used for Release and Debug build type
|
|
add_compile_options(
|
|
"$<$<CONFIG:Release>:${RELEASE_FLAGS}>"
|
|
"$<$<CONFIG:Debug>:${DEBUG_FLAGS}>"
|
|
"$<$<CONFIG:RelWithDebInfo>:${RELWITHDEBINFO_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)
|