[CMake] How to remove "NOMINMAX" from Visual Studio projects in CMake

Yuri Timenkov yuri at timenkov.ru
Tue Jul 12 23:23:22 EDT 2011


Look through your CMakeLists where it is defined. AFAIK CMake doesn't add it
if you don't ask. Then, there are options: if it is added via
add_definitions() then you can use remove_definitions to remove this macro
for single project. If it is passed via COMPILE_FLAGS - then you have to
adjust them for example, with string(replace).

2011/7/12 火灵 <348774226 at qq.com>

> Hi everyone,
>
> I use CMake in Visual Studio 2008. When I generate MFC projects, in the
> "Preprocessor Definitions" there is an option "NOMINMAX". Anyone knows how
> to remove it use CMake? Thank you!
>
> Best Regards
> Shuiling
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110713/4a281090/attachment-0001.htm>


More information about the CMake mailing list