From 3dac2f1b03da052da3565005b61dedf5c8d27348 Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Thu, 22 Feb 2024 15:08:15 -0500 Subject: [PATCH] Fix unused variable warnings when building tests in plugin mode --- test/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2502a1d..bc7d649 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -15,8 +15,13 @@ macro(c2py_add_test_1 modulename module_extension) endmacro() macro(c2py_add_test modulename) - c2py_add_test_1(${modulename} $,cpp,wrap.cxx>) - target_link_libraries(${modulename} PRIVATE $) + if(IS_CLAIR_BUILD) + c2py_add_test_1(${modulename} cpp) + target_link_libraries(${modulename} PRIVATE clair::c2py_plugin) + target_compile_options(${modulename} PRIVATE -Wno-unused-const-variable -Wno-unused-variable) + else() + c2py_add_test_1(${modulename} wrap.cxx) + endif() endmacro() #--------------------------------------------------------