[CMake] How force cmake debug/release

Marc CHEVRIER marc.chevrier at gmail.com
Thu Dec 6 03:58:28 EST 2018


Have a look at the documentation :
https://cmake.org/cmake/help/v3.13/
Le 6 déc. 2018 à 09:51 +0100, Andy <borucki.andrzej at gmail.com>, a écrit :
> In cmake I have:
> if (${CMAKE_BUILD_TYPE} STREQUAL Release)
>   message(WARNING "Release")
> endif()
>
> if (${CMAKE_BUILD_TYPE} STREQUAL Debug)
>   message(WARNING "Debug")
> endif()
>
> (how write something like elseif?)
>
> If I call "cmake ." it write: "Warning:Debug"
> Debug is default and I must call "cmake . -DCMAKE_BUILD_TYPE=Release"
> for release?
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20181206/922dde61/attachment.html>


More information about the CMake mailing list