BUG: Make sure try-compile source ends in a newline.
This commit is contained in:
parent
4bdc78339b
commit
ba539d9605
|
@ -29,7 +29,7 @@ MACRO(CHECK_C_SOURCE_COMPILES SOURCE VAR)
|
|||
SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
|
||||
ENDIF(CMAKE_REQUIRED_INCLUDES)
|
||||
FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
|
||||
"${SOURCE}")
|
||||
"${SOURCE}\n")
|
||||
|
||||
MESSAGE(STATUS "Performing Test ${VAR}")
|
||||
TRY_COMPILE(${VAR}
|
||||
|
|
|
@ -29,7 +29,7 @@ MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
|
|||
SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES)
|
||||
ENDIF(CMAKE_REQUIRED_INCLUDES)
|
||||
FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx"
|
||||
"${SOURCE}")
|
||||
"${SOURCE}\n")
|
||||
|
||||
MESSAGE(STATUS "Performing Test ${VAR}")
|
||||
TRY_COMPILE(${VAR}
|
||||
|
|
|
@ -16,7 +16,7 @@ MACRO(TRY_COMPILE_FROM_SOURCE SOURCE VAR)
|
|||
|
||||
SET(src "${src}\nint main() { ${SOURCE} ; return 0; }")
|
||||
FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src2.c"
|
||||
"${src}")
|
||||
"${src}\n")
|
||||
EXEC_PROGRAM("${CMAKE_COMMAND}"
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp"
|
||||
ARGS -E copy src2.c src.c)
|
||||
|
|
Loading…
Reference in New Issue