Skip to content
Snippets Groups Projects
Commit 9cafad3a authored by pcherenkov's avatar pcherenkov
Browse files

bug977231: gcc version check moved to top-level cmake script.

parent 4ccc2f48
No related branches found
No related tags found
No related merge requests found
...@@ -40,6 +40,14 @@ if(NOT CMAKE_BUILD_TYPE) ...@@ -40,6 +40,14 @@ if(NOT CMAKE_BUILD_TYPE)
FORCE) FORCE)
endif() endif()
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
if (GCC_VERSION VERSION_GREATER 4.4 OR GCC_VERSION VERSION_EQUAL 4.4)
message(STATUS "GCC Version >= 4.4")
else()
message (FATAL_ERROR "GCC version should be >= 4.4")
endif()
# #
# Perform operating-system specific configuration. # Perform operating-system specific configuration.
# #
......
...@@ -7,14 +7,6 @@ check_c_compiler_flag ("-Wno-unused-result" gcc_has_wno_unused_result) ...@@ -7,14 +7,6 @@ check_c_compiler_flag ("-Wno-unused-result" gcc_has_wno_unused_result)
check_c_compiler_flag ("-msse4" gcc_has_sse4) check_c_compiler_flag ("-msse4" gcc_has_sse4)
check_include_file("cpuid.h" gcc_has_cpuid) check_include_file("cpuid.h" gcc_has_cpuid)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
if (GCC_VERSION VERSION_GREATER 4.4 OR GCC_VERSION VERSION_EQUAL 4.4)
message(STATUS "GCC Version >= 4.4")
else()
message (FATAL_ERROR "GCC version should be >= 4.4")
endif()
if (NOT gcc_has_sse4) if (NOT gcc_has_sse4)
message (FATAL_ERROR "GCC must support SSE4 instructions (-msse4).") message (FATAL_ERROR "GCC must support SSE4 instructions (-msse4).")
endif() endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment