Re: [CMake] generator expression for set_target_properties
I mean the latter, changing the build type in ide On Thu, Dec 3, 2015 at 1:15 PM, Attila Krasznahorkay < attila.krasznahor...@gmail.com> wrote: > Hi Lloyd, > > You mean like: > > if( ${CMAKE_BUILD_TYPE} STREQUAL "Release" ) >set_target_properties( myexec PROPERTIES WIN32_EXECUTABLE TRUE ) > endif() > > ? > > Or would you like the build configuration to change in this respect when > you change the build type in the IDE? This latter may not be possible to > do. But others may very well correct me. > > Cheers, > Attila > > > On 03 Dec 2015, at 07:32, Lloydwrote: > > > > Hi, > > > > We have a cmake file for Qt project. We want to hide the console from > release build. For that we are using > > > > ADD_EXECUTABLE(myexec ${MYEXEC_SRC} ) > > SET_TARGET_PROPERTIES(myexec PROPERTIES WIN32_EXECUTABLE true) > > > > Is it possible for me to set this property only for the release build? > > > > I am using cmake 2.8, Windows 7, VS 2013 > > > > Thanks, > > Lloyd > > -- > > > > 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: > > http://public.kitware.com/mailman/listinfo/cmake > > -- 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: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] generator expression for set_target_properties
Hi Lloyd, You mean like: if( ${CMAKE_BUILD_TYPE} STREQUAL "Release" ) set_target_properties( myexec PROPERTIES WIN32_EXECUTABLE TRUE ) endif() ? Or would you like the build configuration to change in this respect when you change the build type in the IDE? This latter may not be possible to do. But others may very well correct me. Cheers, Attila > On 03 Dec 2015, at 07:32, Lloydwrote: > > Hi, > > We have a cmake file for Qt project. We want to hide the console from release > build. For that we are using > > ADD_EXECUTABLE(myexec ${MYEXEC_SRC} ) > SET_TARGET_PROPERTIES(myexec PROPERTIES WIN32_EXECUTABLE true) > > Is it possible for me to set this property only for the release build? > > I am using cmake 2.8, Windows 7, VS 2013 > > Thanks, > Lloyd > -- > > 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: > http://public.kitware.com/mailman/listinfo/cmake -- 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: http://public.kitware.com/mailman/listinfo/cmake
[CMake] generator expression for set_target_properties
Hi, We have a cmake file for Qt project. We want to hide the console from release build. For that we are using ADD_EXECUTABLE(myexec ${MYEXEC_SRC} ) SET_TARGET_PROPERTIES(myexec PROPERTIES WIN32_EXECUTABLE true) Is it possible for me to set this property only for the release build? I am using cmake 2.8, Windows 7, VS 2013 Thanks, Lloyd -- 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: http://public.kitware.com/mailman/listinfo/cmake