diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeConfigurableFile.in | 1 | ||||
-rw-r--r-- | Modules/Compiler/GNU-CXX-FeatureTests.cmake | 4 | ||||
-rw-r--r-- | Modules/InstallRequiredSystemLibraries.cmake | 3 | ||||
-rw-r--r-- | Modules/Platform/WindowsPaths.cmake | 5 |
4 files changed, 8 insertions, 5 deletions
diff --git a/Modules/CMakeConfigurableFile.in b/Modules/CMakeConfigurableFile.in index 4cf74a1..df2c382 100644 --- a/Modules/CMakeConfigurableFile.in +++ b/Modules/CMakeConfigurableFile.in @@ -1,2 +1 @@ @CMAKE_CONFIGURABLE_FILE_CONTENT@ - diff --git a/Modules/Compiler/GNU-CXX-FeatureTests.cmake b/Modules/Compiler/GNU-CXX-FeatureTests.cmake index 7be4657..c65c22c 100644 --- a/Modules/Compiler/GNU-CXX-FeatureTests.cmake +++ b/Modules/Compiler/GNU-CXX-FeatureTests.cmake @@ -3,11 +3,13 @@ set(_cmake_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 407") # Introduced in GCC 4.8.1 -set(GNU481_CXX11 "((__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __GNUC_PATCHLEVEL__ >= 1) && __cplusplus >= 201103L") +set(GNU481_CXX11 "((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L") set(_cmake_feature_test_cxx_decltype_incomplete_return_types "${GNU481_CXX11}") set(_cmake_feature_test_cxx_reference_qualified_functions "${GNU481_CXX11}") set(GNU48_CXX11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L") set(_cmake_feature_test_cxx_alignas "${GNU48_CXX11}") +# The alignof feature works with GNU 4.7 and -std=c++11, but it is documented +# as available with GNU 4.8, so treat that as true. set(_cmake_feature_test_cxx_alignof "${GNU48_CXX11}") set(_cmake_feature_test_cxx_attributes "${GNU48_CXX11}") set(_cmake_feature_test_cxx_inheriting_constructors "${GNU48_CXX11}") diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 307aafc..5c439e9 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -157,7 +157,8 @@ if(MSVC) "${msvc_install_dir}/../../VC/redist" "${base_dir}/VC/redist" "$ENV{ProgramFiles}/Microsoft Visual Studio ${v}.0/VC/redist" - "$ENV{ProgramFiles(x86)}/Microsoft Visual Studio ${v}.0/VC/redist" + set(programfilesx86 "ProgramFiles(x86)") + "$ENV{${programfilesx86}}/Microsoft Visual Studio ${v}.0/VC/redist" ) mark_as_advanced(MSVC${v}_REDIST_DIR) set(MSVC${v}_CRT_DIR "${MSVC${v}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.CRT") diff --git a/Modules/Platform/WindowsPaths.cmake b/Modules/Platform/WindowsPaths.cmake index 3240c23..658de3b 100644 --- a/Modules/Platform/WindowsPaths.cmake +++ b/Modules/Platform/WindowsPaths.cmake @@ -56,9 +56,10 @@ else() if(DEFINED "ENV{ProgramFiles}") list(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramFiles}") endif() - if(DEFINED "ENV{ProgramFiles(x86)}") + set(programfilesx86 "ProgramFiles(x86)") + if(DEFINED "ENV{${programfilesx86}}") # 64-bit binary. 32-bit program files are in ProgramFiles(x86). - list(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramFiles(x86)}") + list(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{${programfilesx86}}") elseif(DEFINED "ENV{SystemDrive}") # Guess the 32-bit program files location. if(EXISTS "$ENV{SystemDrive}/Program Files (x86)") |