Commit e7295161 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: use CFLAGS for testing for gnu

parent 16711ab5
......@@ -48,7 +48,13 @@ MARK_AS_ADVANCED(CMAKE_RANLIB)
IF(NOT CMAKE_COMPILER_IS_GNUCC_RUN)
# test to see if the c compiler is gnu
EXEC_PROGRAM(${CMAKE_C_COMPILER} ARGS ${CMAKE_C_FLAGS} -E "\"${CMAKE_ROOT}/Modules/CMakeTestGNU.c\"" OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN)
IF(CMAKE_C_FLAGS)
SET(CMAKE_BOOT_C_FLAGS ${CMAKE_C_FLAGS})
ELSE(CMAKE_C_FLAGS)
SET(CMAKE_BOOT_C_FLAGS $ENV{CFLAGS})
ENDIF(CMAKE_C_FLAGS)
EXEC_PROGRAM(${CMAKE_C_COMPILER} ARGS ${CMAKE_BOOT_C_FLAGS} -E "\"${CMAKE_ROOT}/Modules/CMakeTestGNU.c\"" OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN)
SET(CMAKE_COMPILER_IS_GNUCC_RUN 1)
IF(NOT CMAKE_COMPILER_RETURN)
IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment