cmake: Allow user to override CMAKE_DEBUG_POSTFIX #1763

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
@webmaster128
Contributor

webmaster128 commented Aug 11, 2017

In #1649 the cache variable CMAKE_DEBUG_POSTFIX was set to "-d" by FORCE, giving the user no chance to override it to the desired value. This change keeps "-d" as default but allows users to change the value.

Current master

$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=Debug ..
$ DESTDIR=installation make install

-- Installing: installation/usr/local/lib/libcurl-d.so

$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_DEBUG_POSTFIX=_bar ..
$ DESTDIR=installation make install

-- Installing: installation/usr/local/lib/libcurl-d.so

This PR

$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=Debug ..
$ DESTDIR=installation make install

-- Installing: installation/usr/local/lib/libcurl-d.so

$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_DEBUG_POSTFIX=_bar ..
$ DESTDIR=installation make install

-- Installing: installation/usr/local/lib/libcurl_bar.so

cc @paulharris

@mention-bot

This comment has been minimized.

Show comment Hide comment
@mention-bot

mention-bot Aug 11, 2017

@webmaster128, thanks for your PR! By analyzing the history of the files in this pull request, we identified @snikulov, @billhoffman and @Sukender to be potential reviewers.

@webmaster128, thanks for your PR! By analyzing the history of the files in this pull request, we identified @snikulov, @billhoffman and @Sukender to be potential reviewers.

@coveralls

This comment has been minimized.

Show comment Hide comment
@coveralls

coveralls Aug 11, 2017

Coverage Status

Coverage increased (+0.02%) to 75.099% when pulling 0b2931a on webmaster128:custom_suffix into 77cd4e7 on curl:master.

Coverage Status

Coverage increased (+0.02%) to 75.099% when pulling 0b2931a on webmaster128:custom_suffix into 77cd4e7 on curl:master.

@bagder bagder added the cmake label Aug 11, 2017

@bagder

bagder approved these changes Aug 11, 2017

Seems totally reasonable to me!

@bagder bagder closed this in 7f9bf5c Aug 12, 2017

@bagder

This comment has been minimized.

Show comment Hide comment
@bagder

bagder Aug 12, 2017

Member

Thanks!

Member

bagder commented Aug 12, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment