Skip to content

Commit

Permalink
Fixt the position of the add_subdirectory(test).
Browse files Browse the repository at this point in the history
It should be after the project name settings.
  • Loading branch information
suikan4github committed Oct 25, 2024
1 parent 42d961e commit e3ec51e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ if( ${FOUNDPOS} GREATER "-1") # If yes, it is pico

# initialize the Raspberry Pi Pico SDK
pico_sdk_init()
else() # WIN32 or Unix
message(STATUS "Target is Windows or Linux")

# Unit test.
add_subdirectory("test")

endif() # string(FIND CMAKE_CXX_COMPILER "arm-none-eabi") GREATER_EQUAL 0

# Pico SDK requires the project name must be set after
Expand All @@ -41,6 +35,14 @@ endif() # string(FIND CMAKE_CXX_COMPILER "arm-none-eabi") GREATER_EQUAL 0
# So, we delcare here.
project("app")

if( ${FOUNDPOS} LESS "0") # If yes, it is Windows or Linux
message(STATUS "Target is Windows or Linux")

# Unit test.
add_subdirectory("test")

endif() # string(FIND CMAKE_CXX_COMPILER "arm-none-eabi") GREATER_EQUAL 0


# Subdirectories
add_subdirectory("src")
Expand Down

0 comments on commit e3ec51e

Please sign in to comment.