0

I have an issue with OSRM back-end v4.5.0 build with nmake (see hereafter the error output). The "constexpr" in "Coordinate.h" is not supported by msvc12. The question is, how to force cmake/nmake to use the CTP compiler !?

Thanks for your reply

Coordinate.h

... 
namespace { 
constexpr float COORDINATE_PRECISION = 1000000.f; 
} 
...

Error output

D:\osrm450be\build>nmake

Microsoft (R) Program Maintenance Utility Version 12.00.21005.1 Copyright (C) Microsoft Corporation. All rights reserved.

Scanning dependencies of target COORDINATE [ 2%] Building CXX object CMakeFiles/COORDINATE.dir/data_structures/Coordinate.cpp.obj Coordinate.cpp D:\osrm450be\Include\osrm/Coordinate.h(37) : error C2144: syntax error : 'float' should be preceded by ';' D:\osrm450be\Include\osrm/Coordinate.h(37) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int D:\osrm450be\data_structures\Coordinate.cpp(290) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data NMAKE : fatal error U1077: 'C:\PROGRA~2\MICROS~2.0\VC\bin\cl.exe' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe"' : return code '0x2' Stop.

scai
  • 20,297
  • 4
  • 56
  • 72
haitam
  • 21
  • 4
  • Do you mean you want to use the Visual Studio 2015 preview? Are you using CMake 3.1? According to [the release notes](http://www.cmake.org/cmake/help/v3.1/release/3.1.0.html) there is a generator for it in that version. – Retired Ninja Jan 26 '15 at 18:17
  • I mean the [CTP compiler](http://www.microsoft.com/en-us/download/details.aspx?id=41151) which is installed in my Visual Studio 2013. – haitam Jan 27 '15 at 09:30

2 Answers2

0

Well I think using cmake with the following parameters:

cmake .. -G "Visual Studio 12 Win64" -T CTP_Nov2013 -DCMAKE_BUILD_TYPE=Release ...
haitam
  • 21
  • 4
0

one also need to define "__STDC_LIMIT_MACROS"

haitam
  • 21
  • 4