[CMake] use analyze with visual studio

Petr Kmoch petr.kmoch at gmail.com
Wed Apr 11 03:29:16 EDT 2018


Hi,

I've never used the CL feature, but as far as CMake syntax is concerned, I
believe you're looking for this:

target_compile_options(const PRIVATE /analyze /analyze:plugin
EspXEngine.dll)

Petr

On 11 April 2018 at 00:23, Tiago Macarios <tiagomacarios at gmail.com> wrote:

> I am trying to pass the analyze flags to cl.exe, but I cannot figure out
> how to get it working, example:
>
> cmake_minimum_required (VERSION 2.8.11)
> set (CMAKE_VERBOSE_MAKEFILE ON)
> project (cppcore)
> add_executable (const const.cpp)
> target_compile_options (const analyze -analyze:plugin EspXEngine.dll)
>
> how to have cmake to respect that last line? I tried adding quotes, but
> that seems not to work
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180411/97a68777/attachment.html>


More information about the CMake mailing list