0

The closest I could find was cmake invalid numeric argument '/Wextra' but I don't know where to add proposed text to CMakeLists.txt...

I'm building ITK 4.5.1 on a Windows 7 64 bit machine, using MSVC 2010.

When configuring, I get the following error. Thank you for any hint.

1> Microsoft (R) Visual Studio Version 10.0.40219.1.

1>------ Build started: Project: cmTryCompileExec91952967, Configuration: Debug x64 ------

1>Build started 17/02/2014 16:26:13.

1>PrepareForBuild:

1>  Creating directory "C:\ITK\build\CMakeFiles\CMakeTmp\Debug\".

1>InitializeBuildStatus:

1>  Creating "cmTryCompileExec91952967.dir\Debug\cmTryCompileExec91952967.unsuccessfulbuild" because "AlwaysCreate" was specified.

1>ClCompile:

1>  Microsoft (R) C/C++ Optimizing Compiler Version 16.00.40219.01 for x64

1>  cl /c /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D "C_HAS_WARNING-Wno-uninitialized" /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"cmTryCompileExec91952967.dir\Debug\\" /Fd"cmTryCompileExec91952967.dir\Debug\vc100.pdb" /Gd /TC /errorReport:prompt src.c  -Wno-uninitialized 

1>cl : Command line error D8021: invalid numeric argument '/Wno-uninitialized'
Community
  • 1
  • 1
barbara.post
  • 1,581
  • 16
  • 27
  • It looks a bit like you are trying to pass gcc parameters to the msvc compiler... – PlasmaHH Feb 18 '14 at 11:42
  • This part looks suspicious too: `/D "C_HAS_WARNING-Wno-uninitialized"`. At a guess, `C_HAS_WARNING-Wno-uninitialized` looks like a CMake variable which should be getting dereferenced inside a generator expression or `if` block. Probably showing us your CMakeLists.txt would help here. – Fraser Feb 18 '14 at 13:51

1 Answers1

1

My sources zip file was not correctly unzipped, so I had missing files, and the corresponding error was visible only on CMake-GUI interface, not in log file.

Once fixed, everything went smoothly.

barbara.post
  • 1,581
  • 16
  • 27