Use idomatic approach to extending CMAKE_MODULE_PATH. (#7)

There are many reasons why there may already be a CMAKE_MODULE_PATH defined.
The idiomatic way to extend it in a project is via list(APPEND).

https://github.com/ROCm/rocminfo/pull/97 submitted by @stellaraccident

Co-authored-by: Stella Laurenzo <Stella.Laurenzo@amd.com>
This commit is contained in:
Khatri, ShwetaeStella Laurenzo authored and GitHub committed 2025-03-14 08:16:56 -07:00
1 parent 9638da7467
commit 8503ec36ca
1 file changed
+1 -3
+1 -3
Vedi File
@@ -55,9 +55,7 @@ endif()
# Default to ON
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
## Set default module path if not already set
if(NOT DEFINED CMAKE_MODULE_PATH)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/")
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/")
## Include common cmake modules
include(utils)