xmkg / hadouken

C/C++ Project Development Environment (boilerplate)
Apache License 2.0
29 stars 4 forks source link

TRY (Don't repeat yourself) not used? #97

Open ClausKlein opened 1 month ago

ClausKlein commented 1 month ago

see too Don't repeat yourself

Why ist HDK_ROOT_DIRECTORY defined, but mostly not use inside the cmake modules?

bash-5.2$ grep -rw '\.hadouken' *.cmake cmake/
hadouken.cmake:set(HDK_ROOT_DIRECTORY     ${HDK_ROOT_PROJECT_SOURCE_DIR}/.hadouken)
hadouken.cmake:set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/.hadouken/cmake/modules/)
hadouken.cmake:set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/.hadouken/cmake/modules/find)
hadouken.cmake:file(GLOB CORE_MODULES "${PROJECT_SOURCE_DIR}/.hadouken/cmake/modules/core/*.cmake")
hadouken.cmake:file(GLOB TOOLCONF_MODULES "${PROJECT_SOURCE_DIR}/.hadouken/cmake/modules/toolconf/*.cmake")
hadouken.cmake:file(GLOB WRAPPER_MODULES "${PROJECT_SOURCE_DIR}/.hadouken/cmake/modules/wrappers/*.cmake")
cmake//modules/core/MakeComponent.cmake:include(.hadouken/cmake/modules/core/MakeTarget.cmake)
cmake//modules/core/MakeTarget.cmake:include(.hadouken/cmake/modules/core/detail/helper_functions.cmake)
cmake//modules/toolconf/CCache.cmake:include(.hadouken/cmake/modules/toolconf/detail/helper_functions.cmake)
cmake//modules/toolconf/GCov.cmake:include(.hadouken/cmake/modules/toolconf/detail/helper_functions.cmake)
cmake//modules/toolconf/LCov.cmake:include(.hadouken/cmake/modules/toolconf/detail/helper_functions.cmake)
cmake//modules/toolconf/IncludeWhatYouUse.cmake:include(.hadouken/cmake/modules/toolconf/detail/helper_functions.cmake)
cmake//modules/toolconf/ClangFormat.cmake:include(.hadouken/cmake/modules/toolconf/detail/helper_functions.cmake)
cmake//modules/toolconf/GCovR.cmake:include(.hadouken/cmake/modules/toolconf/detail/helper_functions.cmake)
cmake//modules/toolconf/GoogleTest.cmake:        TYPE STATIC SOURCES ${HDK_ROOT_PROJECT_SOURCE_DIR}/.hadouken/cmake/modules/toolconf/GoogleTest.cpp 
cmake//modules/toolconf/CppCheck.cmake:include(.hadouken/cmake/modules/toolconf/detail/helper_functions.cmake)
cmake//modules/toolconf/GoogleBenchmark.cmake:        TYPE STATIC SOURCES ${HDK_ROOT_PROJECT_SOURCE_DIR}/.hadouken/cmake/modules/toolconf/GoogleBenchmark.cpp 
cmake//modules/toolconf/ClangTidy.cmake:include(.hadouken/cmake/modules/toolconf/detail/helper_functions.cmake)
cmake//modules/toolconf/LLVMCov.cmake:include(.hadouken/cmake/modules/toolconf/detail/helper_functions.cmake)
cmake//modules/FeatureCheck.cmake:        if(NOT EXISTS "${HDK_ROOT_PROJECT_SOURCE_DIR}/.hadouken/cmake/modules/check/Check${arg}.cmake")
bash-5.2$ 
ClausKlein commented 1 month ago
CMake Warning (dev) at chapter13/ex02_envfile_utility/CMakeLists.txt:17 (set):
  uninitialized variable 'CMAKE_MODULE_PATH'
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at chapter13/ex03_external_cmake_module/.hadouken/cmake/modules/core/MakeTarget.cmake:73 (if):
  uninitialized variable 'HDK_ROOT_PROJECT_NAME_UPPER'
Call Stack (most recent call first):
  chapter13/ex03_external_cmake_module/CMakeLists.txt:39 (make_target)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at chapter13/ex03_external_cmake_module/.hadouken/cmake/modules/core/MakeTarget.cmake:78 (if):
  uninitialized variable 'HDK_ROOT_PROJECT_NAME_UPPER'
Call Stack (most recent call first):
  chapter13/ex03_external_cmake_module/CMakeLists.txt:39 (make_target)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at chapter13/ex03_external_cmake_module/.hadouken/cmake/modules/core/MakeTarget.cmake:83 (if):
  uninitialized variable 'HDK_ROOT_PROJECT_NAME_UPPER'
Call Stack (most recent call first):
  chapter13/ex03_external_cmake_module/CMakeLists.txt:39 (make_target)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at chapter13/ex03_external_cmake_module/.hadouken/cmake/modules/core/MakeTarget.cmake:270 (if):
  uninitialized variable 'HDK_ROOT_PROJECT_NAME_UPPER'
Call Stack (most recent call first):
  chapter13/ex03_external_cmake_module/CMakeLists.txt:39 (make_target)
This warning is for project developers.  Use -Wno-dev to suppress it.