Skip to contentSkip to conversation

kernelshark: generate header file in the build directory

PATCH In review Mircea Cirjaliu 2 participants 2 messages Oct 24, 2025 – Oct 27, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 kernelshark: generate header file in the build directory

Mixing versioned and generated files will bloat git listings. Put KsCmakeDef.hpp together with the rest of the generated files.

---
 CMakeLists.txt       | 4 ++--
 build/cmake_clean.sh | 2 +-
 src/CMakeLists.txt   | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
CMakeLists.txt +2 -2
index 54ff97c..84215dd 100644
@@ -129,7 +129,7 @@ else (CMAKE_BUILD_TYPE MATCHES Package)
 endif (CMAKE_BUILD_TYPE MATCHES Package)
 
 include_directories(${KS_DIR}/src/
-                    ${KS_DIR}/build/src/)
+                    ${KS_DIR}/build/include/)
 
 message("")
 message(STATUS "C flags      : " ${CMAKE_C_FLAGS})
@@ -163,7 +163,7 @@ if (_DOXYGEN_DOC AND DOXYGEN_FOUND)
 endif ()
 
 configure_file(${KS_DIR}/build/deff.h.cmake
-               ${KS_DIR}/src/KsCmakeDef.hpp)
+               ${KS_DIR}/build/include/KsCmakeDef.hpp)
 
 configure_file(${KS_DIR}/build/ks.desktop.cmake
                ${KS_DIR}/${KS_APP_NAME}.desktop)
build/cmake_clean.sh +1 -1
index 67afd6c..2c05d3e 100755
@@ -6,6 +6,7 @@ rm -f CTestTestfile.cmake
 rm -f DartConfiguration.tcl
 rm -rf CMakeFiles/
 rm -rf src/
+rm -rf include/
 rm -rf examples/
 rm -rf tests/
 rm -rf Testing/
@@ -14,7 +15,6 @@ rm -f ../lib/*
 rm ../kernelshark.desktop
 rm ../libkshark.pc
 rm ../org.freedesktop.kshark-record.policy
-rm -f ../src/KsCmakeDef.hpp
 rm -f CMakeDoxyfile.in
 rm -f CMakeDoxygenDefaults.cmake
 rm -rf .qt/
src/CMakeLists.txt +1 -1
index 0643365..da31f8d 100644
@@ -71,7 +71,7 @@ if (OPENGL_FOUND)
                   "${KS_DIR}/src/libkshark-plot.h"
                   "${KS_DIR}/src/KsPlotTools.hpp"
                   "${KS_DIR}/src/KsPlugins.hpp"
-                  "${KS_DIR}/src/KsCmakeDef.hpp"
+                  "${KS_DIR}/build/include/KsCmakeDef.hpp"
             DESTINATION ${KS_INCLUDS_DESTINATION}
                 COMPONENT libkshark-devel)
 
Signature · 1 line
2.43.0
#2 lore raw

The patch is applied. Thanks!

Yordan

Quoted 65 lines · Mircea Cirjaliu

Mixing versioned and generated files will bloat git listings. Put KsCmakeDef.hpp together with the rest of the generated files.

---
  CMakeLists.txt       | 4 ++--
  build/cmake_clean.sh | 2 +-
  src/CMakeLists.txt   | 2 +-
  3 files changed, 4 insertions(+), 4 deletions(-)
CMakeLists.txt +2 -2
index 54ff97c..84215dd 100644
@@ -129,7 +129,7 @@ else (CMAKE_BUILD_TYPE MATCHES Package)
  endif (CMAKE_BUILD_TYPE MATCHES Package)
 
  include_directories(${KS_DIR}/src/
-                    ${KS_DIR}/build/src/)
+                    ${KS_DIR}/build/include/)
 
  message("")
  message(STATUS "C flags      : " ${CMAKE_C_FLAGS})
@@ -163,7 +163,7 @@ if (_DOXYGEN_DOC AND DOXYGEN_FOUND)
  endif ()
 
  configure_file(${KS_DIR}/build/deff.h.cmake
-               ${KS_DIR}/src/KsCmakeDef.hpp)
+               ${KS_DIR}/build/include/KsCmakeDef.hpp)
 
  configure_file(${KS_DIR}/build/ks.desktop.cmake
                 ${KS_DIR}/${KS_APP_NAME}.desktop)
build/cmake_clean.sh +1 -1
index 67afd6c..2c05d3e 100755
@@ -6,6 +6,7 @@ rm -f CTestTestfile.cmake
  rm -f DartConfiguration.tcl
  rm -rf CMakeFiles/
  rm -rf src/
+rm -rf include/
  rm -rf examples/
  rm -rf tests/
  rm -rf Testing/
@@ -14,7 +15,6 @@ rm -f ../lib/*
  rm ../kernelshark.desktop
  rm ../libkshark.pc
  rm ../org.freedesktop.kshark-record.policy
-rm -f ../src/KsCmakeDef.hpp
  rm -f CMakeDoxyfile.in
  rm -f CMakeDoxygenDefaults.cmake
  rm -rf .qt/
src/CMakeLists.txt +1 -1
index 0643365..da31f8d 100644
@@ -71,7 +71,7 @@ if (OPENGL_FOUND)
                    "${KS_DIR}/src/libkshark-plot.h"
                    "${KS_DIR}/src/KsPlotTools.hpp"
                    "${KS_DIR}/src/KsPlugins.hpp"
-                  "${KS_DIR}/src/KsCmakeDef.hpp"
+                  "${KS_DIR}/build/include/KsCmakeDef.hpp"
              DESTINATION ${KS_INCLUDS_DESTINATION}
                  COMPONENT libkshark-devel)