build: standardise the layout for the CMake project

Custom local modules are expected to reside in `cmake/modules`. Relocate
them and update the top-level CMakeLists.
This commit is contained in:
Saleem Abdulrasool
2024-01-04 14:06:46 -08:00
parent 651b360749
commit 58994ef48f
4 changed files with 4 additions and 2 deletions

View File

@@ -16,8 +16,10 @@ set(PROJECT_VERSION_PATCH 0)
set(PROJECT_VERSION_GFM 13)
set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.gfm.${PROJECT_VERSION_GFM})
include("FindAsan.cmake")
include("CheckFileOffsetBits.cmake")
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules)
include(FindAsan)
include(CheckFileOffsetBits)
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message(FATAL_ERROR "Do not build in-source.\nPlease remove CMakeCache.txt and the CMakeFiles/ directory.\nThen: mkdir build ; cd build ; cmake .. ; make")