summaryrefslogtreecommitdiff
path: root/lib9p/CMakeLists.txt
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-17 02:49:53 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-17 12:24:46 -0600
commit5c4004ff3bd66306e03579f6ee350b3517aa4ea9 (patch)
tree18ee437f386ee581e50fffb8398905bf295d8eaf /lib9p/CMakeLists.txt
parent0cf05b66f94bfe02ecca37a4cbafba25b27c32ae (diff)
lib9p: Check that we compile for the whole the matrix of "enable"-toggles
Diffstat (limited to 'lib9p/CMakeLists.txt')
-rw-r--r--lib9p/CMakeLists.txt18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib9p/CMakeLists.txt b/lib9p/CMakeLists.txt
index 543d01a..4e445c4 100644
--- a/lib9p/CMakeLists.txt
+++ b/lib9p/CMakeLists.txt
@@ -50,6 +50,20 @@ if (ENABLE_TESTS)
add_lib9p_executable("testclient-sess")
add_lib9p_test("./testclient-sess")
- add_lib_test(lib9p_core test_compile)
- target_include_directories(test_compile PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_compile_config)
+ set(cfg_matrix
+ "CONFIG_9P_SRV_DEBUG;[0;1]"
+ "CONFIG_9P_ENABLE_9P2000;[1]" # XXX
+ "CONFIG_9P_ENABLE_9P2000_u;[0;1]"
+ "CONFIG_9P_ENABLE_9P2000_e;[0;1]"
+ "CONFIG_9P_ENABLE_9P2000_L;[0;1]"
+ "CONFIG_9P_ENABLE_9P2000_p9p;[0;1]"
+ )
+ function(add_compile_test n defs)
+ add_executable("test_compile${n}" "tests/test_compile.c")
+ target_link_libraries("test_compile${n}" lib9p_srv)
+ target_include_directories("test_compile${n}" PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_compile_config)
+ target_compile_definitions("test_compile${n}" PUBLIC "${defs}")
+ # Don't bother running it (don't bother calling add_test())
+ endfunction()
+ apply_matrix(add_compile_test "${cfg_matrix}")
endif()