Re: [CMake] How force cmake debug/release

2018-12-07 Thread Simon Richter
Hi, On 06.12.18 09:50, Andy wrote: > If I call "cmake ." it write: "Warning:Debug" > Debug is default and I must call "cmake . -DCMAKE_BUILD_TYPE=Release" > for release? That depends on the generator used. Some generators require the build type at configuration time, some at build time. For exam

Re: [CMake] How force cmake debug/release

2018-12-06 Thread Marc CHEVRIER
Have a look at the documentation : https://cmake.org/cmake/help/v3.13/ Le 6 déc. 2018 à 09:51 +0100, Andy , 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") > en

[CMake] How force cmake debug/release

2018-12-06 Thread Andy
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 . -D