Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 8 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
option(JUNO_TESTS "Enable unit testing" OFF)
option(JUNO_COVERAGE "Compile Juno with code coverage" ON)
option(JUNO_POSIX "Enable posix" OFF)
option(JUNO_DOCS "Enable doxygen docs" OFF)
option(JUNO_PIC "Compile Juno with Position Independent Code" ON)
Expand Down Expand Up @@ -47,7 +48,13 @@ set(JUNO_COMPILE_OPTIONS
if(JUNO_PIC)
list(APPEND JUNO_COMPILE_OPTIONS -fPIC)
endif()

if(JUNO_COVERAGE)
list(APPEND JUNO_COMPILE_OPTIONS
--coverage
-g
)
link_libraries(gcov)
endif()

set(JUNO_LIBS ${PROJECT_NAME})
foreach(file ${JUNO_SRCS})
Expand Down Expand Up @@ -101,21 +108,6 @@ install(

if(JUNO_TESTS)
set(CMAKE_BUILD_TYPE Debug)
link_libraries(
gcov
)
target_compile_options(${PROJECT_NAME} PRIVATE
--coverage
-g
-O0
)
target_link_libraries(${PROJECT_NAME} PRIVATE gcov)
target_compile_options(${JUNO_SHARED_TARGET} PRIVATE
--coverage
-g
-O0
)
target_link_libraries(${JUNO_SHARED_TARGET} PRIVATE gcov)
enable_testing()
add_library(unity ${juno_SOURCE_DIR}/deps/unity/src/unity.c)
target_include_directories(unity PUBLIC ${juno_SOURCE_DIR}/deps/unity/src)
Expand Down
2 changes: 1 addition & 1 deletion include/juno/crc/crc.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
*/
#ifndef JUNO_CRC_H
#define JUNO_CRC_H
#include <stdio.h>
#ifdef __cplusplus
extern "C"
{
#endif
#include <stddef.h>
#include <stdint.h>
#define M1_16 0xff
#define M2_16 0xff00
Expand Down
1 change: 0 additions & 1 deletion src/crc/juno_arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
#include "juno/crc/crc.h"
#include <stdint.h>
#include <stdio.h>
#include "arc.h"

uint16_t Juno_CrcArcUpdate(uint16_t iCrc, const void *pcData, size_t zDataSize)
Expand Down
1 change: 0 additions & 1 deletion src/crc/juno_binhex.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
#include "juno/crc/crc.h"
#include <stdint.h>
#include <stdio.h>
#include "binhex.h"

uint16_t Juno_CrcBinhexUpdate(uint16_t iCrc, const void *pcData, size_t zDataSize)
Expand Down
1 change: 0 additions & 1 deletion src/crc/juno_ccitt.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
#include "juno/crc/crc.h"
#include <stdint.h>
#include <stdio.h>
#include "ccitt.h"

uint16_t Juno_CrcCcittUpdate(uint16_t iCrc, const void *pcData, size_t zDataSize)
Expand Down
1 change: 0 additions & 1 deletion src/crc/juno_ccitt32.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
#include "juno/crc/crc.h"
#include "ccitt32.h"
#include <stdio.h>

uint32_t Juno_CrcCcitt32Update(uint32_t iCrc, const void *pcData, size_t zDataSize)
{
Expand Down
1 change: 0 additions & 1 deletion src/crc/juno_kermit.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
#include "juno/crc/crc.h"
#include <stdint.h>
#include <stdio.h>
#include "kermit.h"

uint32_t Juno_CrcKermitUpdate(uint32_t iCrc, const void *pcData, size_t zDataSize)
Expand Down
1 change: 0 additions & 1 deletion src/crc/juno_zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
included in all copies or substantial portions of the Software.
*/
#include "juno/crc/crc.h"
#include <stdio.h>
#include "zip.h"

uint32_t Juno_CrcZipUpdate(uint32_t iCrc, const void *pcData, size_t zDataSize)
Expand Down