| 1 |
# This subdirectory verifies that the user level api compiles using |
| 2 |
# only the publiced includes by compiling test files refering to that |
| 3 |
# api. Goal is to reference, and thus verify, the whole api so that |
| 4 |
# unintended changes to the API gets noticed early. |
| 5 |
# |
| 6 |
# There is no need to run the tests... |
| 7 |
|
| 8 |
include_directories(${CGREEN_PUBLIC_INCLUDE_DIRS}) |
| 9 |
|
| 10 |
set(api_SRCS |
| 11 |
core_api.c |
| 12 |
suites_without_context_api.c |
| 13 |
suites_with_context_api.c |
| 14 |
) |
| 15 |
|
| 16 |
set(CGREEN_API_TEST_LIBRARY |
| 17 |
cgreen_api |
| 18 |
CACHE INTERNAL "cgreen library of user level api verification source" |
| 19 |
) |
| 20 |
|
| 21 |
add_library(${CGREEN_API_TEST_LIBRARY} SHARED ${api_SRCS}) |
| 22 |
|
| 23 |
target_link_libraries(${CGREEN_API_TEST_LIBRARY} ${CGREEN_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) |
| 24 |
|
| 25 |
#macro_add_test(NAME api_compilation_test |
| 26 |
# COMMAND ${PROJECT_SOURCE_DIR}/tools/compare_test_output_to_expected |
| 27 |
# ${PROJECT_BINARY_DIR}/tools # Where is cgreen-runner? |
| 28 |
# $<TARGET_FILE_NAME:${CGREEN_API_TEST_LIBRARY}> # Library to run |
| 29 |
# ${PROJECT_SOURCE_DIR} # Remove lines with these from output |
| 30 |
# ${CGREEN_API_TEST_LIBRARY} # Normalized library name |
| 31 |
# ${CMAKE_CURRENT_SOURCE_DIR}) # Where is the expected output? |