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 7629719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:54:27+00:00 2026-05-31T05:54:27+00:00

Just as make clean deletes all the files that a makefile has produced, I

  • 0

Just as make clean deletes all the files that a makefile has produced, I would like to do the same with CMake. All too often I find myself manually going through directories removing files like cmake_install.cmake and CMakeCache.txt, and the CMakeFiles folders.

Is there a command like cmake clean to remove all these files automatically? Ideally this should follow the recursive structure defined within the current directory’s CMakeLists.txt file.

  • 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-31T05:54:28+00:00Added an answer on May 31, 2026 at 5:54 am

    CMake 3.X

    CMake 3.X offers a ‘clean’ target.

    cmake --build C:/foo/build/ --target clean
    

    From the CMake docs for 3.0.2:

    --clean-first  = Build target 'clean' first, then build.
                     (To clean only, use --target 'clean'.)
    

    CMake 2.X

    There is no cmake clean in CMake version 2.X

    I usually build the project in a single folder like "build". So if I want to make clean, I can just rm -rf build.

    The "build" folder in the same directory as the root "CMakeLists.txt" is usually a good choice. To build your project, you simply give cmake the location of the CMakeLists.txt as an argument. For example: cd <location-of-cmakelists>/build && cmake ... (From @ComicSansMS)

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

Sidebar

Related Questions

First of all, I'm using Windows, just to make that clear. I am using
I know I could just make all the Mix_Musics public, and not worry about
Just to make sure I'm understanding shallow copies of reference types correctly and that
when using a makefile, I want the following to be possible: make clean make
I have an app (iPhone) with 2 Xibs that I would like to localize,
Just to make this clear - what is the difference between: String(value) and value
EDIT: Just to make things clear, this problem was caused by a typo in
I have to edit my question just to make it clear. What I need
I'm using the following code to just make a single UILabel on my cell.
Is the normal way to do this to just make 2 cols in my

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.