2018-07-19 06:03 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001456Orfeo Toolbox (OTB)Generalpublic2017-10-18 09:09
Assigned Togpasero 
PlatformWindowsOSWindows 10 x64OS VersionWindows 10 x64
Summary0001456: Superbuild with Visual Studio 15 2017
DescriptionImpossible to run Superbuild using VS 2017, using cmake 3.9.0, due to bad parameter sequence in XXX-build-${configuration}.cmake in line :

set(command "C:/Program Files/CMake/bin/cmake.exe;-GVisual Studio 15 2017 Win64;--build;.;--config;Release")

The --build should be the first parameter as indicated in cmake documentation (as shown below in additionnal information)
Steps To ReproduceGenerate Superbuild project using cmake command line or gui.
Open The generated solution using VS 2017 and run generate.
The download, configure and patch steps are OK.
Build step failed with error.
Additional InformationCmake documentation except :

CMake provides a command-line signature to build an already-generated project binary tree:

cmake --build <dir> [<options>...] [-- <build-tool-options>...]
This abstracts a native build tool’s command-line interface with the following options:

--build <dir>
Project binary directory to be built. This is required and must be first.
TagsNo tags attached.
Attached Files




diginove (reporter)

When changing SB_CMAKE_COMMAND in Superbuild/CmakeLists.txt from




Build Step is now OK, because --build option is the first one.


rashadkm (developer)

Last edited: 2017-10-02 11:35

View 2 revisions

hmm. cmake generator arg must be paseed when building external projects. otherwise, subprojects won't use same generator.

in this case, VS gen is default on windows, so if you specify it or not, it will work. That explains why your fix seems to work.

But I think if you have build option at first then it will be okay

-set(command "C:/Program Files/CMake/bin/cmake.exe;-GVisual Studio 15 2017 Win64;--build;.;--config;Release")
+set(command "C:/Program Files/CMake/bin/cmake.exe;--config;Release;--build;.;-GVisual Studio 15 2017 Win64")


diginove (reporter)

I do agree, the --build should be the first option. Generator at the end of the command id ok.


gpasero (administrator)

Please be aware that the support of Visual generator may not be perfect. I am trying to reproduce the error : I do get a build error. I am using Visual 2015

After your fix, some parts of SuperBuild now build, but I ran into other issues.

Rashad: since the generator should be set at configure time, I don't see the need to specify it at build time. For instance if I look into ZLIB/src/ZLIB-stamp/ZLIB-configure-Release.cmake, I see the generator option twice ! I think we can remove this extra argument. I will do a check with NMake generator.


gpasero (administrator)

I pushed a fix on branch release-6.2 :

We will see tomorrow dashboard if it breaks something.


gpasero (administrator)

A few projects are using the configure command differently (JPEG, GLUT, GLEW), I am preparing a patch for them.

In the future (not now because of coming release 6.2), I plan to review the use of these SB_CMAKE_COMMAND, SB_ENV_CONFIGURE_CMD ...


diginove (reporter)

Yes, you are right. I just modified the JPEG projet like that:
The genarator should be added (first position is OK, and if 64bit is selected, the option -D64BIT=TRUE should be TRUE.

    ${JPEG_SB_SRC} )



diginove (reporter)

Sorry, for 64BIT option, I put


Not TRUE statically


gpasero (administrator)

The 64BIT is not exposed as an option. It should be detected automatically by JPEG. Visual studio handles both 32bit and 64bit. Are you sure you setup 64bit version of the compiler ? The generator should be "Visual Studio 15 2017 Win64".


gpasero (administrator)

Dashboard is now okay. The following commits on release-6.2 should fix your issue:


-Issue History
Date Modified Username Field Change
2017-10-02 09:55 diginove New Issue
2017-10-02 11:16 diginove Note Added: 0004339
2017-10-02 11:34 rashadkm Note Added: 0004340
2017-10-02 11:35 rashadkm Note Edited: 0004340 View Revisions
2017-10-16 09:34 diginove Note Added: 0004381
2017-10-16 11:26 gpasero Assigned To => gpasero
2017-10-16 11:26 gpasero Status new => assigned
2017-10-16 13:20 gpasero Note Added: 0004384
2017-10-16 13:44 gpasero Note Added: 0004385
2017-10-17 09:50 gpasero Note Added: 0004387
2017-10-17 09:55 diginove Note Added: 0004388
2017-10-17 10:05 diginove Note Added: 0004389
2017-10-17 10:53 gpasero Note Added: 0004390
2017-10-18 09:09 gpasero Note Added: 0004395
2017-10-18 09:09 gpasero Status assigned => resolved
2017-10-18 09:09 gpasero Resolution open => fixed
+Issue History