summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CMakeTestCCompiler.cmake16
-rw-r--r--Modules/CMakeTestCXXCompiler.cmake16
-rw-r--r--Modules/CheckFunctionExists.cmake18
-rw-r--r--Modules/CheckIncludeFile.cmake16
-rw-r--r--Modules/CheckIncludeFileCXX.cmake12
-rw-r--r--Modules/CheckIncludeFiles.cmake26
-rw-r--r--Modules/CheckLibraryExists.cmake22
-rw-r--r--Modules/CheckSymbolExists.cmake34
-rw-r--r--Modules/CheckTypeSize.cmake21
-rw-r--r--Modules/CheckVariableExists.cmake18
-rw-r--r--Modules/Dart.cmake10
-rw-r--r--Modules/TestBigEndian.cmake11
-rw-r--r--Modules/TestCXXAcceptsFlag.cmake24
13 files changed, 118 insertions, 126 deletions
diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake
index b6d3383..b9f3924 100644
--- a/Modules/CMakeTestCCompiler.cmake
+++ b/Modules/CMakeTestCCompiler.cmake
@@ -5,18 +5,18 @@
# any makefiles or projects.
IF(NOT CMAKE_C_COMPILER_WORKS)
MESSAGE(STATUS "Check for working C compiler: ${CMAKE_C_COMPILER}")
- WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeTmp/testCCompiler.c "int main(){return 0;}")
+ FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeTmp/testCCompiler.c "int main(){return 0;}")
TRY_COMPILE(CMAKE_C_COMPILER_WORKS ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}/CMakeTmp/testCCompiler.c
- OUTPUT_VARIABLE OUTPUT)
+ ${CMAKE_BINARY_DIR}/CMakeTmp/testCCompiler.c
+ OUTPUT_VARIABLE OUTPUT)
ENDIF(NOT CMAKE_C_COMPILER_WORKS)
IF(NOT CMAKE_C_COMPILER_WORKS)
- MESSAGE(STATUS "Check for working C compiler: ${CMAKE_C_COMPILER} -- broken")
- MESSAGE(FATAL_ERROR "The C compiler \"${CMAKE_C_COMPILER}\" "
- "is not able to compile a simple tests program.\nIt fails "
- "with the following output:\n ${OUTPUT}\n\n"
- "CMake will not be able to correctly generate this project.")
+ MESSAGE(STATUS "Check for working C compiler: ${CMAKE_C_COMPILER} -- broken")
+ MESSAGE(FATAL_ERROR "The C compiler \"${CMAKE_C_COMPILER}\" "
+ "is not able to compile a simple tests program.\nIt fails "
+ "with the following output:\n ${OUTPUT}\n\n"
+ "CMake will not be able to correctly generate this project.")
ELSE(NOT CMAKE_C_COMPILER_WORKS)
MESSAGE(STATUS "Check for working C compiler: ${CMAKE_C_COMPILER} -- works")
ENDIF(NOT CMAKE_C_COMPILER_WORKS)
diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake
index 4c227be..26ccbc5 100644
--- a/Modules/CMakeTestCXXCompiler.cmake
+++ b/Modules/CMakeTestCXXCompiler.cmake
@@ -5,17 +5,17 @@
# any makefiles or projects.
IF(NOT CMAKE_CXX_COMPILER_WORKS)
MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER}")
- WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeTmp/testCXXCompiler.cxx "int main(){return 0;}")
+ FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeTmp/testCXXCompiler.cxx "int main(){return 0;}")
TRY_COMPILE(CMAKE_CXX_COMPILER_WORKS ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}/CMakeTmp/testCXXCompiler.cxx
- OUTPUT_VARIABLE OUTPUT)
+ ${CMAKE_BINARY_DIR}/CMakeTmp/testCXXCompiler.cxx
+ OUTPUT_VARIABLE OUTPUT)
ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)
IF(NOT CMAKE_CXX_COMPILER_WORKS)
- MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER} -- broken")
- MESSAGE(FATAL_ERROR "The C++ compiler \"${CMAKE_CXX_COMPILER}\" "
- "is not able to compile a simple tests program.\nIt fails "
- "with the following output:\n ${OUTPUT}\n\n"
- "CMake will not be able to correctly generate this project.")
+ MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER} -- broken")
+ MESSAGE(FATAL_ERROR "The C++ compiler \"${CMAKE_CXX_COMPILER}\" "
+ "is not able to compile a simple tests program.\nIt fails "
+ "with the following output:\n ${OUTPUT}\n\n"
+ "CMake will not be able to correctly generate this project.")
ELSE(NOT CMAKE_CXX_COMPILER_WORKS)
MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER} -- works")
ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)
diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake
index 191bd5e..c0073e2 100644
--- a/Modules/CheckFunctionExists.cmake
+++ b/Modules/CheckFunctionExists.cmake
@@ -9,27 +9,27 @@
MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
- "-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
+ "-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
MESSAGE(STATUS "Looking for ${FUNCTION}")
IF(CMAKE_REQUIRED_LIBRARIES)
SET(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+ "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
ENDIF(CMAKE_REQUIRED_LIBRARIES)
TRY_COMPILE(${VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_ROOT}/Modules/CheckFunctionExists.c
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
- "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT)
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_ROOT}/Modules/CheckFunctionExists.c
+ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
+ "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
+ OUTPUT_VARIABLE OUTPUT)
IF(${VARIABLE})
SET(${VARIABLE} 1 CACHE INTERNAL "Have function ${FUNCTION}")
MESSAGE(STATUS "Looking for ${FUNCTION} - found")
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for ${FUNCTION} - not found")
SET(${VARIABLE} "" CACHE INTERNAL "Have function ${FUNCTION}")
- WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeError.log
+ FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"Determining if the function ${FUNCTION} exists failed with the following output:\n"
- "${OUTPUT}\n" APPEND)
+ "${OUTPUT}\n")
ENDIF(${VARIABLE})
ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
ENDMACRO(CHECK_FUNCTION_EXISTS)
diff --git a/Modules/CheckIncludeFile.cmake b/Modules/CheckIncludeFile.cmake
index cc6a9d0..f623f2c 100644
--- a/Modules/CheckIncludeFile.cmake
+++ b/Modules/CheckIncludeFile.cmake
@@ -11,24 +11,24 @@ MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
SET(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS})
SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.c.in
- ${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFile.c IMMEDIATE)
+ ${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFile.c IMMEDIATE)
MESSAGE(STATUS "Looking for ${INCLUDE}")
TRY_COMPILE(${VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFile.c
- CMAKE_FLAGS
- -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS}
- OUTPUT_VARIABLE OUTPUT)
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFile.c
+ CMAKE_FLAGS
+ -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS}
+ OUTPUT_VARIABLE OUTPUT)
IF(${VARIABLE})
MESSAGE(STATUS "Looking for ${INCLUDE} - found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}")
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for ${INCLUDE} - not found.")
SET(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}")
- WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeError.log
+ FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"Determining if the include file ${INCLUDE} "
"exists failed with the following output:\n"
- "${OUTPUT}\n" APPEND)
+ "${OUTPUT}\n")
ENDIF(${VARIABLE})
ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
ENDMACRO(CHECK_INCLUDE_FILE)
diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake
index f8d7401..102f133 100644
--- a/Modules/CheckIncludeFileCXX.cmake
+++ b/Modules/CheckIncludeFileCXX.cmake
@@ -11,21 +11,21 @@ MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
MESSAGE(STATUS "Checking for CXX include file ${INCLUDE}")
SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
- ${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFile.cxx IMMEDIATE)
+ ${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFile.cxx IMMEDIATE)
TRY_COMPILE(${VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFile.cxx
- OUTPUT_VARIABLE OUTPUT)
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFile.cxx
+ OUTPUT_VARIABLE OUTPUT)
IF(${VARIABLE})
MESSAGE(STATUS "Checking for CXX include file ${INCLUDE} -- found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}")
ELSE(${VARIABLE})
MESSAGE(STATUS "Checking for CXX include file ${INCLUDE} -- not found")
SET(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}")
- WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeError.log
+ FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"Determining if the include file ${INCLUDE} "
"exists failed with the following output:\n"
- "${OUTPUT}\n" APPEND)
+ "${OUTPUT}\n")
ENDIF(${VARIABLE})
ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
ENDMACRO(CHECK_INCLUDE_FILE_CXX)
diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake
index b3fdf96..c010176 100644
--- a/Modules/CheckIncludeFiles.cmake
+++ b/Modules/CheckIncludeFiles.cmake
@@ -10,34 +10,32 @@ MACRO(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
SET(CHECK_INCLUDE_FILES_CONTENT "/* */\n")
SET(MACRO_CHECK_INCLUDE_FILES_FLAGS ${CMAKE_REQUIRED_FLAGS})
- STRING(ASCII 35 POUND)
- STRING(ASCII 40 41 PARENTS)
FOREACH(FILE ${INCLUDE})
SET(CHECK_INCLUDE_FILES_CONTENT
- "${CHECK_INCLUDE_FILES_CONTENT}${POUND}include <${FILE}>\n")
+ "${CHECK_INCLUDE_FILES_CONTENT}#include <${FILE}>\n")
ENDFOREACH(FILE)
SET(CHECK_INCLUDE_FILES_CONTENT
- "${CHECK_INCLUDE_FILES_CONTENT}\n\nint main${PARENTS}{return 0;}\n")
- WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFiles.c
- "${CHECK_INCLUDE_FILES_CONTENT}")
-
+ "${CHECK_INCLUDE_FILES_CONTENT}\n\nint main(){return 0;}\n")
+ FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFiles.c
+ "${CHECK_INCLUDE_FILES_CONTENT}")
+
MESSAGE(STATUS "Looking for include files ${VARIABLE}")
TRY_COMPILE(${VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFiles.c
- CMAKE_FLAGS
- -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILES_FLAGS}
- OUTPUT_VARIABLE OUTPUT)
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFiles.c
+ CMAKE_FLAGS
+ -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILES_FLAGS}
+ OUTPUT_VARIABLE OUTPUT)
IF(${VARIABLE})
MESSAGE(STATUS "Looking for include files ${VARIABLE} - found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${VARIABLE}")
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for include files ${VARIABLE} - not found.")
SET(${VARIABLE} "" CACHE INTERNAL "Have includes ${VARIABLE}")
- WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeError.log
+ FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"Determining if files ${INCLUDE} "
"exist failed with the following output:\n"
- "${OUTPUT}\n" APPEND)
+ "${OUTPUT}\n")
ENDIF(${VARIABLE})
ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
ENDMACRO(CHECK_INCLUDE_FILES)
diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake
index ea223d3..3aa33cf 100644
--- a/Modules/CheckLibraryExists.cmake
+++ b/Modules/CheckLibraryExists.cmake
@@ -9,21 +9,21 @@
MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
SET(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION
- "-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
+ "-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY}")
SET(CHECK_LIBRARY_EXISTS_LIBRARIES ${LIBRARY})
IF(CMAKE_REQUIRED_LIBRARIES)
SET(CHECK_LIBRARY_EXISTS_LIBRARIES
- ${CHECK_LIBRARY_EXISTS_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES})
+ ${CHECK_LIBRARY_EXISTS_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES})
ENDIF(CMAKE_REQUIRED_LIBRARIES)
TRY_COMPILE(${VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_ROOT}/Modules/CheckFunctionExists.c
- CMAKE_FLAGS
- -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_LIBRARY_EXISTS_DEFINITION}
- -DLINK_DIRECTORIES:STRING=${LOCATION}
- "-DLINK_LIBRARIES:STRING=${CHECK_LIBRARY_EXISTS_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT)
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_ROOT}/Modules/CheckFunctionExists.c
+ CMAKE_FLAGS
+ -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_LIBRARY_EXISTS_DEFINITION}
+ -DLINK_DIRECTORIES:STRING=${LOCATION}
+ "-DLINK_LIBRARIES:STRING=${CHECK_LIBRARY_EXISTS_LIBRARIES}"
+ OUTPUT_VARIABLE OUTPUT)
IF(${VARIABLE})
MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - found")
@@ -31,10 +31,10 @@ MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - not found")
SET(${VARIABLE} "" CACHE INTERNAL "Have library ${LIBRARY}")
- WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeError.log
+ FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"Determining if the function ${FUNCTION} exists in the ${LIBRARY} "
"failed with the following output:\n"
- "${OUTPUT}\n" APPEND)
+ "${OUTPUT}\n")
ENDIF(${VARIABLE})
ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
ENDMACRO(CHECK_LIBRARY_EXISTS)
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake
index 0ec34a1..12382a9 100644
--- a/Modules/CheckSymbolExists.cmake
+++ b/Modules/CheckSymbolExists.cmake
@@ -11,48 +11,44 @@ MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
SET(CHECK_SYMBOL_EXISTS_CONTENT "/* */\n")
SET(MACRO_CHECK_SYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS})
- STRING(ASCII 35 POUND)
- STRING(ASCII 40 OPEN_PARENT)
- STRING(ASCII 41 CLOSE_PARENT)
- SET(PARENTS "${OPEN_PARENT}${CLOSE_PARENT}")
IF(CMAKE_REQUIRED_LIBRARIES)
SET(CHECK_SYMBOL_EXISTS_LIBS
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
ENDIF(CMAKE_REQUIRED_LIBRARIES)
FOREACH(FILE ${FILES})
SET(CHECK_SYMBOL_EXISTS_CONTENT
- "${CHECK_SYMBOL_EXISTS_CONTENT}${POUND}include <${FILE}>\n")
+ "${CHECK_SYMBOL_EXISTS_CONTENT}#include <${FILE}>\n")
ENDFOREACH(FILE)
SET(CHECK_SYMBOL_EXISTS_CONTENT
- "${CHECK_SYMBOL_EXISTS_CONTENT}\nvoid cmakeRequireSymbol${OPEN_PARENT}int dummy,...${CLOSE_PARENT}{${OPEN_PARENT}void${CLOSE_PARENT}dummy;}\nint main${PARENTS}\n{\n${POUND}ifndef ${SYMBOL}\n cmakeRequireSymbol${OPEN_PARENT}0,&${SYMBOL}${CLOSE_PARENT};\n${POUND}endif\n return 0;\n}\n")
+ "${CHECK_SYMBOL_EXISTS_CONTENT}\nvoid cmakeRequireSymbol(int dummy,...){(void)dummy;}\nint main()\n{\n#ifndef ${SYMBOL}\n cmakeRequireSymbol(0,&${SYMBOL});\n#endif\n return 0;\n}\n")
+
+ FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.c
+ "${CHECK_SYMBOL_EXISTS_CONTENT}")
- WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.c
- "${CHECK_SYMBOL_EXISTS_CONTENT}")
-
MESSAGE(STATUS "Looking for ${SYMBOL}")
TRY_COMPILE(${VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.c
- CMAKE_FLAGS
- -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_SYMBOL_EXISTS_FLAGS}
- "${CHECK_SYMBOL_EXISTS_LIBS}"
- OUTPUT_VARIABLE OUTPUT)
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.c
+ CMAKE_FLAGS
+ -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_SYMBOL_EXISTS_FLAGS}
+ "${CHECK_SYMBOL_EXISTS_LIBS}"
+ OUTPUT_VARIABLE OUTPUT)
IF(${VARIABLE})
MESSAGE(STATUS "Looking for ${SYMBOL} - found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have symbol ${SYMBOL}")
- WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeOutput.log
+ FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"Determining if the ${SYMBOL} "
"exist passed with the following output:\n"
"${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.c:\n"
- "${CHECK_SYMBOL_EXISTS_CONTENT}" APPEND)
+ "${CHECK_SYMBOL_EXISTS_CONTENT}")
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for ${SYMBOL} - not found.")
SET(${VARIABLE} "" CACHE INTERNAL "Have symbol ${SYMBOL}")
- WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeError.log
+ FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"Determining if the ${SYMBOL} "
"exist failed with the following output:\n"
"${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.c:\n"
- "${CHECK_SYMBOL_EXISTS_CONTENT}" APPEND)
+ "${CHECK_SYMBOL_EXISTS_CONTENT}")
ENDIF(${VARIABLE})
ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
ENDMACRO(CHECK_SYMBOL_EXISTS)
diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake
index 78234e4..881afd9 100644
--- a/Modules/CheckTypeSize.cmake
+++ b/Modules/CheckTypeSize.cmake
@@ -10,10 +10,10 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
SET(MACRO_CHECK_TYPE_SIZE_FLAGS
- "-DCHECK_TYPE_SIZE_TYPE=\"${TYPE}\" ${CMAKE_REQUIRED_FLAGS}")
+ "-DCHECK_TYPE_SIZE_TYPE=\"${TYPE}\" ${CMAKE_REQUIRED_FLAGS}")
IF(HAVE_SYS_TYPES_H)
SET(MACRO_CHECK_TYPE_SIZE_FLAGS
- "${MACRO_CHECK_TYPE_SIZE_FLAGS} -DHAVE_SYS_TYPES_H")
+ "${MACRO_CHECK_TYPE_SIZE_FLAGS} -DHAVE_SYS_TYPES_H")
ENDIF(HAVE_SYS_TYPES_H)
IF(HAVE_STDINT_H)
SET(MACRO_CHECK_TYPE_SIZE_FLAGS "${MACRO_CHECK_TYPE_SIZE_FLAGS} -DHAVE_STDINT_H")
@@ -21,21 +21,20 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
MESSAGE(STATUS "Check size of ${TYPE}")
IF(CMAKE_REQUIRED_LIBRARIES)
SET(CHECK_TYPE_SIZE_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+ "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
ENDIF(CMAKE_REQUIRED_LIBRARIES)
TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_ROOT}/Modules/CheckTypeSize.c
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
- "${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT)
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_ROOT}/Modules/CheckTypeSize.c
+ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
+ "${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
+ OUTPUT_VARIABLE OUTPUT)
IF(HAVE_${VARIABLE})
MESSAGE(STATUS "Check size of ${TYPE} - done")
ELSE(HAVE_${VARIABLE})
MESSAGE(STATUS "Check size of ${TYPE} - failed")
- WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeError.log
- "Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\n"
- APPEND)
+ FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
+ "Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\n")
ENDIF(HAVE_${VARIABLE})
ENDIF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS )
diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake
index 57b89c8..2fb0e35 100644
--- a/Modules/CheckVariableExists.cmake
+++ b/Modules/CheckVariableExists.cmake
@@ -8,27 +8,27 @@
MACRO(CHECK_VARIABLE_EXISTS VAR VARIABLE)
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
SET(MACRO_CHECK_VARIABLE_DEFINITIONS
- "-DCHECK_VARIABLE_EXISTS=${VAR} ${CMAKE_REQUIRED_FLAGS}")
+ "-DCHECK_VARIABLE_EXISTS=${VAR} ${CMAKE_REQUIRED_FLAGS}")
MESSAGE(STATUS "Looking for ${VARIABLE}")
IF(CMAKE_REQUIRED_LIBRARIES)
SET(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
+ "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
ENDIF(CMAKE_REQUIRED_LIBRARIES)
TRY_COMPILE(${VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_ROOT}/Modules/CheckVariableExists.c
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_VARIABLE_DEFINITIONS}
- "${CHECK_VARIABLE_EXISTS_ADD_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT)
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_ROOT}/Modules/CheckVariableExists.c
+ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_VARIABLE_DEFINITIONS}
+ "${CHECK_VARIABLE_EXISTS_ADD_LIBRARIES}"
+ OUTPUT_VARIABLE OUTPUT)
IF(${VARIABLE})
SET(${VARIABLE} 1 CACHE INTERNAL "Have variable ${VAR}")
MESSAGE(STATUS "Looking for ${VARIABLE} - found")
ELSE(${VARIABLE})
SET(${VARIABLE} "" CACHE INTERNAL "Have variable ${VAR}")
MESSAGE(STATUS "Looking for ${VARIABLE} - not found")
- WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeError.log
+ FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"Determining if the variable ${VAR} exists failed with the following output:\n"
- "${OUTPUT}\n" APPEND)
+ "${OUTPUT}\n")
ENDIF(${VARIABLE})
ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
ENDMACRO(CHECK_VARIABLE_EXISTS)
diff --git a/Modules/Dart.cmake b/Modules/Dart.cmake
index d1ba97e..5dc4cab 100644
--- a/Modules/Dart.cmake
+++ b/Modules/Dart.cmake
@@ -133,8 +133,8 @@ IF(BUILD_TESTING)
IF (DART_ROOT)
# make directories in the binary tree
- MAKE_DIRECTORY(${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Dashboard)
- MAKE_DIRECTORY(${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Sites/${SITE}/${BUILDNAME})
+ FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Dashboard
+ ${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Sites/${SITE}/${BUILDNAME})
# configure files
CONFIGURE_FILE(
@@ -224,7 +224,7 @@ IF(BUILD_TESTING)
ELSE(DART_ROOT)
# make directories in the binary tree
- MAKE_DIRECTORY(${PROJECT_BINARY_DIR}/Testing/Temporary)
+ FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/Testing/Temporary)
GET_FILENAME_COMPONENT(CMAKE_HOST_PATH ${CMAKE_COMMAND} PATH)
SET(CMAKE_TARGET_PATH ${EXECUTABLE_OUTPUT_PATH})
FIND_PROGRAM(CMAKE_CTEST_COMMAND ctest ${CMAKE_HOST_PATH} ${CMAKE_TARGET_PATH})
@@ -247,8 +247,8 @@ IF(BUILD_TESTING)
FOREACH(mode Experimental Nightly Continuous NightlyMemoryCheck)
ADD_CUSTOM_TARGET(${mode} ${CMAKE_CTEST_COMMAND} -D ${mode})
ENDFOREACH(mode)
-
-
+
+
# for non IDE based builds nmake and make
# add all these extra targets
IF(${CMAKE_MAKE_PROGRAM} MATCHES make)
diff --git a/Modules/TestBigEndian.cmake b/Modules/TestBigEndian.cmake
index a244060..53cd8cb 100644
--- a/Modules/TestBigEndian.cmake
+++ b/Modules/TestBigEndian.cmake
@@ -6,12 +6,11 @@
MACRO(TEST_BIG_ENDIAN VARIABLE)
TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_ROOT}/Modules/TestBigEndian.c
- OUTPUT_VARIABLE OUTPUT)
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_ROOT}/Modules/TestBigEndian.c
+ OUTPUT_VARIABLE OUTPUT)
IF(NOT HAVE_${VARIABLE})
- WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeError.log
- "Determining the endianes of the system failed with the following output:\n${OUTPUT}\n"
- APPEND)
+ FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
+ "Determining the endianes of the system failed with the following output:\n${OUTPUT}\n")
ENDIF(NOT HAVE_${VARIABLE})
ENDMACRO(TEST_BIG_ENDIAN)
diff --git a/Modules/TestCXXAcceptsFlag.cmake b/Modules/TestCXXAcceptsFlag.cmake
index 019d289..69e2b42 100644
--- a/Modules/TestCXXAcceptsFlag.cmake
+++ b/Modules/TestCXXAcceptsFlag.cmake
@@ -7,16 +7,16 @@
#
MACRO(CHECK_CXX_ACCEPTS_FLAG FLAGS VARIABLE)
- MESSAGE(STATUS "Checking to see if CXX compiler acepts flag ${FLAGS}")
- TRY_COMPILE(${VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_ROOT}/Modules/DummyCXXFile.cxx
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${FLAGS}
- OUTPUT_VARIABLE OUTPUT)
- IF(${VARIABLE})
- MESSAGE(STATUS "Checking to see if CXX compiler acepts flag ${FLAGS} - yes")
- ELSE(${VARIABLE})
- WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeError.log
- "Determining if the CXX compiler accepts the flag ${FLAGS} failed with the following output:\n" "${OUTPUT}\n" APPEND)
- ENDIF(${VARIABLE})
+ MESSAGE(STATUS "Checking to see if CXX compiler acepts flag ${FLAGS}")
+ TRY_COMPILE(${VARIABLE}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_ROOT}/Modules/DummyCXXFile.cxx
+ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${FLAGS}
+ OUTPUT_VARIABLE OUTPUT)
+ IF(${VARIABLE})
+ MESSAGE(STATUS "Checking to see if CXX compiler acepts flag ${FLAGS} - yes")
+ ELSE(${VARIABLE})
+ FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
+ "Determining if the CXX compiler accepts the flag ${FLAGS} failed with the following output:\n${OUTPUT}\n")
+ ENDIF(${VARIABLE})
ENDMACRO(CHECK_CXX_ACCEPTS_FLAG)