forked from lefticus/6502-cpp
-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
33 lines (24 loc) · 940 Bytes
/
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
cmake_minimum_required(VERSION 3.10)
project(x86-to-6502)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}")
set(CMAKE_CXX_STANDARD 17)
# Create compile_commands.json when possible, which can be used for
# analysis tools.
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Enable project folders/grouping in IDE solution files like Visual Studio.
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
include(CTest)
enable_testing()
if (MSVC)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10)
message(FATAL_ERROR "Requires Visual Studio 2017 or higher!")
endif ()
add_definitions(/WX /std:c++latest /permissive-)
endif ()
if(CMAKE_COMPILER_IS_GNUCC)
add_definitions(-Wall -Wextra -Wconversion -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wcast-qual -Wunused -Woverloaded-virtual -pedantic)
endif()
add_subdirectory(dep/googletest)
add_subdirectory(libca)
add_subdirectory(targets)
add_subdirectory(x86-to-6502)