# POCO: can not set the postfix

**URL:** https://discourse.cmake.org/t/poco-can-not-set-the-postfix/4793
**Category:** Usage
**Created:** [January 7, 2022, 7:44am UTC](https://discourse.cmake.org/t/poco-can-not-set-the-postfix/4793 "2022-01-07T07:44:05Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![zhang-qiang-github](https://discourse.cmake.org/user_avatar/discourse.cmake.org/zhang-qiang-github/32/1913_2.png) [@zhang-qiang-github](https://discourse.cmake.org/u/zhang-qiang-github)
#### Post date: [January 7, 2022, 7:44am UTC](https://discourse.cmake.org/t/poco-can-not-set-the-postfix/4793/1 "2022-01-07T07:44:05Z")

</div>

I am using CMake to build [POCO](https://github.com/pocoproject/poco), and it suceed.

Then, I want to install it. Befor installation, I want to set the postfix:

 ![image](https://discourse.cmake.org/uploads/default/original/2X/2/2944d7c2e67aee3c472a274924a6149f75fd4866.png)

I set CMAKE\_RELWITHDEBINFO\_POSTFIX as from " " to “rd”, then configure again.

The stranger thing is that the CMAKE\_RELWITHDEBINFO\_POSTFIX automatically change to be " ":

Why this happen? How can I correctly set the postfix? Any suggestion is appreciated!

---

<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: [January 7, 2022, 1:21pm UTC](https://discourse.cmake.org/t/poco-can-not-set-the-postfix/4793/2 "2022-01-07T13:21:58Z")

</div>

The project itself could be changing this on you. Does the project set any `POSTFIX` cache variables anywhere? I don’t see anything in the code with GitHub’s search, but does `cmake --trace-expand` output show anything like it?

---

<div class="post-metadata">

### Author: ![zhang-qiang-github](https://discourse.cmake.org/user_avatar/discourse.cmake.org/zhang-qiang-github/32/1913_2.png) [@zhang-qiang-github](https://discourse.cmake.org/u/zhang-qiang-github)
#### Post date: [January 8, 2022, 2:20pm UTC](https://discourse.cmake.org/t/poco-can-not-set-the-postfix/4793/3 "2022-01-08T14:20:33Z")

</div>

I do not change anything. What I have done is: downloading POCO, and cmake it.

The environment is:

```auto
win 10 
vs 2022
cmake 3.22.1

```

Can you reproduce this phenomenon?

I don’t know how to use `cmake --trace-expand` because the system operation is `win10`.

---

<div class="post-metadata">

### Author: ![ChrisJaquet](https://discourse.cmake.org/user_avatar/discourse.cmake.org/chrisjaquet/32/304_2.png) [@ChrisJaquet](https://discourse.cmake.org/u/ChrisJaquet)
#### Post date: [January 8, 2022, 5:00pm UTC](https://discourse.cmake.org/t/poco-can-not-set-the-postfix/4793/4 "2022-01-08T17:00:23Z")

</div>

The file [poco/DefinePlatformSpecifc.cmake at master · pocoproject/poco · GitHub](https://github.com/pocoproject/poco/blob/master/cmake/DefinePlatformSpecifc.cmake) seems to override the cached values:

```auto
# Add a d postfix to the debug libraries
if(BUILD_SHARED_LIBS)
	set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set Debug library postfix" FORCE)
	set(CMAKE_RELEASE_POSTFIX "" CACHE STRING "Set Release library postfix" FORCE)
	set(CMAKE_MINSIZEREL_POSTFIX "" CACHE STRING "Set MinSizeRel library postfix" FORCE)
	set(CMAKE_RELWITHDEBINFO_POSTFIX "" CACHE STRING "Set RelWithDebInfo library postfix" FORCE)
else(BUILD_SHARED_LIBS)
	set(CMAKE_DEBUG_POSTFIX "${STATIC_POSTFIX}d" CACHE STRING "Set Debug library postfix" FORCE)
	set(CMAKE_RELEASE_POSTFIX "${STATIC_POSTFIX}" CACHE STRING "Set Release library postfix" FORCE)
	set(CMAKE_MINSIZEREL_POSTFIX "${STATIC_POSTFIX}" CACHE STRING "Set MinSizeRel library postfix" FORCE)
	set(CMAKE_RELWITHDEBINFO_POSTFIX "${STATIC_POSTFIX}" CACHE STRING "Set RelWithDebInfo library postfix" FORCE)
endif()

```

---

<div class="post-metadata">

### Author: ![zhang-qiang-github](https://discourse.cmake.org/user_avatar/discourse.cmake.org/zhang-qiang-github/32/1913_2.png) [@zhang-qiang-github](https://discourse.cmake.org/u/zhang-qiang-github)
#### Post date: [January 9, 2022, 2:17pm UTC](https://discourse.cmake.org/t/poco-can-not-set-the-postfix/4793/5 "2022-01-09T14:17:41Z")

</div>

> [@ChrisJaquet](#):
>
> The file [poco/DefinePlatformSpecifc.cmake at master · pocoproject/poco · GitHub](https://github.com/pocoproject/poco/blob/master/cmake/DefinePlatformSpecifc.cmake) seems to override the cached values:

Is that means that the changing in CMake GUI is useless?

If I want to set the CMAKE\_RELWITHDEBINFO\_POSTFIX as “rd”, should I change the DefinePlatformSpecifc.cmake rather than change the CMake GUI?

---

<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: [January 9, 2022, 3:13pm UTC](https://discourse.cmake.org/t/poco-can-not-set-the-postfix/4793/6 "2022-01-09T15:13:48Z")

</div>

For that project, yes. The project is ignoring your setting with that `FORCE`.

---

<div class="post-metadata">

### Author: ![zhang-qiang-github](https://discourse.cmake.org/user_avatar/discourse.cmake.org/zhang-qiang-github/32/1913_2.png) [@zhang-qiang-github](https://discourse.cmake.org/u/zhang-qiang-github)
#### Post date: [January 9, 2022, 3:32pm UTC](https://discourse.cmake.org/t/poco-can-not-set-the-postfix/4793/7 "2022-01-09T15:32:10Z")

</div>

Thank you very much for your kindly reply. I will modify the CMAKE\_RELWITHDEBINFO\_POSTFIX according to my need.
