Skip to content

Commit

Permalink
Change project name, build tool/tests only if top-level
Browse files Browse the repository at this point in the history
  • Loading branch information
kauwua committed Nov 27, 2023
1 parent e39b87b commit cb95ad7
Showing 1 changed file with 9 additions and 7 deletions.
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()

0 comments on commit cb95ad7

Please sign in to comment.