[CMake] CMake Windows Visual Studio 14 problems

Simon Ricaldone simon.ricaldone at circabs.com
Tue Jun 28 05:00:36 EDT 2016


Hello

Firstly I am very new to CMake, C and Visual Studio so please excuse my ignorance!

My problem is I am trying to convert an old Visual Studio 6 project into a Visual Studio 14 2015 solution using CMake, however I am having difficulties settings compiler flags.  I have been unable to find relevant documentation or advice on web on how to achieve the necessary builds steps I need to achieve.  The build I am trying to achieve is as following;


1.       Use cl.exe to compile source but not link code

2.       Use rc.exe to embed resource file into object code

3.       Use link.exe to link objects into a DLL

The problem I am having is the link stage probably due to an issue with the compiler flags I am setting via CMAKE_C_FLAGS, CMAKE_RC_FLAGS and CMAKE_LINKER_FLAGS, they appear not to override the default CMAKE settings.

I have attached a copy of my CMakeLists.txt file to see if I am missing the obvious!

Thanks in advance
Simon


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160628/688c1f88/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160628/688c1f88/attachment-0001.txt>


More information about the CMake mailing list