Skip to content

How to figure out what -D options there are for a cmake build? #14885

Closed Answered by vszakats
bagder asked this question in Q&A
Discussion options

You must be logged in to vote

There is no configure --help with CMake. It's mostly just loose conventions and digging the sources.

  • The easiest is to find the official toggle options (102 as of now):

    $ git grep -F 'option(' | grep -i cmake
    

    Compared to configure the defaults are easier to figure out.

  • Then there are non-toggle settings. There is no easy grep for them.

    $ git grep -E '\${CURL_[A-Z_]+}' | grep -i cmake | grep -v -F 'option(' | grep -o -E '\${CURL_[A-Z_]+}' | sort -u
    $ git grep curl_dependency_option | grep -o -E '\([A-Z_]+' | sed 's/(/CURL_/g'
    $ git grep -F 'set(' | grep -i cmake | grep CACHE 
    

    Most of these are internal, only a few are meant as public options:
    CURL_CA_BUNDLE,
    CURL_CA_EMBED,
    CURL_CA_PATH,

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by vszakats
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants