-
Notifications
You must be signed in to change notification settings - Fork 26
/
CMakeLists.txt
22 lines (14 loc) · 731 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
cmake_minimum_required(VERSION 3.10)
project(beebasm LANGUAGES CXX)
add_compile_options(-Wall -W -Wcast-qual -Wshadow -Wcast-align -Wold-style-cast -Woverloaded-virtual)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Existing Makefile does a glob to find source files, so we do the same.
FILE(GLOB CPPSources src/*.cpp)
add_executable(beebasm ${CPPSources})
target_link_libraries(beebasm stdc++ m)
install(TARGETS beebasm DESTINATION bin)
install(FILES ${CMAKE_SOURCE_DIR}/beebasm.1 DESTINATION share/man/man1)
enable_testing()
add_test(NAME Runs COMMAND ./beebasm -i ${CMAKE_SOURCE_DIR}/demo.6502 -do demo.ssd -boot Code -v)
add_test(NAME Tests COMMAND python3 ${CMAKE_SOURCE_DIR}/test/testrunner.py -v)