]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
change cmake function lower case tests
authorBastian Dehn <hhaalo@arcor.de>
Fri, 7 Nov 2025 14:38:04 +0000 (15:38 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Fri, 7 Nov 2025 14:39:18 +0000 (15:39 +0100)
tests/CMakeLists.txt

index ae17c712343e3649b32e4fe129209c8192a03d0a..91b690a7482748d4aae213345901366e22eae52d 100644 (file)
@@ -1,84 +1,84 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 3.25.1)
+cmake_minimum_required(VERSION 3.25.1)
 
-FIND_PACKAGE(CMOCKA REQUIRED)
-FIND_PROGRAM(CPPCHECK cppcheck REQUIRED)
+find_package(CMOCKA REQUIRED)
+find_program(CPPCHECK cppcheck REQUIRED)
 
-MESSAGE(STATUS "find ${CMOCKA_LIBRARY}")
-MESSAGE(STATUS "find ${CPPCHECK}")
+message(STATUS "find ${CMOCKA_LIBRARY}")
+message(STATUS "find ${CPPCHECK}")
 
-ADD_EXECUTABLE("kds_s2000w_net_get_opt_tests"
+add_executable("kds_s2000w_net_get_opt_tests"
        "kds_s2000w_net_get_opt_tests.c"
        "kds_s2000w_client_mock.c")
-ADD_DEPENDENCIES("kds_s2000w_net_get_opt_tests" sane-kds_s2000w_net-static)
-TARGET_LINK_LIBRARIES("kds_s2000w_net_get_opt_tests"
+add_dependencies("kds_s2000w_net_get_opt_tests" sane-kds_s2000w_net-static)
+target_link_libraries("kds_s2000w_net_get_opt_tests"
        ${CMOCKA_LIBRARY}
        sane-kds_s2000w_net-static)
 
-ADD_EXECUTABLE("kds_s2000w_net_set_opt_tests"
+add_executable("kds_s2000w_net_set_opt_tests"
        "kds_s2000w_net_set_opt_tests.c"
        "kds_s2000w_client_mock.c")
-ADD_DEPENDENCIES("kds_s2000w_net_set_opt_tests" sane-kds_s2000w_net-static)
-TARGET_LINK_LIBRARIES("kds_s2000w_net_set_opt_tests"
+add_dependencies("kds_s2000w_net_set_opt_tests" sane-kds_s2000w_net-static)
+target_link_libraries("kds_s2000w_net_set_opt_tests"
        ${CMOCKA_LIBRARY}
        sane-kds_s2000w_net-static)
 
-ADD_EXECUTABLE("kds_s2000w_net_read_tests"
+add_executable("kds_s2000w_net_read_tests"
        "kds_s2000w_net_read_tests.c"
        "kds_s2000w_client_mock.c")
-ADD_DEPENDENCIES("kds_s2000w_net_read_tests" sane-kds_s2000w_net-static)
-TARGET_LINK_LIBRARIES("kds_s2000w_net_read_tests"
+add_dependencies("kds_s2000w_net_read_tests" sane-kds_s2000w_net-static)
+target_link_libraries("kds_s2000w_net_read_tests"
        ${CMOCKA_LIBRARY}
        sane-kds_s2000w_net-static)
 
-ADD_EXECUTABLE("kds_s2000w_net_tests"
+add_executable("kds_s2000w_net_tests"
        "kds_s2000w_net_tests.c"
        "kds_s2000w_client_mock.c")
-ADD_DEPENDENCIES("kds_s2000w_net_tests" sane-kds_s2000w_net-static)
-TARGET_LINK_LIBRARIES("kds_s2000w_net_tests"
+add_dependencies("kds_s2000w_net_tests" sane-kds_s2000w_net-static)
+target_link_libraries("kds_s2000w_net_tests"
        ${CMOCKA_LIBRARY}
        sane-kds_s2000w_net-static)
 
-ADD_EXECUTABLE("kds_s2000w_read_config_tests"
+add_executable("kds_s2000w_read_config_tests"
        "kds_s2000w_read_config_tests.c"
        "kds_s2000w_client_mock.c")
-ADD_DEPENDENCIES("kds_s2000w_read_config_tests" sane-kds_s2000w_net-static)
-TARGET_LINK_LIBRARIES("kds_s2000w_read_config_tests"
+add_dependencies("kds_s2000w_read_config_tests" sane-kds_s2000w_net-static)
+target_link_libraries("kds_s2000w_read_config_tests"
        ${CMOCKA_LIBRARY}
        sane-kds_s2000w_net-static)
 
-ADD_EXECUTABLE("kds_s2000w_image_converter_tests"
+add_executable("kds_s2000w_image_converter_tests"
        "kds_s2000w_image_converter_tests.c"
        "kds_s2000w_client_mock.c")
-ADD_DEPENDENCIES("kds_s2000w_image_converter_tests" sane-kds_s2000w_net-static)
-TARGET_LINK_LIBRARIES("kds_s2000w_image_converter_tests"
+add_dependencies("kds_s2000w_image_converter_tests" sane-kds_s2000w_net-static)
+target_link_libraries("kds_s2000w_image_converter_tests"
        ${CMOCKA_LIBRARY}
        sane-kds_s2000w_net-static)
 
-ADD_EXECUTABLE("kds_s2000w_option_descriptor_tests"
+add_executable("kds_s2000w_option_descriptor_tests"
        "kds_s2000w_option_descriptor_tests.c"
        "kds_s2000w_client_mock.c")
-ADD_DEPENDENCIES("kds_s2000w_option_descriptor_tests" sane-kds_s2000w_net-static)
-TARGET_LINK_LIBRARIES("kds_s2000w_option_descriptor_tests"
+add_dependencies("kds_s2000w_option_descriptor_tests" sane-kds_s2000w_net-static)
+target_link_libraries("kds_s2000w_option_descriptor_tests"
        ${CMOCKA_LIBRARY}
        sane-kds_s2000w_net-static)
 
-ADD_EXECUTABLE("kds_s2000w_image_type_check_tests"
+add_executable("kds_s2000w_image_type_check_tests"
        "kds_s2000w_image_type_check_tests.c"
        "kds_s2000w_client_mock.c")
-ADD_DEPENDENCIES("kds_s2000w_image_type_check_tests" sane-kds_s2000w_net-static)
-TARGET_LINK_LIBRARIES("kds_s2000w_image_type_check_tests"
+add_dependencies("kds_s2000w_image_type_check_tests" sane-kds_s2000w_net-static)
+target_link_libraries("kds_s2000w_image_type_check_tests"
        ${CMOCKA_LIBRARY}
        sane-kds_s2000w_net-static)
 
-ADD_EXECUTABLE("kds_s2000w_pixel_converter_tests"
+add_executable("kds_s2000w_pixel_converter_tests"
        "kds_s2000w_pixel_converter_tests.c"
        "kds_s2000w_client_mock.c")
-ADD_DEPENDENCIES("kds_s2000w_pixel_converter_tests" sane-kds_s2000w_net-static)
-TARGET_LINK_LIBRARIES("kds_s2000w_pixel_converter_tests"
+add_dependencies("kds_s2000w_pixel_converter_tests" sane-kds_s2000w_net-static)
+target_link_libraries("kds_s2000w_pixel_converter_tests"
        ${CMOCKA_LIBRARY}
        sane-kds_s2000w_net-static)
 
-ADD_CUSTOM_TARGET("runningtests"
+add_custom_target("runningtests"
        ALL ./kds_s2000w_read_config_tests
        COMMAND ./kds_s2000w_option_descriptor_tests
        COMMAND ./kds_s2000w_net_get_opt_tests
@@ -99,7 +99,7 @@ ADD_CUSTOM_TARGET("runningtests"
        "kds_s2000w_image_converter_tests"
        "kds_s2000w_pixel_converter_tests")
 
-ADD_CUSTOM_TARGET("cppcheck"
+add_custom_target("cppcheck"
        ALL ${CPPCHECK} --check-level=exhaustive
                --enable=warning,style
                --inline-suppr
@@ -108,11 +108,11 @@ ADD_CUSTOM_TARGET("cppcheck"
                ${CMAKE_SOURCE_DIR}/tests
        DEPENDS runningtests)
 
-ADD_CUSTOM_TARGET("generate_gcov_coverage"
+add_custom_target("generate_gcov_coverage"
        ALL gcov ${CMAKE_BINARY_DIR}/src/CMakeFiles/sane-kds_s2000w_net-static.dir/*.c.o
        DEPENDS "runningtests")
 
-ADD_CUSTOM_TARGET("generate_lcov_coverage"
+add_custom_target("generate_lcov_coverage"
        ALL lcov --capture
                --directory ${CMAKE_BINARY_DIR}/src/CMakeFiles/sane-kds_s2000w_net-static.dir
                --exclude "include*"
@@ -123,6 +123,6 @@ ADD_CUSTOM_TARGET("generate_lcov_coverage"
                --output-file ${CMAKE_BINARY_DIR}/coverage.info
        DEPENDS "generate_gcov_coverage")
 
-ADD_CUSTOM_TARGET("generate_html_coverage"
+add_custom_target("generate_html_coverage"
        ALL genhtml ${CMAKE_BINARY_DIR}/coverage.info --output-directory ${CMAKE_BINARY_DIR}/coverage
        DEPENDS "generate_lcov_coverage")
\ No newline at end of file