Skip to content

Commit

Permalink
build BUGFIX add correct cmacka include paths for tests build
Browse files Browse the repository at this point in the history
In case cmocka is installed in a non standard/system path, it is
important to set it for the compiler
  • Loading branch information
rkrejci committed Jul 17, 2016
1 parent 397d92c commit 3a0cabb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ set(data_tests test_data_initialization test_leafref_remove test_instid_remove t
set(schema_yin_tests test_print_transform)
set(schema_tests test_ietf test_augment test_typedef test_import test_include)

include_directories(SYSTEM ${CMOCKA_INCLUDE_DIR})

foreach(test_name IN LISTS api_tests)
add_executable(${test_name} api/${test_name}.c)
target_link_libraries(${test_name} ${CMOCKA_LIBRARIES} yang)
Expand Down

0 comments on commit 3a0cabb

Please sign in to comment.