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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:00:15+00:00 2026-06-15T04:00:15+00:00

Prolog : I’m an idiot for missing this in the documentation cmake-2.8.10.2 How do

  • 0

Prolog: I’m an idiot for missing this in the documentation

cmake-2.8.10.2

How do you make cmake preserve the original file permissions when installing a directory? For the project at hand, I’d like it to essentially copy some directories from my source tree to the install tree. To wit:

install(
  DIRECTORY config runp
  DESTINATION ${CMAKE_INSTALL_PREFIX}
  PATTERN ".svn" EXCLUDE
  PATTERN ".git" EXCLUDE
  PATTERN "start_collection.snl" EXCLUDE
)

All works as expected — except that executable scripts are getting copied in with incorrect file permissions. In fact, none of the original file permissions are preserved. Globally setting permissions using FILE_PERMISSIONS and DIRECTORY_PERMISSIONS is something I do not want to do, and frankly, would be a hack in this context.

In the shell-scripting world, I’d do something simple like this:

for i in config runp ; do
  tar cf - $i | tar -C $CMAKE_INSTALL_PREFIX -xf -
done
  • 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-15T04:00:17+00:00Added an answer on June 15, 2026 at 4:00 am

    Documentation suggests using USE_SOURCE_PERMISSIONS when calling install():

    install(
      DIRECTORY config runp
      DESTINATION ${CMAKE_INSTALL_PREFIX}
      USE_SOURCE_PERMISSIONS
      PATTERN ".svn" EXCLUDE
      PATTERN ".git" EXCLUDE
      PATTERN "start_collection.snl" EXCLUDE
    )
    

    Alternatively, you can use install(PROGRAMS signature of this command. See docs for more info.

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

Sidebar

Related Questions

I have a Prolog file (Hanoi.pl) containing the code for solving the Hanoi Towers
I have a sictus prolog file (.pl-file) that I would like to export as
I am working on prolog and faced this scenario - In my query, I
I have a prolog homework, which should work like this: singles([1,2,3,2,2,4,1], [3,4]). true Now
I'm new to prolog and I just can't figure this out. I'm trying to
I wrote this simple Prolog program. man(socrates). mortal(X) :- man(X). immortal(X) :- immortal(X). I
I'm using Prolog for an academic project. I wanted to know if there is
I have this prolog predicate that computes the number of primes depending on the
I have the following prolog expression in my file which is pretty self explanatory.
i have a prolog list like this: [p(X,Y,Z),r(H,G,K)] and i want convert it into

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.