Author Topic: is vc10 known to work with nightly builds?  (Read 17499 times)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7256
Re: is vc10 known to work with nightly builds?
« Reply #15 on: January 11, 2012, 11:19:31 am »
If you use CMake to generate a project file for vc10 it should do it and put the correct info into the projectfile.

The info is to use the vc10 compiler, but not the setup oif the compiler (except things you have added under properties or build options.

If CMake is not able to generate projectfiles for vc10, you should make a feature request on their site, and if it says it generates a vc10 file, but in fact generates a vc8 (or whatever) file, it is a bug and should be fixed by the CMake devs.

There is nothing we can do here.

If you fix it manually in your CMake created projectfile, it might get lost, if you recreate this file for some reasons.

Offline bvanevery

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: is vc10 known to work with nightly builds?
« Reply #16 on: January 11, 2012, 07:39:50 pm »
Yes, CMake doesn't know your compiler setup.

Sure it does.  I told it at configuration time.  It has plenty of options to detect compiler setups; detecting system options is half of its purpose.

Quote
Also it is not logical to put the compiler setup in the project,
because the purpose of the project (original one) is to be computer independent,
so you can move the project and it will work on your friends machine,
 if he has the correct compiler and libraries.

cmakelists.txt etc. is portable, but CMake does not generate projects that are portable from machine to machine, or even directory to directory.  If you want to move stuff around, you have to generate everything all over again.  This is standard and accepted practice in the CMake universe.  So at generation time, there is no reason not to hardwire the compiler that is going to be used.  In fact any other course of action from a CMake standpoint is pretty much insane.  If you want a project for a different compiler, you generate a completely different project in a completely different directory, not touching the original source directory in any way.

CMake also remains as part of your generated build system, i.e. you must have CMake installed on your machine and it's called by the IDE when building.  In contrast, Premake generates completely standalone project files that don't need Premake any more.  So, what you say may be correct for a Premake build culture.

There is nothing we can do here.

I will hunt possible CMake bugs some other time.  Sorta blew the time budget for fiddling with things for now.  I do know that CMake did not configure the build for vc9.  Code::Blocks did that.  I think it's unreasonable for C::B to do that when I auto-detected a vc10 compiler.  If C::B has to have "dumb" defaults for labor saving reasons, I think "no compiler" is a better default than a wrong compiler, and then force the user to configure a compiler.  An error diagnostic that names the compiler being sought would help too.  If I had seen "I cannot find Microsoft Visual C++ 2005 or 2008" rather than just "I can't find the compiler,"  I would have been tipped off a lot sooner.
« Last Edit: January 11, 2012, 08:00:25 pm by bvanevery »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7256
Re: is vc10 known to work with nightly builds?
« Reply #17 on: January 11, 2012, 08:46:55 pm »
I do know that CMake did not configure the build for vc9.  Code::Blocks did that.  I think it's unreasonable for C::B to do that when I auto-detected a vc10 compiler.

If you use a CMake created projects, C::B does nothing with the compiler (of course).
The compiler-id is stored in the projectfile and it is only read by C::B (until you change it manually).
So saying C::B has configured the build for a special compiler is not correct.

Offline bvanevery

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: is vc10 known to work with nightly builds?
« Reply #18 on: January 11, 2012, 09:47:42 pm »
If you use a CMake created projects, C::B does nothing with the compiler (of course).
The compiler-id is stored in the projectfile and it is only read by C::B (until you change it manually).
So saying C::B has configured the build for a special compiler is not correct.

It seems to me that the C::B default is "Microsoft Visual C++ 2005/2008."  So it is configured in the sense of configured for everyone, everywhere, at all times, unless something else happens.  I think having "no compiler" as a default would be more reasonable than choosing a random compiler, which may or may not be present on the machine.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: is vc10 known to work with nightly builds?
« Reply #19 on: January 11, 2012, 10:18:44 pm »
It seems to me that the C::B default is "Microsoft Visual C++ 2005/2008."
My guess is that Cmake writes the wrong compiler ID for MSVC10 in the project file - the MSVC8 one. In the end MSVC10 support is rather new in C::B an I doubt that Cmake is that much up-to-date. I may be wrong though... I am not using Cmake.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ