BUG: Make sure try-compile source ends in a newline.

This commit is contained in:
Brad King 2006-06-28 17:00:31 -04:00
parent 4bdc78339b
commit ba539d9605
3 changed files with 3 additions and 3 deletions

View File

@ -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}

View File

@ -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}

View File

@ -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)