# Cmake adds extra unwanted quotes to msvc linker flags

**URL:** <https://discourse.cmake.org/t/cmake-adds-extra-unwanted-quotes-to-msvc-linker-flags/3085>\
**Category:** Code\
**Created:** [April 5, 2021, 7:56pm UTC](https://discourse.cmake.org/t/cmake-adds-extra-unwanted-quotes-to-msvc-linker-flags/3085 "2021-04-05T19:56:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cen](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/c/ce7236/32.png) [@cen](https://discourse.cmake.org/u/cen)\
**Post date:** [April 5, 2021, 7:56pm UTC](https://discourse.cmake.org/t/cmake-adds-extra-unwanted-quotes-to-msvc-linker-flags/3085/1 "2021-04-05T19:56:08Z")

</div>

CMAKE 3.20.0, msvc. How do I get rid of these extra quotes?

Code: `target_link_options(my PRIVATE "/BASE:0x76290000")`

Actual flag passed to linker: `/BASE:""0x76290000""`

Error:

> LNK1146 no argument specified with option ‘/BASE:@0x76290000’

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [April 5, 2021, 11:58pm UTC](https://discourse.cmake.org/t/cmake-adds-extra-unwanted-quotes-to-msvc-linker-flags/3085/2 "2021-04-05T23:58:27Z")

</div>

Hmm. I think you’ve stumbled across some implementation detail related to how cross-directory targets are represented internally. @brad.king Do we have an escape hatch for this?

---

<div class="post-metadata">

**Author:** ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)\
**Post date:** [April 6, 2021, 11:17am UTC](https://discourse.cmake.org/t/cmake-adds-extra-unwanted-quotes-to-msvc-linker-flags/3085/3 "2021-04-06T11:17:59Z")

</div>

This has nothing to do with the cross-directory representation.

@cen I cannot reproduce that using Ninja, NMake Makefiles, or Visual Studio generators. Please post a complete `CMakeLists.txt` file showing the problem, along with instructions on how to run CMake for it.

---

<div class="post-metadata">

**Author:** ![cen](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/c/ce7236/32.png) [@cen](https://discourse.cmake.org/u/cen)\
**Post date:** [April 6, 2021, 7:24pm UTC](https://discourse.cmake.org/t/cmake-adds-extra-unwanted-quotes-to-msvc-linker-flags/3085/4 "2021-04-06T19:24:40Z")

</div>

Hmm, when I tried to create a repro I could no longer repeat it. I must have had some weird cache I forgot to remove previously. If I ever manage to reproduce it on a minimal example I will repost here.

Sorry for the false alarm, keep CMake great.
