Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify parent's CMAKE_MODULE_PATH #1495

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.16)
project(core VERSION 0.0.0 LANGUAGES C CXX DESCRIPTION "Sourcemeta Core")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")

# Options
option(SOURCEMETA_CORE_REGEX "Build the Sourcemeta Core Regex library" ON)
Expand Down
5 changes: 5 additions & 0 deletions cmake/Sourcemeta.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ include("${SOURCEMETA_UTILITIES_DIRECTORY}/targets/shellcheck.cmake")
include("${SOURCEMETA_UTILITIES_DIRECTORY}/targets/doxygen.cmake")
include("${SOURCEMETA_UTILITIES_DIRECTORY}/targets/googletest.cmake")
include("${SOURCEMETA_UTILITIES_DIRECTORY}/targets/googlebenchmark.cmake")

# To let downstream projects directly include this file
if(NOT PROJECT_IS_TOP_LEVEL)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" PARENT_SCOPE)
endif()