Re-order C/C++/Fortran compiler determination logic

Re-organize CMakeDetermine(C|CXX|Fortran)Compiler.cmake to search for
the compiler command-line tool only under generators for which it makes
sense.  For the Visual Studio generators we do not expect to find the
compiler tool from the environment, nor would we use the result anyway.

Furthermore, set CMAKE_${lang}_COMPILER_ID_TEST_FLAGS only when it has a
chance to be used.  Extract _CMAKE_TOOLCHAIN_LOCATION from the compiler
path after running the compiler id step so in the future that step can
help find the path to the compiler.
CMakeDetermineCompilerId: Prepare to detect IDE compiler id

Teach CMAKE_DETERMINE_COMPILER_ID to check for variable
CMAKE_${lang}_COMPILER_ID_TOOL after CMAKE_DETERMINE_COMPILER_ID_BUILD
to use as CMAKE_${lang}_COMPILER since it will not be known until after
the IDE runs.

In CMAKE_DETERMINE_COMPILER_ID_BUILD prepare a cascading "if" so we can
use a generator-specific method to compile the identification source
file.  Leave "if(0)" as a placeholder for now and put the direct
compiler invocation in "else()".  After running the compiler to build
the compiler identification source we file(GLOB) the list of output
files as candidates for extracting the compiler information.  An IDE may
create directories, so exclude exclude directories from this list.
Xcode: Detect the compiler id and tool location

Configure a hand-generated Xcode project to build the compiler id source
file since we cannot run the compiler command-line tool directly.  Add a
post-build shell script phase to print out the compiler toolset build
setting.  Run xcodebuild to compile the identification binary.  Parse
the full path to the compiler tool from the xcodebuild output.
VS10: Define CMAKE_VS_PLATFORM_TOOLSET variable

When the VS 10 generator selects a non-default PlatformToolset to
specify for MSBuild, report the selected name in this variable.
VS: Detect the compiler id and tool location

Configure a hand-generated Visual Studio project to build the compiler id
source file since we cannot run the compiler command-line tool directly.
Add a post-build command to print out the full path to the compiler tool.
Parse the full path to the compiler tool from the build output.
Cleanly enable a language in multiple subdirectories

When a language is not enabled at the top level of a project but is
enabled in multiple disjoint subdirectories we should re-use the
CMake<lang>Compiler.cmake file from the first directory.  Load the file
whenever it exists and is not left from a different version of CMake.
Test variables CMAKE_(C|CXX|Fortran)_COMPILER(|_ID|_VERSION)

Add tests CMakeOnly.CompilerId(C|CXX|Fortran) to check that the basic
compiler tool path, vendor, and version variables have been set as
expected.
Document CMAKE_<LANG>_COMPILER_(ID|VERSION) values

These values are now available almost everywhere and are tested.
Document them for general use and list possible ID values.
CMake Nightly Date Stamp
Merge topic 'ide-compiler-id' into next

403ead6 Document CMAKE_<LANG>_COMPILER_(ID|VERSION) values
8be51f6 Test variables CMAKE_(C|CXX|Fortran)_COMPILER(|_ID|_VERSION)
ec22a9b Cleanly enable a language in multiple subdirectories
66cb335 VS: Detect the compiler id and tool location
89595d6 VS10: Define CMAKE_VS_PLATFORM_TOOLSET variable
965a69d Xcode: Detect the compiler id and tool location
9a9e1ee CMakeDetermineCompilerId: Prepare to detect IDE compiler id
b8b5c83 Re-order C/C++/Fortran compiler determination logic
Merge topic 'Qt4Macros-fix-resource-parsing'

3553001 Qt4Macros: Fix recently broken resource file parsing
Merge branch 'master' into next