diff --git a/CMakeLists.txt b/CMakeLists.txt index 674f149c1..48c2a1e26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,10 +99,13 @@ file(GLOB LIB_SRC "./src/linux/linux_platform.cpp" ) +# If VERIFIER_ENABLE_TESTS is disabled, remove ebpf_yaml.cpp from the list of sources +if (NOT VERIFIER_ENABLE_TESTS) + list(REMOVE_ITEM LIB_SRC "./src/ebpf_yaml.cpp") +endif () + if(VERIFIER_ENABLE_TESTS) file(GLOB ALL_TEST - "src/test/ebpf_yaml.hpp" - "src/test/ebpf_yaml.hpp" "./src/test/test_conformance.cpp" "./src/test/test_marshal.cpp" "./src/test/test_print.cpp" diff --git a/src/test/ebpf_yaml.cpp b/src/ebpf_yaml.cpp similarity index 100% rename from src/test/ebpf_yaml.cpp rename to src/ebpf_yaml.cpp diff --git a/src/test/ebpf_yaml.hpp b/src/ebpf_yaml.hpp similarity index 100% rename from src/test/ebpf_yaml.hpp rename to src/ebpf_yaml.hpp