Pārlūkot izejas kodu

cmake: Add some comments

Xenofon Karamanos 2 mēneši atpakaļ
vecāks
revīzija
497b7d94b8

+ 2 - 4
cmake/compiler-specific.cmake

@@ -1,7 +1,5 @@
-# Quite analogous to the Makefile.defs file This file is used to define the
-# common flags and options for the project The flags are defined as INTERFACE
-# properties of the common library The flags are then used by the other
-# libraries and executables
+# This file is included from the def.cmake CMakeLists.txt file.
+# It sets up the compiler specific flags.
 
 # Define the common flags and options for GCC
 option(PROFILE "Enable profiling" OFF)

+ 10 - 0
cmake/db_files.cmake

@@ -1,3 +1,7 @@
+# Funtion to add db files to the target kamctl/kamdbctl
+# It takes the group name, the file name and a boolean to determine if it is for kamctl or kamdbctl
+# It processes the file with sed and installs it to the correct location
+# Used by the helper function add_kamctl_db_files and add_kamdbctl_db_files
 function(add_db_files group_name file kamctl)
   # message(WARNING "file name is ${file}")
   # message(WARNING "group name is ${group_name}")
@@ -32,10 +36,16 @@ function(add_db_files group_name file kamctl)
   )
 endfunction()
 
+# Helper functions to add kamctl releated db files
+# Used by utils/kamctl/CMakeLists.txt for the core kamctl files
+# and by modules/db_{module_name}/CMakeLists.txt for the module specific kamctl files
 function(add_kamctl_db_files group_name file)
   add_db_files(${group_name} ${file} 1)
 endfunction()
 
+# Helper functions to add kamdbctl releated db files
+# Used by utils/kamctl/CMakeLists.txt for the core kamctl files
+# and by modules/db_{module_name}/CMakeLists.txt for the module specific kamdbctl files
 function(add_kamdbctl_db_files group_name file)
   add_db_files(${group_name} ${file} 0)
 endfunction()

+ 3 - 2
cmake/dbschema.cmake

@@ -2,8 +2,9 @@
 # dbschema target: Old Makefiles: make dbschema declared in src/ Makefile This
 # was using the makefile found in src/lib/srdb1/schema folder.
 #
-# TODO: Revise where we want the target declared. New CMakelists.txt Declare the
-# target in srdb1 CMakeLists.txt file.
+# TODO: Revise where we want the target declared.
+# CMake includes this file dbschema.cmake in each module that has a schema
+# folder.
 
 find_program(XSLTPROC_EXECUTABLE xsltproc QUIET)
 

+ 3 - 5
cmake/os-specific.cmake

@@ -1,8 +1,6 @@
-# Quite analogous to the Makefile.defs file This file is used to define the
-# common flags and options for the project The flags are defined as INTERFACE
-# properties of the common library The flags are then used by the other
-# libraries and executables
-
+# This file is included from the def.cmake CMakeLists.txt file.
+# It sets up the OS-specific flags and includes the appropriate
+# OS-specific CMake file.
 set(OS_SPECIFIC_DIR "${CMAKE_SOURCE_DIR}/cmake/os-specific")
 if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
   include(${OS_SPECIFIC_DIR}/linux.cmake)

+ 2 - 1
src/CMakeLists.txt

@@ -100,6 +100,7 @@ if(BUILD_DOC AND (NOT DOCBOOK2X_EXECUTABLE))
   set(BUILD_DOC OFF)
 endif()
 
+# This is used to add the documentation target to the default build target
 if(BUILD_DOC)
   set(docs_in_all_target ALL)
 else()
@@ -191,7 +192,7 @@ add_custom_command(
 
 add_custom_target(
   man
-  ${docs_in_all_target}
+  ${docs_in_all_target} # Add this `man` target to the default ALL target
   DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${MAIN_NAME}.8 ${CMAKE_CURRENT_BINARY_DIR}/${MAIN_NAME}.cfg.5
 )
 add_dependencies(man kamctl_man)

+ 1 - 0
src/modules/CMakeLists.txt

@@ -156,6 +156,7 @@ foreach(group IN LISTS FULL_MODULE_GROUP_NAMES)
   # message(WARNING "Adding module group: ${group_name}")
   add_module_group("${group_name}" "${MODULES_IN_GROUP}")
 endforeach()
+# Empty name to add user specified modules otherwise function will error
 add_module_group(" " "${USER_MODULES_LIST}")
 
 get_property(ADDED_MODULES_LIST GLOBAL PROPERTY ADDED_MODULES_LIST)