JonMagon / KDiskMark

A simple open-source disk benchmark tool for Linux distros
GNU General Public License v3.0
1.07k stars 43 forks source link

configure error #100

Open johndoe71rus opened 2 years ago

johndoe71rus commented 2 years ago

Description:

cmake config error

~/build/KDiskMark/KDiskMark/build$ cmake -D CMAKE_BUILD_TYPE=Release .. -- The CXX compiler identification is GNU 9.4.0 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at CMakeLists.txt:50 (include): include could not find load file:

ECMConfiguredInstall

-- Installing in the same prefix as Qt, adopting their path scheme. CMake Error at CMakeLists.txt:149 (ecm_install_configured_files): Unknown CMake command "ecm_install_configured_files".

-- Configuring incomplete, errors occurred! See also "/home/johndoe/build/KDiskMark/KDiskMark/build/CMakeFiles/CMakeOutput.log".

cmake-extras 1.5-1 extra-cmake-modules 5.68.0-0ubuntu1 installed

last time successful build kdiskmark_2.3.0

Steps To Reproduce:

JonMagon commented 2 years ago

Please note the dependencies: ECM >= 5.73 It's bizarre that Ubuntu (Focal) has the 5.68 upper limit of the ECM version. As a workaround I can suggest this way:

@@ -47,7 +47,6 @@
 include(CPack)
 include(GNUInstallDirs)
 include(ECMInstallIcons)
-include(ECMConfiguredInstall)
 include(KDEInstallDirs)

 find_package(PolkitQt5-1 REQUIRED)
@@ -146,7 +145,10 @@
 install(FILES data/dev.jonmagon.kdiskmark.helperinterface.conf DESTINATION ${KDE_INSTALL_DBUSDIR}/system.d)

 install(FILES data/dev.jonmagon.kdiskmark.helper.policy DESTINATION ${POLKITQT-1_POLICY_FILES_INSTALL_DIR})
-ecm_install_configured_files(
-    INPUT data/dev.jonmagon.kdiskmark.helperinterface.service.in
-    DESTINATION ${KDE_INSTALL_DBUSDIR}/system-services
-)
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dev.jonmagon.kdiskmark.helperinterface.service
+"[D-BUS Service]
+Name=dev.jonmagon.kdiskmark.helperinterface
+Exec=${KDE_INSTALL_FULL_LIBEXECDIR}/kdiskmark_helper
+User=root
+")
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dev.jonmagon.kdiskmark.helperinterface.service DESTINATION ${KDE_INSTALL_DBUSDIR}/system-services)

Actually, I would like to keep it as it is now using ECMConfiguredInstall.

johndoe71rus commented 2 years ago

thanks. workaround is work. `~/build/KDiskMark/KDiskMark/build$ cmake -D CMAKE_BUILD_TYPE=Release .. -- The CXX compiler identification is GNU 9.4.0 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Installing in the same prefix as Qt, adopting their path scheme. -- Configuring done CMake Warning (dev) in CMakeLists.txt: Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED files. Run "cmake --help-policy CMP0071" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

For compatibility, CMake is excluding the GENERATED source file(s):

"/home/johndoe/build/KDiskMark/KDiskMark/build/helper_interface.cpp"
"/home/johndoe/build/KDiskMark/KDiskMark/build/helper_interface.h"

from processing by AUTOMOC and AUTOUIC. If any of the files should be processed, set CMP0071 to NEW. If any of the files should not be processed, explicitly exclude them by setting the source file property SKIP_AUTOGEN:

set_property(SOURCE file.h PROPERTY SKIP_AUTOGEN ON)

This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done -- Build files have been written to: /home/johndoe/build/KDiskMark/KDiskMark/build

~/build/KDiskMark/KDiskMark/build$ cpack -G DEB CPack: Create package using DEB CPack: Install projects CPack: - Run preinstall target for: kdiskmark CPack: - Install project: kdiskmark [] CPack: Create package CPackDeb: - Generating dependency list CPack: - package: /home/johndoe/build/KDiskMark/KDiskMark/build/kdiskmark_3.1.2_amd64.deb generated.`