0
votes

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.

2
Do you mean you want to use the Visual Studio 2015 preview? Are you using CMake 3.1? According to the release notes there is a generator for it in that version. - Retired Ninja
I mean the CTP compiler which is installed in my Visual Studio 2013. - haitam

2 Answers

0
votes

Well I think using cmake with the following parameters:

cmake .. -G "Visual Studio 12 Win64" -T CTP_Nov2013 -DCMAKE_BUILD_TYPE=Release ...
0
votes

one also need to define "__STDC_LIMIT_MACROS"