i want to pass a cmake option to my port, what's is the best practice #35186
Closed
nocanstillbb
started this conversation in
General
Replies: 2 comments
-
If you always want to disable the test, you can use vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DMY_FLAG_TO_DISABLE_TESTS=ON
) If you have an option for it in the vcpkg.json file you can use vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
INVERTED_FEATURES
my-enable-test-feature MY_FLAG_TO_DISABLE_TESTS
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
) |
Beta Was this translation helpful? Give feedback.
0 replies
-
very useful to me |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
in order to disable qt unit test, i want to pass a option to ignore unit test when vcpkg install . The way I think of is to read the json filed from a json file that put to
vcpkg_root/port/myport
in portfile.cmake, but I think there is a better wayBeta Was this translation helpful? Give feedback.
All reactions