|
@@ -19,19 +19,19 @@ IF(NOT CMAKE_C_COMPILER)
|
|
|
|
|
|
|
|
# next try prefer the compiler specified by the generator
|
|
# next try prefer the compiler specified by the generator
|
|
|
IF(CMAKE_GENERATOR_CC)
|
|
IF(CMAKE_GENERATOR_CC)
|
|
|
- IF(NOT CMAKE_CC_COMPILER_INIT)
|
|
|
|
|
- SET(CMAKE_CC_COMPILER_INIT ${CMAKE_GENERATOR_CC})
|
|
|
|
|
- ENDIF(NOT CMAKE_CC_COMPILER_INIT)
|
|
|
|
|
|
|
+ IF(NOT CMAKE_C_COMPILER_INIT)
|
|
|
|
|
+ SET(CMAKE_C_COMPILER_INIT ${CMAKE_GENERATOR_CC})
|
|
|
|
|
+ ENDIF(NOT CMAKE_C_COMPILER_INIT)
|
|
|
ENDIF(CMAKE_GENERATOR_CC)
|
|
ENDIF(CMAKE_GENERATOR_CC)
|
|
|
|
|
|
|
|
# if no compiler has been specified yet, then look for one
|
|
# if no compiler has been specified yet, then look for one
|
|
|
- IF(NOT CMAKE_CC_COMPILER_INIT)
|
|
|
|
|
|
|
+ IF(NOT CMAKE_C_COMPILER_INIT)
|
|
|
# if not in the envionment then search for the compiler in the path
|
|
# if not in the envionment then search for the compiler in the path
|
|
|
SET(CMAKE_C_COMPILER_LIST gcc cc cl bcc )
|
|
SET(CMAKE_C_COMPILER_LIST gcc cc cl bcc )
|
|
|
FIND_PROGRAM(CMAKE_C_COMPILER_FULLPATH NAMES ${CMAKE_C_COMPILER_LIST} )
|
|
FIND_PROGRAM(CMAKE_C_COMPILER_FULLPATH NAMES ${CMAKE_C_COMPILER_LIST} )
|
|
|
GET_FILENAME_COMPONENT(CMAKE_C_COMPILER_INIT
|
|
GET_FILENAME_COMPONENT(CMAKE_C_COMPILER_INIT
|
|
|
${CMAKE_C_COMPILER_FULLPATH} NAME)
|
|
${CMAKE_C_COMPILER_FULLPATH} NAME)
|
|
|
- ENDIF(NOT CMAKE_CC_COMPILER_INIT)
|
|
|
|
|
|
|
+ ENDIF(NOT CMAKE_C_COMPILER_INIT)
|
|
|
|
|
|
|
|
SET(CMAKE_C_COMPILER ${CMAKE_C_COMPILER_INIT} CACHE STRING "C compiler")
|
|
SET(CMAKE_C_COMPILER ${CMAKE_C_COMPILER_INIT} CACHE STRING "C compiler")
|
|
|
ENDIF(NOT CMAKE_C_COMPILER)
|
|
ENDIF(NOT CMAKE_C_COMPILER)
|