diff --git a/CMakeLists.txt b/CMakeLists.txt index df12053..7ca2d9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/cmake/AssertionConfig.cmake b/cmake/AssertionConfig.cmake index 168f739..4d70cd8 100644 --- a/cmake/AssertionConfig.cmake +++ b/cmake/AssertionConfig.cmake @@ -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}")