Skip to content

Commit 35eede5

Browse files
authored
Fix support for consuming YCM via FetchContent_MakeAvailable and bump version to 0.17.1 (#464)
1 parent b1c62ba commit 35eede5

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.github/workflows/conda-forge-ci.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,14 @@ jobs:
1818
matrix:
1919
build_type: [Release]
2020
os: [ubuntu-latest, windows-2019, macos-latest]
21-
cmake_version: ["3.16","3.18","3.21","3.23","latest"]
21+
cmake_version: ["3.18","3.21","3.23","latest"]
2222
fail-fast: false
2323

2424
steps:
2525
- uses: actions/checkout@v2
2626

27-
- uses: conda-incubator/setup-miniconda@v2
27+
- uses: conda-incubator/setup-miniconda@v3
2828
with:
29-
miniforge-variant: Mambaforge
3029
miniforge-version: latest
3130

3231
- name: Dependencies
@@ -35,7 +34,7 @@ jobs:
3534
# Workaround for https://github.com/conda-incubator/setup-miniconda/issues/186
3635
conda config --remove channels defaults
3736
# Compilation related dependencies
38-
mamba install compilers make ninja pkg-config
37+
conda install compilers make ninja pkg-config
3938
4039
- name: CMake [Latest]
4140
shell: bash -l {0}
@@ -47,14 +46,14 @@ jobs:
4746
shell: bash -l {0}
4847
if: matrix.cmake_version != 'latest'
4948
run: |
50-
mamba install cmake=${{ matrix.cmake_version }}
49+
conda install cmake=${{ matrix.cmake_version }}
5150
5251
- name: Windows-only Dependencies [Windows]
5352
if: contains(matrix.os, 'windows')
5453
shell: bash -l {0}
5554
run: |
5655
# Compilation related dependencies
57-
mamba install vs2019_win-64
56+
conda install vs2019_win-64
5857
5958
- name: Configure [Linux&macOS]
6059
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@
33

44

55
cmake_minimum_required(VERSION 3.16)
6-
project(YCM VERSION 0.17.0 LANGUAGES NONE)
6+
project(YCM VERSION 0.17.1 LANGUAGES NONE)
77

88
# Check if the project is the main project or included via FetchContent
99
if (NOT CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
1010
# Project is included via FetchContent
1111
include(${CMAKE_CURRENT_SOURCE_DIR}/tools/UseYCMFromSource.cmake)
12+
# Propagate relevant variables modified by UseYCMFromSource to who called add_subdirectory
13+
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} PARENT_SCOPE)
14+
set(__USEYCMFROMSOURCE_INCLUDED ${__USEYCMFROMSOURCE_INCLUDED} PARENT_SCOPE)
15+
set(YCM_MODULE_DIR ${YCM_MODULE_DIR} PARENT_SCOPE)
1216
return()
1317
endif()
1418

0 commit comments

Comments
 (0)