-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
51 lines (38 loc) · 1.14 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
cmake_minimum_required(VERSION 3.21)
project(Processors CXX)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
option(PROCESSORS_BUILD_TESTS "Build tests for processors" ON)
include(FetchContent)
#set(FETCHCONTENT_FULLY_DISCONNECTED true)
if(PROCESSORS_BUILD_TESTS)
enable_testing()
FetchContent_Declare(googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG main
CMAKE_ARGS -Dgtest_force_shared_crt=ON -DCMAKE_CXX_STANDARD=23
)
FetchContent_Declare(json
GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG develop
)
FetchContent_MakeAvailable(googletest json)
endif()
FetchContent_Declare(fmtlib
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 10.1.1
)
FetchContent_MakeAvailable(fmtlib)
if(MSVC)
set(PROCESSORS_COMPILER_FLAGS
/Wall
/wd4100 /wd4514 /wd4710 /wd4820
/experimental:external /external:W0
)
else()
set(PROCESSORS_COMPILER_FLAGS
-Wall -Wextra -pedantic -Werror
-Wno-unused-parameter
)
endif()
add_subdirectory(M68000)