<p>I tried to follow <a href="http://keon.io/mlpack-on-windows.html">these steps</a>, everything went fine except generating MS Visual Studio solution failed with an error which shows the intermediate/temp .vcxproj is using a GNU C++ compiler template instead of the MSVC's. This is my first try with cmake, so do you think I should check sth inside mlpack cmake files or it may be some bug in cmake?</p>

<p><strong>Here's the error dump:</strong></p>

<p>Performing C++ SOURCE FILE Test COMPILER_HAS_DEPRECATED_ATTR failed with the following output:<br>
Change Dir: C:/home/src/mlpack-2.0.3/build/CMakeFiles/CMakeTmp</p>

<p>Run Build Command:"C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe" "cmTC_2cc0c.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=14.0"<br>
Microsoft (R) Build Engine version 14.0.25420.1</p>

<p>Copyright (C) Microsoft Corporation. All rights reserved.</p>

<p>Build started 9/28/2016 6:46:04 PM.</p>

<p>Project "C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj" on node 1 (default targets).</p>

<p>PrepareForBuild:</p>

<p>Creating directory "cmTC_2cc0c.dir\Debug\".</p>

<p>Creating directory "C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\Debug\".</p>

<p>Creating directory "cmTC_2cc0c.dir\Debug\cmTC_2cc0c.tlog\".</p>

<p>InitializeBuildStatus:</p>

<p>Creating "cmTC_2cc0c.dir\Debug\cmTC_2cc0c.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.</p>

<p>ClCompile:</p>

<p>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D COMPILER_HAS_DEPRECATED_ATTR /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /openmp /Fo"cmTC_2cc0c.dir\Debug\" /Fd"cmTC_2cc0c.dir\Debug\vc140.pdb" /Gd /TP /errorReport:queue  -O3 "C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\src.cxx"</p>

<p>Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x64</p>

<p>Copyright (C) Microsoft Corporation.  All rights reserved.</p>

<p>cl /c /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D COMPILER_HAS_DEPRECATED_ATTR /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /openmp /Fo"cmTC_2cc0c.dir\Debug\" /Fd"cmTC_2cc0c.dir\Debug\vc140.pdb" /Gd /TP /errorReport:queue  -O3 "C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\src.cxx"</p>

<p>cl : Command line warning D9002: ignoring unknown option '-O3' [C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj]</p>

<p>src.cxx</p>

<p>C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\src.cxx(1): error C2065: '<strong>deprecated</strong>': undeclared identifier [C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj]</p>

<p>C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\src.cxx(1): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj]</p>

<p>C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\src.cxx(1): error C2448: '<strong>attribute</strong>': function-style initializer appears to be a function definition [C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj]</p>

<p>Done Building Project "C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj" (default targets) -- FAILED.</p>

<p>Build FAILED.</p>

<p>"C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj" (default target) (1) -&gt;</p>

<p>(ClCompile target) -&gt; </p>

<p>cl : Command line warning D9002: ignoring unknown option '-O3' [C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj]</p>

<p>"C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj" (default target) (1) -&gt;</p>

<p>(ClCompile target) -&gt; </p>

<p>C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\src.cxx(1): error C2065: '<strong>deprecated</strong>': undeclared identifier [C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj]</p>

<p>C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\src.cxx(1): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj]</p>

<p>C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\src.cxx(1): error C2448: '<strong>attribute</strong>': function-style initializer appears to be a function definition [C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj]</p>

<pre><code>1 Warning(s)

3 Error(s)
</code></pre>

<p>Time Elapsed 00:00:00.44</p>

<p>Source file was:<br>
<strong>attribute</strong>((<strong>deprecated</strong>)) int somefunc() { return 0; }<br>
    int main() { return somefunc();}</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/issues/794">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJ4bFJoQAt2JGJyHW6yp8P-AvLvndkYNks5quufwgaJpZM4KJYOV">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFJpmiRPryJojmv4qHMHbnHYCyNt2ks5quufwgaJpZM4KJYOV.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/issues/794"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/mlpack/mlpack","title":"mlpack/mlpack","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/mlpack/mlpack"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Building mlpack-2.0.3 on Windows 10 with MSVC 19 (#794)"}],"action":{"name":"View Issue","url":"https://github.com/mlpack/mlpack/issues/794"}}}</script>