Skip to content

Commit

Permalink
feat: prepend a new entry of CMake module path (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
threeal authored May 7, 2024
1 parent 447cc48 commit 737d84b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(SUBPROJECT TRUE)
endif()

list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
if(SUBPROJECT)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" PARENT_SCOPE)
endif()
Expand Down
5 changes: 2 additions & 3 deletions cmake/AssertionConfig.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
if(NOT CMAKE_CURRENT_LIST_DIR IN_LIST CMAKE_MODULE_PATH)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
endif()
list(REMOVE_ITEM CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")

0 comments on commit 737d84b

Please sign in to comment.