[CMake] Visual Studio 2012 Beta: unable to compile individual files

Brett Delle Grazie brett.dellegrazie at gmail.com
Tue Jun 12 05:21:50 EDT 2012


On 12 June 2012 00:21, Ben Medina <ben.medina at gmail.com> wrote:
> Has anyone tried the Visual Studio 2012 beta with CMake's "Visual
> Studio 11" generator? I've tried with several projects, and even a
> simple project that just contains main.cpp has the same problem:
> compiling a single file does not work. Instead, I get this in the
> output window:
>
> 1>Error: Cannot build selected files.
>
> This seems to be because the paths to source files are absolute in the
> CMake-generated project file. If I use Visual Studio's project wizard
> to create a new project, the paths are relative, since the vcxproj and
> the source files are in the same directory. Changing the
> project-wizard-generated file to use absolute paths results in the
> same error.
>
> Any thoughts? Should I file a bug with Microsoft?

There is a variable that controls the build:
CMAKE_USE_RELATIVE_PATHS

If you set this to 'TRUE' (its false by default), does that make a difference?

>
> Thanks,
> Ben
> --

-- 
Best Regards,

Brett Delle Grazie


More information about the CMake mailing list