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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:00:40+00:00 2026-05-24T17:00:40+00:00

Assuming the following configuration : parentdir1/parentdir2/myproject parentdir1/parentdir2/myproject/CMakeLists.txt parentdir1/parentdir2/myproject/src parentdir1/parentdir2/myproject/src/dir1 parentdir1/parentdir2/myproject/src/dir2 parentdir1/parentdir2/myproject/src/dir3 Currently, my CMakeLists

  • 0

Assuming the following configuration :

parentdir1/parentdir2/myproject
parentdir1/parentdir2/myproject/CMakeLists.txt
parentdir1/parentdir2/myproject/src
parentdir1/parentdir2/myproject/src/dir1
parentdir1/parentdir2/myproject/src/dir2
parentdir1/parentdir2/myproject/src/dir3

Currently, my CMakeLists produces only one Makefile in parentdir1/parentdir2/myproject.

How to produce a Makefile in each subdirectory (to compile the associated directory) ?

Thank you very much.

  • 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-24T17:00:41+00:00Added an answer on May 24, 2026 at 5:00 pm

    CMake allows you to have a CMakeLists.txt file in any subdirectory under the root directory of your source tree.

    Then use the add_subdirectory command in CMakeLists.txt to add the subdirectories. Then CMake will look for CMakeLists.txt in those subdirectories.

    See the documentation for the add_subdirectory command here:

    http://cmake.org/cmake/help/cmake-2-8-docs.html#command:add_subdirectory

    For more info, check out the CMake FAQ and documentation on http://www.cmake.org.

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

Sidebar

Related Questions

Assuming the following: You have some content currently being displayed in an ASP.NET HTML
Assuming the following domain entity : public enum Role { User = 0, Moderator
Assuming the following hypothetical inheritance hierarchy: public interface IA { int ID { get;
assuming the following html (minus the comments and nbsp; etc that xQuery wont process
Assuming I have the following two JQuery functions - The first, which works: $(#myLink_931).click(function
Assuming A.sql contains the following code, then second Select query won’t be executed due
Assuming a method with the following signature bool TryXxxx(object something, out int toReturn) What
Assuming I have the following strings: string str1 = Hello World!; string str2 =
Assuming you have the following XML: <?xml version=1.0 encoding=utf-8?> <content> <info> <media> <image> <info>
Assuming an InnoDB table, will the following command ... CHECK TABLE table_name; ... cause

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.