-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
32 lines (27 loc) · 818 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
32 lines (27 loc) · 818 Bytes
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
cmake_minimum_required(VERSION 3.22)
project("CoreMarkCpp")
set(THIS CoreMarkCpp)
set(CMAKE_CXX_STANDARD 20)
set(SOURCES
"CoreListJoin.cpp"
"CoreMain.cpp"
"CoreMatrix.cpp"
"CoreState.cpp"
"CoreTime.cpp"
"CoreUtil.cpp"
)
set(HEADERS
"CoreListJoin.h"
"CoreMatrix.h"
"CoreState.h"
"CoreTime.h"
"CoreUtil.h"
)
add_executable(${THIS} ${SOURCES} ${HEADERS})
if(MSVC)
target_compile_options(${THIS} PRIVATE /MP /permissive- /W4 $<$<CONFIG:Release>:/GF /GL /Gy>)
target_link_options(${THIS} PRIVATE $<$<CONFIG:Release>:/LTCG /OPT:ICF /OPT:REF>)
else()
target_compile_options(${THIS} PRIVATE -Wall -Wextra -Wpedantic $<$<CONFIG:Release>:-fdata-sections -ffunction-sections>)
target_link_options(${THIS} PRIVATE $<$<CONFIG:Release>:-static-libgcc -static-libstdc++ -Wl,--gc-sections>)
endif()