Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8664197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:11:08+00:00 2026-06-12T17:11:08+00:00

I have the following option defined in CMake: option(OURAPP-DEV-USE_EXTREME_DEBUGGING Use extreme debugging features OFF)

  • 0

I have the following option defined in CMake:

option(OURAPP-DEV-USE_EXTREME_DEBUGGING "Use extreme debugging features" OFF)

and I would like to check in a C++ file that this option was checked (in the CMake-GUI) or not.

I.e. writing C++ code like:

#if OURAPP-DEV-USE_EXTREME_DEBUGGING
 print_extra_debugging();
#endif

Please note, that our project setup requires that there is a - between the options regarding the components (such as OURAPP and DEV and the rest …)

Any idea how to make it happen?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T17:11:09+00:00Added an answer on June 12, 2026 at 5:11 pm

    Transfer the CMake option to the C++ world using a preprocessor define.

    IF(OURAPP-DEV-USE_EXTREME_DEBUGGING)
        ADD_DEFINITIONS(-DUSE_EXTREME_DEBUGGING)
    ENDIF()
    

    Under the hood, this adds the define to the compiler command line, and is then available to the preprocessor:

    #ifdef USE_EXTREME_DEBUGGING
        print_extra_debugging();
    #endif
    

    Note that a hyphen is not a valid character in a C preprocessor token, so you’ll have to change the name in the define.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have following filteringselect: <select name=v dojoType=dijit.form.FilteringSelect valueList=v id=v value=0><option value=></option><option value=0>0-test</option><option value=1>1-test2/option><option value=2>2-test3</option><option
I have the following jQuery code which runs when I'm clicking an option in
I currently have the following js code function clearMulti(option) { var i; var select
I have the following PowerShell loop: Set-Variable -Name YELLOW -Option ReadOnly -Value 0 Set-Variable
I have the following function in my jQuery code: function checkUNSelectBox(item){ $('#DELETE option').each(function(){ <!--alert(item);-->
I have the following doubt. I am considering the option to have html tags
I have the following HTML code (note no closing tags on <\option> ) generated
I have the following code: $.ajax({ async: false, url: 'chart_data.php', data: {'option':'high', 'id':id}, dataType:
I have the following HTML: <div data-name=countrySelectorRoot> <select> <option value=C1>Country 1</option> <option value=C2>Country 2</option>
I have the following markup:- <select name=a id=a> <option>Option 1</option> <option>Option Bottom</option> <option>Option 2</option>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.