From ba539d9605e04ab01bab207d5df79ef985736ced Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 28 Jun 2006 17:00:31 -0400 Subject: BUG: Make sure try-compile source ends in a newline. --- Modules/CheckCSourceCompiles.cmake | 2 +- Modules/CheckCXXSourceCompiles.cmake | 2 +- Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake index 62e26b4..767b2af 100644 --- a/Modules/CheckCSourceCompiles.cmake +++ b/Modules/CheckCSourceCompiles.cmake @@ -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} diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake index ca4a6ec..d8b8960 100644 --- a/Modules/CheckCXXSourceCompiles.cmake +++ b/Modules/CheckCXXSourceCompiles.cmake @@ -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} diff --git a/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake b/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake index ee06a97..b3367c8 100644 --- a/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake +++ b/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake @@ -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) -- cgit v0.12