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

  • SEARCH
  • Home
  • 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 6379001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:04:56+00:00 2026-05-25T02:04:56+00:00

Visual Studio insists that it has to create executables in bin/Debug/ instead of just

  • 0

Visual Studio insists that it has to create executables in bin/Debug/ instead of just bin/, when using CMake.
Is there a way to fix this?

  • 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-05-25T02:04:56+00:00Added an answer on May 25, 2026 at 2:04 am

    Yes, but is not really pretty…

    You will need to update the RUNTIME_OUTPUT_DIRECTORY, LIBRARY_OUTPUT_DIRECTORY and ARCHIVE_OUTPUT_DIRECTORY properties on ALL your targets. And you will need to do this for every configuration (Debug, RelWithDebInfo, etc.)

    The easiest way is to do this “globally” with their CMAKE_… equivalents. E.g. check the following sample which sets bin/ and lib/ as the “global” binary/library output-directories:

    # First for the generic no-config case (e.g. with mingw)
    set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
    set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib )
    set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib )
    # Second, for multi-config builds (e.g. msvc)
    foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
        string( TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG )
        set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/bin )
        set( CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/lib )
        set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/lib )
    endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )
    

    Alternatively, you can try to run through all the available targets and modify its properties afterwards…

    Note that this does not set the location of your .pdb files. I still have not found a satisfying way to put all the relevant .pdb files in the bin/ directory.

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

Sidebar

Related Questions

Visual Studio has a certain feature that makes debugging unhandled exceptions a lot easier:
Visual Studio will automatically create using statements for you whenever you create a new
visual studio has an excellent feature for manual code folding by using regions. i
Visual Studio has designer for editing the definition of SharePoint features. There is also
Visual Studio has a plugin that allows one to copy code from any editor
Visual Studio 2010 .NET 3.5 Is there any tool that can trace the http
Visual Studio 2008 insists on indenting HTML like this: <h1> title</h1> <h2> subtitle</h2> where
Visual studio is pretty good but doesn't create stored procedures automatically. Iron Speed designer
Visual Studio Test can check for expected exceptions using the ExpectedException attribute. You can
Visual Studio 2010 crashes when loading Just trying to start Visual Studio 2010 to

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.