BUG: use ${LANG}_COMPILER_ARG1 also here, otherwise some compilers won't be

able to compile e.g. the C++ source file (e.g. the ADSP compiler needs -c++
for compiling C++ files)

Alex
This commit is contained in:
Alexander Neundorf 2007-06-27 14:55:42 -04:00
parent 04525424af
commit d44bd2551c
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ MACRO(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
STRING(REGEX REPLACE " " ";" CMAKE_${lang}_COMPILER_ID_FLAGS_LIST "${CMAKE_${lang}_COMPILER_ID_FLAGS}") STRING(REGEX REPLACE " " ";" CMAKE_${lang}_COMPILER_ID_FLAGS_LIST "${CMAKE_${lang}_COMPILER_ID_FLAGS}")
IF(COMMAND EXECUTE_PROCESS) IF(COMMAND EXECUTE_PROCESS)
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND ${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST} ${CMAKE_${lang}_COMPILER_ID_SRC} COMMAND ${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ARG1} ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST} ${CMAKE_${lang}_COMPILER_ID_SRC}
WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR} WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}
OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
ERROR_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT ERROR_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
@ -39,7 +39,7 @@ MACRO(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
ELSE(COMMAND EXECUTE_PROCESS) ELSE(COMMAND EXECUTE_PROCESS)
EXEC_PROGRAM( EXEC_PROGRAM(
${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ID_DIR} ${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ID_DIR}
ARGS ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST} \"${CMAKE_${lang}_COMPILER_ID_SRC}\" ARGS ${CMAKE_${lang}_COMPILER_ARG1} ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST} \"${CMAKE_${lang}_COMPILER_ID_SRC}\"
OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
RETURN_VALUE CMAKE_${lang}_COMPILER_ID_RESULT RETURN_VALUE CMAKE_${lang}_COMPILER_ID_RESULT
) )