Discussion:
[CMake] how to determine debug or release mode?
Quân Phạm Minh
2012-03-14 08:19:03 UTC
Permalink
how determine build type in cmake like
if (CMAKE_BUILD_TYPE EQUAL "DEBUG")
message("debug mode")
endif (CMAKE_BUILD_TYPE EQUAL "DEBUG")
Dirk vanMeeuwen
2012-03-14 08:29:32 UTC
Permalink
IF(CMAKE_BUILD_TYPE MATCHES DEBUG)
message("debug mode")
ENDIF(CMAKE_BUILD_TYPE MATCHES DEBUG)

Kind regards,

Dirk van Meeuwen,
Process Modeling Engineer

Technip Benelux B.V.
Boerhaavelaan 31, PO Box 86
2700 AB Zoetermeer

direct dial: +31 (0)79 3293 843
direct fax : +31 (0)79 3293 700
direct email: ***@technip.com
internet: www.spyrosuite.com



From: Quân Phạm Minh <***@gmail.com>
To: ***@cmake.org
Date: 03/14/2012 09:19 AM
Subject: [CMake] how to determine debug or release mode?
Sent by: cmake-***@cmake.org



how determine build type in cmake like
if (CMAKE_BUILD_TYPE EQUAL "DEBUG")
message("debug mode")
endif (CMAKE_BUILD_TYPE EQUAL "DEBUG") --

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




This email and any attached files ("Message") may contain confidential and/or privileged information. It is intended solely for the addressee(s). If you receive this Message in error, inform the sender by reply email, delete the Message and destroy any printed copy.
Any unauthorized use, distribution, or copying of this Message or any part thereof is prohibited. Emails are susceptible to alteration. Neither Technip nor any of its affiliates shall be liable for the Message if altered or falsified nor shall they be liable for any damage caused by any virus that might be transmitted with this Message.
Rolf Eike Beer
2012-03-14 08:32:58 UTC
Permalink
Post by Quân Phạm Minh
how determine build type in cmake like
if (CMAKE_BUILD_TYPE EQUAL "DEBUG")
message("debug mode")
endif (CMAKE_BUILD_TYPE EQUAL "DEBUG")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
Rolf Eike Beer
2012-03-14 08:48:22 UTC
Permalink
Please keep the list in the replies so other people may answer.
actually, I want build my library in debug and release mode with name in
debug is mylibd.dll and release mode is mylib.dll. can you help me?
set_target_properties(mylib PROPERTIES DEBUG_POSTFIX "d")

Eike

Continue reading on narkive:
Loading...