Skip to content

Commit

Permalink
cmake: silence "WARNING: ASSERTs enabled" when CONFIG_TEST is true
Browse files Browse the repository at this point in the history
TEST configurations don't need to be warned that they're using test
techniques with some side-effects.

On a typical sanitycheck invocation, this warning is one of the only two
that appears in most test runs. In other words this commit gets rid of
half of the entire grep -ri '[[:blank:]]warn' noise that obscures any
work-in-progress warnings or platform specific warnings in the
logs (typically: device tree warnings).

Signed-off-by: Marc Herbert <[email protected]>
  • Loading branch information
marc-hb authored and nashif committed Jun 18, 2019
1 parent 09821e5 commit 8372310
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1396,6 +1396,7 @@ add_subdirectory(cmake/flash)
add_subdirectory(cmake/usage)
add_subdirectory(cmake/reports)

if(NOT CONFIG_TEST)
if(CONFIG_ASSERT AND (NOT CONFIG_FORCE_NO_ASSERT))
message(WARNING "
------------------------------------------------------------
Expand All @@ -1404,6 +1405,7 @@ if(CONFIG_ASSERT AND (NOT CONFIG_FORCE_NO_ASSERT))
------------------------------------------------------------"
)
endif()
endif()

if(CONFIG_BOARD_DEPRECATED)
message(WARNING "
Expand Down

0 comments on commit 8372310

Please sign in to comment.