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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:42:55+00:00 2026-05-16T10:42:55+00:00

When generating VS2010 targets with CMake, I would like the /LTCG flag turned on

  • 0

When generating VS2010 targets with CMake, I would like the /LTCG flag turned on (only for release + releasewithdebinfo if possible, but its okay if its on for debug builds). How do I modify the linker flags? add_definitions() doesn’t work because that only modifies compiler flags. And yes, I have wrapped it in if(MSVC).

How do I modify the linker flags?

  • 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-16T10:42:56+00:00Added an answer on May 16, 2026 at 10:42 am

    You can modify the linker flags in MSC using #pragma comment(linker, …)

    However, if you’d like to do it in the build process with cmake, here are the names you need to know:

    • CMAKE_EXE_LINKER_FLAGS
    • CMAKE_SHARED_LINKER_FLAGS
    • CMAKE_MODULE_LINKER_FLAGS

    (Thanks to Cmake.org).

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

Sidebar

Related Questions

I would like to ignore all generated files from TFS. I am generating Product.Generated.cs
Generating normal columnar data in excel file is quite easy but does any one
Am generating a hidden fields like so: @helper.input(_form(userID), '_label-> None) { (id, name, value,
Im generating a file to present to the user for download, but the server
I am generating entity wrappers in VS2010 based on dynamic objects in a CRM
I was using ReSharper plugin on VS2010 and i was generating an interface method.
Generating a random password is easy. but generating a batch is more difficult. public
When generating IL using DynamicMethod it's possible to call methods and access fields that
I'm generating C# source code which is being built by both VS2010 and Mono's
I'm generating xml from tables with queries like this SELECT * FROM Rp FOR

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.