Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid default generator "Visual Studio 15 2017 Win64 Win64" #160

Closed
karel-burda opened this issue Feb 20, 2019 · 5 comments · Fixed by #161
Closed

Invalid default generator "Visual Studio 15 2017 Win64 Win64" #160

karel-burda opened this issue Feb 20, 2019 · 5 comments · Fixed by #161

Comments

@karel-burda
Copy link

karel-burda commented Feb 20, 2019

Invalid generator is selected with version 5.1.0 on Windows with VS 2017 (double "Win64" appears in the name) by default.

Plain "cmake-js compile" was executed.

Error output:

c:\burda\projects\wui\tools\com-wui-framework-resource-writer>npm install

[email protected] install c:\burda\projects\wui\tools\com-wui-framework-resource-writer
cmake-js compile

[ 'C:\\burda\\projects\\wui\\com-wui-framework-builder\\dependencies\\nodejs\\node.exe',
  'c:\\burda\\projects\\wui\\tools\\com-wui-framework-resource-writer\\node_modules\\cmake-js\\bin\\cmake-js',
  'compile' ]
info TOOL Using Visual Studio 15 2017 Win64 Win64 generator.
info CMD CONFIGURE
info RUN cmake "c:\burda\projects\wui\tools\com-wui-framework-resource-writer" --no-warn-unused-cli -G"Visual Studio 15 2017 Win64 Win64" -DCMAKE_JS_VERSION="5.1.0" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="c:\burda\projects\wui\tools\com-wui-framework-resource-writer\build" -DCMAKE_JS_INC="C:\Users\nxf45876\.cmake-js\node-x64\v10.15.0\include\node" -DNODE_RUNTIME="node" -DNODE_RUNTIMEVERSION="10.15.0" -DNODE_ARCH="x64" -DCMAKE_JS_LIB="C:\Users\nxf45876\.cmake-js\node-x64\v10.15.0\win-x64\node.lib"
Not searching for unused variables given on the command line.
CMake Error: Could not create named generator Visual Studio 15 2017 Win64 Win64

(list of available generators)

@karel-burda karel-burda changed the title Invalid generator " Visual Studio 15 2017 Win64 Win64" Invalid generator "Visual Studio 15 2017 Win64 Win64" Feb 20, 2019
@karel-burda karel-burda changed the title Invalid generator "Visual Studio 15 2017 Win64 Win64" Invalid default generator "Visual Studio 15 2017 Win64 Win64" Feb 20, 2019
@pcristofanilli
Copy link

pcristofanilli commented Mar 8, 2019

hi, really newby in compilation.
I've installed
npm -g install cmake-js
I've applied the patch to the file, after this i've installed grunt and typed:
npm run-script compile
but i don't see changes.
surerly i've missed something.
I've triend also inserting some logs, but nothing happen.

@PaulFreund
Copy link

I can reproduce this error and can verify that the pull request fixes the issue. Also without the patch Win64 is also appended for ia32 builds and the wrong generator is choosen with MSVC.

@pcristofanilli
Copy link

pcristofanilli commented Mar 11, 2019

hi, really newby in compilation.
I've installed
npm -g install cmake-js
I've applied the patch to the file, after this i've installed grunt and typed:
npm run-script compile
but i don't see changes.
surerly i've missed something.
I've triend also inserting some logs, but nothing happen.

Sorry discovered the mistake, the library the I was trying to install download his own copy, so the global copy was bypassed.
Thanx to all.
P.S.:There is a prevision about the release of this fix?

@BotellaA
Copy link
Contributor

BotellaA commented Apr 2, 2019

Maybe CMake changed its output. It looks like cmake-js is getting its generator list from this command:

cmake  -E capabilities
{"generators":[{"extraGenerators":["CodeBlocks","CodeLite","Sublime Text 2","Kate","Eclipse CDT4"],"name":"MinGW Makefiles","platformSupport":false,"toolsetSupport":false},{"extraGenerators":[],"name":"Visual Studio 12 2013 ARM","platformSupport":true,"toolsetSupport":true},{"extraGenerators":[],"name":"Visual Studio 14 2015 ARM","platformSupport":true,"toolsetSupport":true},{"extraGenerators":[],"name":"Visual Studio 16 2019","platformSupport":true,"toolsetSupport":true},{"extraGenerators":[],"name":"Visual Studio 15 2017 Win64","platformSupport":true,"toolsetSupport":true},{"extraGenerators":[],"name":"Visual Studio 15 2017","platformSupport":true,"toolsetSupport":true},{"extraGenerators":[],"name":"Visual Studio 15 2017 ARM","platformSupport":true,"toolsetSupport":true},{"extraGenerators":[],"name":"Visual Studio 14 2015 Win64","platformSupport":true,"toolsetSupport":true},{"extraGenerators":[],"name":"Visual Studio 12 2013","platformSupport":true,"toolsetSupport":true},{"extraGenerators":[],"name":"Visual Studio 12 2013 Win64","platformSupport":true,"toolsetSupport":true},{"extraGenerators":[],"name":"Visual Studio 14 2015","platformSupport":true,"toolsetSupport":true},{"extraGenerators":[],"name":"Visual Studio 11 2012","platformSupport":true,"toolsetSupport":true},{"extraGenerators":[],"name":"Visual Studio 11 2012 ARM","platformSupport":true,"toolsetSupport":true},{"extraGenerators":["CodeBlocks","CodeLite","Sublime Text 2","Kate","Eclipse CDT4"],"name":"Unix Makefiles","platformSupport":false,"toolsetSupport":false},{"extraGenerators":[],"name":"Visual Studio 11 2012 Win64","platformSupport":true,"toolsetSupport":true},{"extraGenerators":[],"name":"Visual Studio 10 2010 Win64","platformSupport":true,"toolsetSupport":true},{"extraGenerators":[],"name":"Visual Studio 10 2010","platformSupport":true,"toolsetSupport":true},{"extraGenerators":[],"name":"Visual Studio 10 2010 IA64","platformSupport":true,"toolsetSupport":true},{"extraGenerators":[],"name":"Visual Studio 9 2008","platformSupport":true,"toolsetSupport":false},{"extraGenerators":[],"name":"Visual Studio 9 2008 Win64","platformSupport":true,"toolsetSupport":false},{"extraGenerators":["CodeBlocks"],"name":"NMake Makefiles JOM","platformSupport":false,"toolsetSupport":false},{"extraGenerators":[],"name":"Visual Studio 9 2008 IA64","platformSupport":true,"toolsetSupport":false},{"extraGenerators":[],"name":"MSYS Makefiles","platformSupport":false,"toolsetSupport":false},{"extraGenerators":[],"name":"Borland Makefiles","platformSupport":false,"toolsetSupport":false},{"extraGenerators":["CodeBlocks","CodeLite","Sublime Text 2","Kate","Eclipse CDT4"],"name":"NMake Makefiles","platformSupport":false,"toolsetSupport":false},{"extraGenerators":[],"name":"Green Hills MULTI","platformSupport":true,"toolsetSupport":true},{"extraGenerators":["CodeBlocks","CodeLite","Sublime Text 2","Kate","Eclipse CDT4"],"name":"Ninja","platformSupport":false,"toolsetSupport":false},{"extraGenerators":[],"name":"Watcom WMake","platformSupport":false,"toolsetSupport":false}],"serverMode":true,"version":{"isDirty":false,"major":3,"minor":14,"patch":0,"string":"3.14.0","suffix":""}}

Maybe you should check only the generator names without architecture information.
I do not know much about regex but it might be possible to edit this line: https://github.com/cmake-js/cmake-js/blob/master/lib/es6/toolset.js#L179

@unbornchikken
Copy link
Member

Fixed as of [email protected].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants