forked from nvdix/CNN_perf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
54 lines (42 loc) · 1.35 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
cmake_minimum_required(VERSION 3.14)
project(convbench LANGUAGES CXX)
#update_repo()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-ignored-attributes")
#-mavx512f -mavx512bw
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/3rdparty/json/CMakeLists.txt")
message(FATAL_ERROR "The submodules were not downloaded! GIT_SUBMODULE was turned off or failed. Please update submodules and try again.")
endif()
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_definitions(-D__EXCEPTIONS) # lohmann_json: raise exceptions instead of exit
set(HEADERS
"headers/args.h"
"headers/avx512conv.h"
"headers/avxconv.h"
"headers/baseconv.h"
"headers/consts.h"
"headers/errors.h"
"headers/jsonargs.h"
"headers/log.h"
"headers/simpleconv.h"
"headers/sseconv.h"
"headers/utils.h"
)
set(SOURCES
"sources/args.cpp"
"sources/avx512conv.cpp"
"sources/avxconv.cpp"
"sources/baseconv.cpp"
"sources/jsonargs.cpp"
"sources/log.cpp"
"sources/main.cpp"
"sources/simpleconv.cpp"
"sources/sseconv.cpp"
"sources/utils.cpp"
)
set(JSON_BuildTests OFF CACHE INTERNAL "")
set(JSON_Install OFF CACHE INTERNAL "")
add_subdirectory(3rdparty/json EXCLUDE_FROM_ALL)
add_executable(${PROJECT_NAME} ${HEADERS} ${SOURCES})
target_link_libraries(${PROJECT_NAME} nlohmann_json::nlohmann_json)