compat BUILD provide source instead of an object

Because it allows for hiding its symbols.
diff --git a/tests/style/CMakeLists.txt b/tests/style/CMakeLists.txt
index 05c09ce..dd4285e 100644
--- a/tests/style/CMakeLists.txt
+++ b/tests/style/CMakeLists.txt
@@ -6,7 +6,7 @@
 endif()
 
 # just compile
-add_executable(cpp_compat cpp_compat.c $<TARGET_OBJECTS:yangobj> $<TARGET_OBJECTS:compat>)
+add_executable(cpp_compat cpp_compat.c $<TARGET_OBJECTS:yangobj>)
 target_include_directories(cpp_compat BEFORE PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
 target_link_libraries(cpp_compat ${CMAKE_THREAD_LIBS_INIT} ${PCRE2_LIBRARIES} ${CMAKE_DL_LIBS} m)
 target_compile_options(cpp_compat PUBLIC "-Werror=c++-compat")