Merge topic 'fix-forced-toolchain-dialect'

d1375851 Project: Don't require computed default dialect if compiler was forced.
This commit is contained in:
Brad King 2015-09-23 09:22:57 -04:00 committed by CMake Topic Stage
commit 20ed8bbd02
7 changed files with 35 additions and 21 deletions

View File

@ -13,10 +13,12 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.0)
endif() endif()
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.0) if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.0)
if (NOT CMAKE_C_STANDARD_COMPUTED_DEFAULT) if (NOT CMAKE_C_COMPILER_FORCED)
message(FATAL_ERROR "CMAKE_C_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_C_COMPILER_ID} (${CMAKE_C_COMPILER}) version ${CMAKE_C_COMPILER_VERSION}") if (NOT CMAKE_C_STANDARD_COMPUTED_DEFAULT)
message(FATAL_ERROR "CMAKE_C_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_C_COMPILER_ID} (${CMAKE_C_COMPILER}) version ${CMAKE_C_COMPILER_VERSION}")
endif()
set(CMAKE_C_STANDARD_DEFAULT ${CMAKE_C_STANDARD_COMPUTED_DEFAULT})
endif() endif()
set(CMAKE_C_STANDARD_DEFAULT ${CMAKE_C_STANDARD_COMPUTED_DEFAULT})
endif() endif()
macro(cmake_record_c_compile_features) macro(cmake_record_c_compile_features)

View File

@ -23,10 +23,12 @@ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
endif() endif()
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0) if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0)
if (NOT CMAKE_CXX_STANDARD_COMPUTED_DEFAULT) if (NOT CMAKE_CXX_COMPILER_FORCED)
message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}") if (NOT CMAKE_CXX_STANDARD_COMPUTED_DEFAULT)
message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}")
endif()
set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT})
endif() endif()
set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT})
endif() endif()

View File

@ -18,10 +18,12 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)
endif() endif()
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4) if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)
if (NOT CMAKE_C_STANDARD_COMPUTED_DEFAULT) if (NOT CMAKE_C_COMPILER_FORCED)
message(FATAL_ERROR "CMAKE_C_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_C_COMPILER_ID} (${CMAKE_C_COMPILER}) version ${CMAKE_C_COMPILER_VERSION}") if (NOT CMAKE_C_STANDARD_COMPUTED_DEFAULT)
message(FATAL_ERROR "CMAKE_C_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_C_COMPILER_ID} (${CMAKE_C_COMPILER}) version ${CMAKE_C_COMPILER_VERSION}")
endif()
set(CMAKE_C_STANDARD_DEFAULT ${CMAKE_C_STANDARD_COMPUTED_DEFAULT})
endif() endif()
set(CMAKE_C_STANDARD_DEFAULT ${CMAKE_C_STANDARD_COMPUTED_DEFAULT})
endif() endif()
macro(cmake_record_c_compile_features) macro(cmake_record_c_compile_features)

View File

@ -32,10 +32,12 @@ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
endif() endif()
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4) if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
if (NOT CMAKE_CXX_STANDARD_COMPUTED_DEFAULT) if (NOT CMAKE_CXX_COMPILER_FORCED)
message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}") if (NOT CMAKE_CXX_STANDARD_COMPUTED_DEFAULT)
message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}")
endif()
set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT})
endif() endif()
set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT})
endif() endif()
macro(cmake_record_cxx_compile_features) macro(cmake_record_cxx_compile_features)

View File

@ -23,10 +23,12 @@ elseif (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6)
endif() endif()
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4) if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
if (NOT CMAKE_C_STANDARD_COMPUTED_DEFAULT) if (NOT CMAKE_C_COMPILER_FORCED)
message(FATAL_ERROR "CMAKE_C_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_C_COMPILER_ID} (${CMAKE_C_COMPILER}) version ${CMAKE_C_COMPILER_VERSION}") if (NOT CMAKE_C_STANDARD_COMPUTED_DEFAULT)
message(FATAL_ERROR "CMAKE_C_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_C_COMPILER_ID} (${CMAKE_C_COMPILER}) version ${CMAKE_C_COMPILER_VERSION}")
endif()
set(CMAKE_C_STANDARD_DEFAULT ${CMAKE_C_STANDARD_COMPUTED_DEFAULT})
endif() endif()
set(CMAKE_C_STANDARD_DEFAULT ${CMAKE_C_STANDARD_COMPUTED_DEFAULT})
endif() endif()

View File

@ -35,10 +35,12 @@ elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
endif() endif()
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4) if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4)
if (NOT CMAKE_CXX_STANDARD_COMPUTED_DEFAULT) if (NOT CMAKE_CXX_COMPILER_FORCED)
message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}") if (NOT CMAKE_CXX_STANDARD_COMPUTED_DEFAULT)
message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}")
endif()
set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT})
endif() endif()
set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT})
endif() endif()
macro(cmake_record_cxx_compile_features) macro(cmake_record_cxx_compile_features)

View File

@ -37,10 +37,12 @@ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13)
endif() endif()
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13) if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13)
if (NOT CMAKE_CXX_STANDARD_COMPUTED_DEFAULT) if (NOT CMAKE_CXX_COMPILER_FORCED)
message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}") if (NOT CMAKE_CXX_STANDARD_COMPUTED_DEFAULT)
message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}")
endif()
set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT})
endif() endif()
set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT})
endif() endif()
macro(cmake_record_cxx_compile_features) macro(cmake_record_cxx_compile_features)