diff options
Diffstat (limited to 'Modules/Compiler/GNU-C.cmake')
-rw-r--r-- | Modules/Compiler/GNU-C.cmake | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/Compiler/GNU-C.cmake b/Modules/Compiler/GNU-C.cmake index 5c68b1e..d979fb7 100644 --- a/Modules/Compiler/GNU-C.cmake +++ b/Modules/Compiler/GNU-C.cmake @@ -23,10 +23,12 @@ elseif (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6) endif() if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4) - 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}") + if (NOT CMAKE_C_COMPILER_FORCED) + 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() - set(CMAKE_C_STANDARD_DEFAULT ${CMAKE_C_STANDARD_COMPUTED_DEFAULT}) endif() |