[CMake] CMake and Visual Studio multiconfig solution
Mauro Ziliani
mauro.ziliani.tmp at gmail.com
Sat Aug 22 13:11:12 EDT 2015
Hi all.
My name is mauro and i am a freelance programmer and I work different
platforms: windows and Linux.
I'm trying cmake 3.3.1 and I am in trouble to do this.
I need to compile my app with visual studio and achieve the follow
behavior. If I compile the app in debug configuration I need to append the
suffix _dbg to the app name, nothing in release configuration.
That is, if the app's name is test in debug configuration I'd like to
obtain test_dbg.exe.
Using makefile and make command I can obtain the same behavior by
conditional compilation with command
make BUILD=debug ====> test_dbg.exe
My CMakeLists.txt is
--------
cmake_minimum_required(VERSION 3.3)
Project(test_vs)
add_executable(test test.cpp)
set_target_properties(test PROPERTIES DEBUG_SUFFIX "_dbg")
------
But it doesn't work.
Either for debug and release configuration the app's name is test.exe
Any ideas?
Best regards,
Mauro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150822/64ee3004/attachment.html>
More information about the CMake
mailing list