More Travis/Code coverage things
This commit is contained in:
parent
ff80e60879
commit
b0ed951235
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +1,6 @@
|
||||
[submodule "external/glfw"]
|
||||
path = external/glfw
|
||||
url = https://github.com/glfw/glfw.git
|
||||
[submodule "external/coveralls-cmake"]
|
||||
path = external/coveralls-cmake
|
||||
url = https://github.com/JoakimSoderberg/coveralls-cmake.git
|
||||
|
||||
@ -4,7 +4,7 @@ git:
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
script: mkdir build && cd build && cmake -DCOVERALLS=ON -DCMAKE_BUILD_TYPE=Debug .. && cmake --build . && cmake --build . --target coveralls
|
||||
script: mkdir build && cd build && cmake -DUSE_ALLEGRO=OFF -DUSE_PROFILING=ON -DCOVERALLS=ON -DCMAKE_BUILD_TYPE=Debug .. && cmake --build . && cmake --build . --target coveralls
|
||||
install: true
|
||||
|
||||
addons:
|
||||
|
||||
1
external/coveralls-cmake
vendored
Submodule
1
external/coveralls-cmake
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit e37d5b8674dab235185b07ad9208c88d84f81823
|
||||
@ -22,6 +22,8 @@ set(USE_PROFILING OFF CACHE BOOL "Use profiling tools? (Will slow down a lot.)")
|
||||
|
||||
set(USE_ALLEGRO ON CACHE BOOL "Use Allegro backend")
|
||||
|
||||
option(COVERALLS "Generate coveralls data" OFF)
|
||||
|
||||
##########################
|
||||
# Link & Compile flags
|
||||
##########################
|
||||
@ -29,6 +31,8 @@ set(USE_ALLEGRO ON CACHE BOOL "Use Allegro backend")
|
||||
set (CMAKE_C_FLAGS "-Wall -Wextra -Wno-unused-parameter -Werror ${PLATFORM_FLAGS}")
|
||||
set (CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Werror ${PLATFORM_FLAGS}")
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/external/coveralls-cmake/cmake)
|
||||
|
||||
add_definitions (-DNO_DECIMAL)
|
||||
|
||||
if (PPU_ISPAL)
|
||||
@ -59,6 +63,11 @@ if (USE_PROFILING)
|
||||
set(CMAKE_C_FLAGS -pg)
|
||||
endif (USE_PROFILING)
|
||||
|
||||
if (COVERALLS)
|
||||
include(Coveralls)
|
||||
coveralls_turn_on_coverage()
|
||||
endif()
|
||||
|
||||
include_directories(include)
|
||||
|
||||
add_subdirectory(apu)
|
||||
@ -79,5 +88,16 @@ endif (TARGET_TI68k)
|
||||
|
||||
find_library(PTHREADLIB pthread)
|
||||
|
||||
if (COVERALLS)
|
||||
set(COVERAGE_SRCS src/main.c src/paddle.c src/NESCarts.c ${COVERAGE_SRCS})
|
||||
|
||||
# Create the coveralls target.
|
||||
coveralls_setup(
|
||||
"${COVERAGE_SRCS}" # The source files.
|
||||
ON # If we should upload.
|
||||
) # (Optional) Alternate project cmake module path.
|
||||
endif()
|
||||
|
||||
|
||||
add_executable(tines main.c paddle.c NESCarts.c)
|
||||
target_link_libraries(tines apu corecpu mappermanager memorymanager pluginsmanager ppu oslib ${PTHREADLIB})
|
||||
target_link_libraries(tines apu corecpu mappermanager memorymanager pluginsmanager ppu oslib ${PTHREADLIB})
|
||||
|
||||
@ -9,4 +9,8 @@
|
||||
# $HeadURL$
|
||||
# $Revision$
|
||||
|
||||
add_library(corecpu corecpu.c)
|
||||
if (COVERALLS)
|
||||
set(COVERAGE_SRCS src/corecpu/corecpu.c ${COVERAGE_SRCS} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
add_library(corecpu corecpu.c)
|
||||
|
||||
@ -10,4 +10,9 @@
|
||||
# $Revision$
|
||||
|
||||
file(GLOB mappers_list mappers/*.c)
|
||||
add_library(mappermanager utils.c manager.c ${mappers_list} )
|
||||
|
||||
if (COVERALLS)
|
||||
set(COVERAGE_SRCS src/mappersmanager/manager.c src/mappersmanager/utils.c ${COVERAGE_SRCS} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
add_library(mappermanager utils.c manager.c ${mappers_list} )
|
||||
|
||||
@ -9,4 +9,8 @@
|
||||
# $HeadURL$
|
||||
# $Revision$
|
||||
|
||||
add_library(memorymanager memory.c)
|
||||
if (COVERALLS)
|
||||
set(COVERAGE_SRCS src/memorymanager/memory.c ${COVERAGE_SRCS} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
add_library(memorymanager memory.c)
|
||||
|
||||
@ -9,6 +9,11 @@
|
||||
# $HeadURL$
|
||||
# $Revision$
|
||||
|
||||
if (COVERALLS)
|
||||
set(COVERAGE_SRCS src/os/unix/loadfile.c src/os/unix/graphics.c src/os/unix/sound.c src/os/unix/io.c ${COVERAGE_SRCS} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
|
||||
add_library(oslib loadfile.c graphics.c sound.c io.c)
|
||||
|
||||
target_link_libraries(oslib glfw ${OPENGL_glu_LIBRARY} ${OPENGL_gl_LIBRARY})
|
||||
|
||||
@ -10,4 +10,9 @@
|
||||
# $Revision$
|
||||
|
||||
file(GLOB plugins_list plugins/*.c)
|
||||
add_library(pluginsmanager manager.c ${plugins_list})
|
||||
|
||||
if (COVERALLS)
|
||||
set(COVERAGE_SRCS src/pluginsmanager/manager.c ${COVERAGE_SRCS} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
add_library(pluginsmanager manager.c ${plugins_list})
|
||||
|
||||
@ -10,4 +10,10 @@
|
||||
# $Revision$
|
||||
|
||||
file(GLOB ppu_debug_list debug/*.c)
|
||||
add_library(ppu ppu.c ppu.memory.c ${ppu_debug_list})
|
||||
|
||||
if (COVERALLS)
|
||||
set(COVERAGE_SRCS src/ppu/ppu.c src/ppu/ppu.memory.c ${COVERAGE_SRCS} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
|
||||
add_library(ppu ppu.c ppu.memory.c ${ppu_debug_list})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user