Skip to content

Commit

Permalink
fix: correct option use_cpm and use_conan (#60)
Browse files Browse the repository at this point in the history
Signed-off-by: l.feng <43399351+msclock@users.noreply.github.com>
  • Loading branch information
msclock authored Dec 9, 2024
1 parent 05584c8 commit bcc5b19
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
20 changes: 16 additions & 4 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,18 @@ compiled:
help: Whether to add _core compiled module.
type: bool

use_cpm:
default: false
help: Whether to use CPM to manage C++ dependencies.
type: bool
when: '{{ compiled == true }}'

use_conan:
default: false
help: Whether to use conan to manage C++ dependencies.
type: bool
when: '{{ compiled == true }}'

use_codecov:
default: true
help: 'Whether to add codecov integration:'
Expand Down Expand Up @@ -268,13 +280,13 @@ ss_cmake_configure_warnings_and_hardening:
when: false

ss_cmake_use_cpm:
default: false
default: '{{ use_cpm }}'
help: Whether to use CPM to manage C++ dependencies that will break up vcpkg dependency management.
type: bool
when: '{{ compiled == true }}'
when: false

ss_cmake_use_conan:
default: false
default: '{{ use_conan }}'
help: Whether to use conan to manage C++ dependencies that will break up vcpkg dependency management.
type: bool
when: '{{ compiled == true }}'
when: false
2 changes: 0 additions & 2 deletions includes/copier-answers-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,3 @@ use_cpm: false
min_py: '3.8'
max_py: '3.13'
default_py: '3.10'
ss_cmake_use_cpm: false
ss_cmake_use_conan: false
2 changes: 1 addition & 1 deletion template/CMakeLists.txt.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ include(ConfigureVersion)
[%- if use_cpm == true %]
include(ConfigureCPMDependencies)
[%- endif %]
[%- if use_cpm == true %]
[%- if use_conan == true %]
include(ConfigureConanDependencies)
[%- endif %]
[%- if compiled == true %]
Expand Down

0 comments on commit bcc5b19

Please sign in to comment.