From 10dee5131d940316cf0136516013e2ed3aeee012 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Sun, 17 Oct 2021 12:10:36 +0200 Subject: Demonstrate build failure with kconfig generated code --- autotests/kconfig_compiler/CMakeLists.txt | 8 +++++++ .../test_enums_and_properties.kcfg | 25 ++++++++++++++++++++++ .../test_enums_and_properties.kcfgc | 4 ++++ 3 files changed, 37 insertions(+) create mode 100644 autotests/kconfig_compiler/test_enums_and_properties.kcfg create mode 100644 autotests/kconfig_compiler/test_enums_and_properties.kcfgc diff --git a/autotests/kconfig_compiler/CMakeLists.txt b/autotests/kconfig_compiler/CMakeLists.txt index 4641c0e0..4778de48 100644 --- a/autotests/kconfig_compiler/CMakeLists.txt +++ b/autotests/kconfig_compiler/CMakeLists.txt @@ -303,3 +303,11 @@ gen_kcfg_test_source(test_fileextensions test_fileextensions_SRCS) ecm_add_test(TEST_NAME test_fileextensions ${test_fileextensions_SRCS}) target_link_libraries(test_fileextensions KF5::ConfigGui) + + +####### next target ########## +## This test fails the compilation - to showcase that the generated code is broken. +set(test_enums_and_properties_SRCS test10main.cpp) +gen_kcfg_test_source(test_enums_and_properties test_enums_and_properties_SRCS GENERATE_MOC) +add_library(test_enums_and_properties ${test_enums_and_properties_SRCS}) +target_link_libraries(test_enums_and_properties KF5::ConfigGui) diff --git a/autotests/kconfig_compiler/test_enums_and_properties.kcfg b/autotests/kconfig_compiler/test_enums_and_properties.kcfg new file mode 100644 index 00000000..8ce6a41b --- /dev/null +++ b/autotests/kconfig_compiler/test_enums_and_properties.kcfg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + 0 + + + diff --git a/autotests/kconfig_compiler/test_enums_and_properties.kcfgc b/autotests/kconfig_compiler/test_enums_and_properties.kcfgc new file mode 100644 index 00000000..7df2cf27 --- /dev/null +++ b/autotests/kconfig_compiler/test_enums_and_properties.kcfgc @@ -0,0 +1,4 @@ +File=test_enums_and_properties.kcfg +ClassName=TestEnumsAndProperties +GenerateProperties=true +Mutators=true -- cgit v1.2.1