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
10 changes: 4 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.10 FATAL_ERROR)

project(unboxing C)

option(UNBOXING_TESTS "Build tests" ${PROJECT_IS_TOP_LEVEL})

if(WIN32)
set(WARNINGS /MP)
elseif(APPLE)
Expand Down Expand Up @@ -118,11 +120,7 @@ set_target_properties(testutils unboxing PROPERTIES
C_STANDARD_REQUIRED ON
)

if(PROJECT_IS_TOP_LEVEL)
set(BUILD_TESTING ON)
endif()

if(BUILD_TESTING)
if(UNBOXING_TESTS)
enable_testing()

add_executable(static_unboxer tests/static_unboxer/main.c)
Expand Down Expand Up @@ -183,6 +181,6 @@ if(BUILD_TESTING)
COMMAND doxygen doxygen.dox
DEPENDS doxygen.dox
)
add_custom_target(doxygen ALL DEPENDS doc/html/index.html)
add_custom_target(unboxing_doxygen ALL DEPENDS doc/html/index.html)
endif()
endif()
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ cmake --build build -j
ctest -j4 --test-dir build
```

Note: If don't want to compile with tests, run: `cmake -Bbuild -DBUILD_TESTING=OFF` in the configure stage. In this case `doxygen` is not needed as a dependency.

## iVM

The iVM virtual machine is a minimal execution environment for file format
Expand Down