Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change project name, build tool/tests only if top-level #2

Merged
merged 1 commit into from
Nov 27, 2023
Merged
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
16 changes: 9 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.17)
project(hydradancer LANGUAGES C ASM)
project(wch-ch56x-lib LANGUAGES C ASM)

## Adding lwrb, setting compiler options

Expand Down Expand Up @@ -69,15 +69,17 @@ target_include_directories(nanoprintf INTERFACE ${CMAKE_CURRENT_LIST_DIR}/submod

add_subdirectory(src)

if (PROJECT_IS_TOP_LEVEL)
## Adding the tests
if (DEFINED BUILD_TESTS)
add_subdirectory(tests)
endif()

if (DEFINED BUILD_TESTS)
add_subdirectory(tests)
endif()
## Adding tools

## Adding tools
if (DEFINED BUILD_TOOLS)
add_subdirectory(tools/firmware_debug_board)
endif()

if (DEFINED BUILD_TOOLS)
add_subdirectory(tools/firmware_debug_board)
endif()