ENH: centralized locaiton of CMakeFiles setting

This commit is contained in:
Ken Martin 2006-06-14 12:28:32 -04:00
parent 108839ffda
commit 8e9a6beccc
50 changed files with 229 additions and 172 deletions

View File

@ -186,11 +186,11 @@ IF(CMAKE_BUILD_ON_VISUAL_STUDIO)
IF("CMake_HAVE_MFC" MATCHES "^CMake_HAVE_MFC$")
SET(CHECK_INCLUDE_FILE_VAR "afxwin.h")
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckIncludeFile.cxx IMMEDIATE)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx IMMEDIATE)
MESSAGE(STATUS "Looking for MFC")
TRY_COMPILE(CMake_HAVE_MFC
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckIncludeFile.cxx
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx
CMAKE_FLAGS
-DCMAKE_MFC_FLAG:STRING=2
-DCOMPILE_DEFINITIONS:STRING=-D_AFXDLL
@ -198,13 +198,13 @@ IF(CMAKE_BUILD_ON_VISUAL_STUDIO)
IF(CMake_HAVE_MFC)
MESSAGE(STATUS "Looking for MFC - found")
SET(CMake_HAVE_MFC 1 CACHE INTERNAL "Have MFC?")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if MFC exists passed with the following output:\n"
"${OUTPUT}\n\n")
ELSE(CMake_HAVE_MFC)
MESSAGE(STATUS "Looking for MFC - not found")
SET(CMake_HAVE_MFC 0 CACHE INTERNAL "Have MFC?")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if MFC exists failed with the following output:\n"
"${OUTPUT}\n\n")
ENDIF(CMake_HAVE_MFC)

View File

@ -71,11 +71,11 @@ IF(NOT CMAKE_COMPILER_IS_GNUCC_RUN)
IF(NOT CMAKE_COMPILER_RETURN)
IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
SET(CMAKE_COMPILER_IS_GNUCC 1)
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the C compiler is GNU succeeded with "
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
ELSE("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the C compiler is GNU failed with "
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )

View File

@ -54,11 +54,11 @@ IF(NOT CMAKE_COMPILER_IS_GNUCXX_RUN)
IF(NOT CMAKE_COMPILER_RETURN)
IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
SET(CMAKE_COMPILER_IS_GNUCXX 1)
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the C++ compiler is GNU succeeded with "
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
ELSE("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the C++ compiler is GNU failed with "
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
@ -73,6 +73,6 @@ ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX_RUN)
# configure all variables set in this file
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeCXXCompiler.cmake IMMEDIATE)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake IMMEDIATE)
SET(CMAKE_CXX_COMPILER_ENV_VAR "CXX")

View File

@ -91,11 +91,11 @@ IF(NOT CMAKE_COMPILER_IS_GNUG77_RUN)
IF(NOT CMAKE_COMPILER_RETURN)
IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
SET(CMAKE_COMPILER_IS_GNUG77 1)
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran compiler is GNU succeeded with "
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
ELSE("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran compiler is GNU failed with "
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
@ -111,6 +111,6 @@ ENDIF(NOT CMAKE_COMPILER_IS_GNUG77_RUN)
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeFortranCompiler.cmake IMMEDIATE)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeFortranCompiler.cmake IMMEDIATE)
MARK_AS_ADVANCED(CMAKE_AR)
SET(CMAKE_Fortran_COMPILER_ENV_VAR "FC")

View File

@ -84,6 +84,6 @@ MARK_AS_ADVANCED(CMAKE_Java_COMPILER)
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeJavaCompiler.cmake.in
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeJavaCompiler.cmake IMMEDIATE @ONLY)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeJavaCompiler.cmake IMMEDIATE @ONLY)
MARK_AS_ADVANCED(CMAKE_AR CMAKE_Java_COMPILER_FULLPATH)
SET(CMAKE_Java_COMPILER_ENV_VAR "JAVA_COMPILER")

View File

@ -44,5 +44,5 @@ MARK_AS_ADVANCED(CMAKE_RC_COMPILER)
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeRCCompiler.cmake.in
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeRCCompiler.cmake IMMEDIATE)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeRCCompiler.cmake IMMEDIATE)
SET(CMAKE_RC_COMPILER_ENV_VAR "RC")

View File

@ -74,10 +74,11 @@ IF(CMAKE_SYSTEM_VERSION)
ENDIF(CMAKE_SYSTEM_VERSION)
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"The system is: ${CMAKE_SYSTEM_NAME} - ${CMAKE_SYSTEM_VERSION} - ${CMAKE_SYSTEM_PROCESSOR}\n")
# configure variables set in this file for fast reload
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeSystem.cmake.in
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeSystem.cmake IMMEDIATE)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake
IMMEDIATE)

View File

@ -6,20 +6,20 @@
# any makefiles or projects.
IF(NOT CMAKE_C_COMPILER_WORKS)
MESSAGE(STATUS "Check for working C compiler: ${CMAKE_C_COMPILER}")
FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/testCCompiler.c
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c
"#ifdef __cplusplus\n"
"# error \"The CMAKE_C_COMPILER is set to a C++ compiler\"\n"
"#endif\n"
"int main(){return 0;}\n")
TRY_COMPILE(CMAKE_C_COMPILER_WORKS ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/testCCompiler.c
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c
OUTPUT_VARIABLE OUTPUT)
SET(C_TEST_WAS_RUN 1)
ENDIF(NOT CMAKE_C_COMPILER_WORKS)
IF(NOT CMAKE_C_COMPILER_WORKS)
MESSAGE(STATUS "Check for working C compiler: ${CMAKE_C_COMPILER} -- broken")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the C compiler works failed with "
"the following output:\n${OUTPUT}\n\n")
MESSAGE(FATAL_ERROR "The C compiler \"${CMAKE_C_COMPILER}\" "
@ -29,7 +29,7 @@ IF(NOT CMAKE_C_COMPILER_WORKS)
ELSE(NOT CMAKE_C_COMPILER_WORKS)
IF(C_TEST_WAS_RUN)
MESSAGE(STATUS "Check for working C compiler: ${CMAKE_C_COMPILER} -- works")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the C compiler works passed with "
"the following output:\n${OUTPUT}\n\n")
ENDIF(C_TEST_WAS_RUN)
@ -41,6 +41,6 @@ ELSE(NOT CMAKE_C_COMPILER_WORKS)
# the value for CMAKE_SIZEOF_VOID_P
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeCCompiler.cmake IMMEDIATE)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCCompiler.cmake IMMEDIATE)
ENDIF(NOT CMAKE_C_COMPILER_WORKS)

View File

@ -6,20 +6,20 @@
# any makefiles or projects.
IF(NOT CMAKE_CXX_COMPILER_WORKS)
MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER}")
FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx
"#ifndef __cplusplus\n"
"# error \"The CMAKE_CXX_COMPILER is set to a C compiler\"\n"
"#endif\n"
"int main(){return 0;}\n")
TRY_COMPILE(CMAKE_CXX_COMPILER_WORKS ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx
OUTPUT_VARIABLE OUTPUT)
SET(CXX_TEST_WAS_RUN 1)
ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)
IF(NOT CMAKE_CXX_COMPILER_WORKS)
MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER} -- broken")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the CXX compiler works failed with "
"the following output:\n${OUTPUT}\n\n")
MESSAGE(FATAL_ERROR "The C++ compiler \"${CMAKE_CXX_COMPILER}\" "
@ -29,7 +29,7 @@ IF(NOT CMAKE_CXX_COMPILER_WORKS)
ELSE(NOT CMAKE_CXX_COMPILER_WORKS)
IF(CXX_TEST_WAS_RUN)
MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER} -- works")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the CXX compiler works passed with "
"the following output:\n${OUTPUT}\n\n")
ENDIF(CXX_TEST_WAS_RUN)

View File

@ -6,20 +6,20 @@
# any makefiles or projects.
IF(NOT CMAKE_Fortran_COMPILER_WORKS)
MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_Fortran_COMPILER}")
FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/testFortranCompiler.f "
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f "
PROGRAM TESTFortran
PRINT *, 'Hello'
END
")
TRY_COMPILE(CMAKE_Fortran_COMPILER_WORKS ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/testFortranCompiler.f
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f
OUTPUT_VARIABLE OUTPUT)
SET(FORTRAN_TEST_WAS_RUN 1)
ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS)
IF(NOT CMAKE_Fortran_COMPILER_WORKS)
MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_Fortran_COMPILER} -- broken")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the Fortran compiler works failed with "
"the following output:\n${OUTPUT}\n\n")
MESSAGE(FATAL_ERROR "The Fortran compiler \"${CMAKE_Fortran_COMPILER}\" "
@ -29,7 +29,7 @@ IF(NOT CMAKE_Fortran_COMPILER_WORKS)
ELSE(NOT CMAKE_Fortran_COMPILER_WORKS)
IF(FORTRAN_TEST_WAS_RUN)
MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_Fortran_COMPILER} -- works")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran compiler works passed with "
"the following output:\n${OUTPUT}\n\n")
ENDIF(FORTRAN_TEST_WAS_RUN)
@ -41,23 +41,23 @@ IF(CMAKE_Fortran_COMPILER_WORKS)
IF(DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
ELSE(DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90")
FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/testFortranCompilerF90.f90 "
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90 "
PROGRAM TESTFortran90
stop = 1 ; do while ( stop .eq. 0 ) ; end do
END PROGRAM TESTFortran90
")
TRY_COMPILE(CMAKE_Fortran_COMPILER_SUPPORTS_F90 ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/testFortranCompilerF90.f90
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90
OUTPUT_VARIABLE OUTPUT)
IF(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- yes")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran compiler supports Fortran 90 passed with "
"the following output:\n${OUTPUT}\n\n")
SET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 1 CACHE INTERNAL "")
ELSE(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- no")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the Fortran compiler supports Fortran 90 failed with "
"the following output:\n${OUTPUT}\n\n")
SET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 0 CACHE INTERNAL "")

View File

@ -28,13 +28,13 @@ MACRO(CHECK_C_SOURCE_COMPILES SOURCE VAR)
ELSE(CMAKE_REQUIRED_INCLUDES)
SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
ENDIF(CMAKE_REQUIRED_INCLUDES)
FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.c"
FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
"${SOURCE}")
MESSAGE(STATUS "Performing Test ${VAR}")
TRY_COMPILE(${VAR}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.c
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
"${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"

View File

@ -28,13 +28,13 @@ MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
ELSE(CMAKE_REQUIRED_INCLUDES)
SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES)
ENDIF(CMAKE_REQUIRED_INCLUDES)
FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.cxx"
FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx"
"${SOURCE}")
MESSAGE(STATUS "Performing Test ${VAR}")
TRY_COMPILE(${VAR}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.cxx
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
"${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}"
@ -43,14 +43,14 @@ MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
IF(${VAR})
SET(${VAR} 1 CACHE INTERNAL "Test ${FUNCTION}")
MESSAGE(STATUS "Performing Test ${VAR} - Success")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n"
"${OUTPUT}\n"
"Source file was:\n${SOURCE}\n")
ELSE(${VAR})
MESSAGE(STATUS "Performing Test ${VAR} - Failed")
SET(${VAR} "" CACHE INTERNAL "Test ${FUNCTION}")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing C++ SOURCE FILE Test ${VAR} failed with the following output:\n"
"${OUTPUT}\n"
"Source file was:\n${SOURCE}\n")

View File

@ -40,13 +40,13 @@ MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
IF(${VARIABLE})
SET(${VARIABLE} 1 CACHE INTERNAL "Have function ${FUNCTION}")
MESSAGE(STATUS "Looking for ${FUNCTION} - found")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the function ${FUNCTION} exists passed with the following output:\n"
"${OUTPUT}\n\n")
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for ${FUNCTION} - not found")
SET(${VARIABLE} "" CACHE INTERNAL "Have function ${FUNCTION}")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the function ${FUNCTION} exists failed with the following output:\n"
"${OUTPUT}\n\n")
ENDIF(${VARIABLE})

View File

@ -24,7 +24,7 @@ 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}/CMakeFiles/CMakeTmp/CheckIncludeFile.c IMMEDIATE)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.c IMMEDIATE)
MESSAGE(STATUS "Looking for ${INCLUDE}")
IF(${ARGC} EQUAL 3)
SET(CMAKE_C_FLAGS_SAVE ${CMAKE_C_FLAGS})
@ -33,7 +33,7 @@ MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
TRY_COMPILE(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckIncludeFile.c
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
CMAKE_FLAGS
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS}
@ -47,14 +47,14 @@ MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
IF(${VARIABLE})
MESSAGE(STATUS "Looking for ${INCLUDE} - found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the include file ${INCLUDE} "
"exists passed with the following output:\n"
"${OUTPUT}\n\n")
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for ${INCLUDE} - not found")
SET(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the include file ${INCLUDE} "
"exists failed with the following output:\n"
"${OUTPUT}\n\n")

View File

@ -24,7 +24,7 @@ MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
SET(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS})
SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckIncludeFile.cxx IMMEDIATE)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx IMMEDIATE)
MESSAGE(STATUS "Looking for C++ include ${INCLUDE}")
IF(${ARGC} EQUAL 3)
SET(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS})
@ -33,7 +33,7 @@ MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
TRY_COMPILE(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckIncludeFile.cxx
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
CMAKE_FLAGS
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS}
@ -47,14 +47,14 @@ MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
IF(${VARIABLE})
MESSAGE(STATUS "Looking for C++ include ${INCLUDE} - found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the include file ${INCLUDE} "
"exists passed with the following output:\n"
"${OUTPUT}\n\n")
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for C++ include ${INCLUDE} - not found")
SET(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the include file ${INCLUDE} "
"exists failed with the following output:\n"
"${OUTPUT}\n\n")

View File

@ -29,12 +29,12 @@ MACRO(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
SET(CMAKE_CONFIGURABLE_FILE_CONTENT
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n\nint main(){return 0;}\n")
CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
"${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckIncludeFiles.c" @ONLY IMMEDIATE)
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.c" @ONLY IMMEDIATE)
MESSAGE(STATUS "Looking for include files ${VARIABLE}")
TRY_COMPILE(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckIncludeFiles.c
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
CMAKE_FLAGS
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILES_FLAGS}
@ -43,14 +43,14 @@ MACRO(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
IF(${VARIABLE})
MESSAGE(STATUS "Looking for include files ${VARIABLE} - found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${VARIABLE}")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if files ${INCLUDE} "
"exist passed with the following output:\n"
"${OUTPUT}\n\n")
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for include files ${VARIABLE} - not found.")
SET(${VARIABLE} "" CACHE INTERNAL "Have includes ${VARIABLE}")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if files ${INCLUDE} "
"exist failed with the following output:\n"
"${OUTPUT}\nSource:\n${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")

View File

@ -36,14 +36,14 @@ MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
IF(${VARIABLE})
MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have library ${LIBRARY}")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the function ${FUNCTION} exists in the ${LIBRARY} "
"passed with the following output:\n"
"${OUTPUT}\n\n")
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - not found")
SET(${VARIABLE} "" CACHE INTERNAL "Have library ${LIBRARY}")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the function ${FUNCTION} exists in the ${LIBRARY} "
"failed with the following output:\n"
"${OUTPUT}\n\n")

View File

@ -37,12 +37,12 @@ MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\nvoid cmakeRequireSymbol(int dummy,...){(void)dummy;}\nint main()\n{\n#ifndef ${SYMBOL}\n cmakeRequireSymbol(0,&${SYMBOL});\n#endif\n return 0;\n}\n")
CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
"${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckSymbolExists.c" @ONLY)
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c" @ONLY)
MESSAGE(STATUS "Looking for ${SYMBOL}")
TRY_COMPILE(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckSymbolExists.c
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
CMAKE_FLAGS
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_SYMBOL_EXISTS_FLAGS}
@ -52,18 +52,18 @@ MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
IF(${VARIABLE})
MESSAGE(STATUS "Looking for ${SYMBOL} - found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have symbol ${SYMBOL}")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the ${SYMBOL} "
"exist passed with the following output:\n"
"${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckSymbolExists.c:\n"
"${OUTPUT}\nFile ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c:\n"
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for ${SYMBOL} - not found.")
SET(${VARIABLE} "" CACHE INTERNAL "Have symbol ${SYMBOL}")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the ${SYMBOL} "
"exist failed with the following output:\n"
"${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckSymbolExists.c:\n"
"${OUTPUT}\nFile ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c:\n"
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
ENDIF(${VARIABLE})
ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")

View File

@ -30,8 +30,8 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
ENDFOREACH(def)
CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CheckTypeSize.c.in"
"${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" IMMEDIATE @ONLY)
FILE(READ "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c" IMMEDIATE @ONLY)
FILE(READ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
CHECK_TYPE_SIZE_FILE_CONTENT)
MESSAGE(STATUS "Check size of ${TYPE}")
IF(CMAKE_REQUIRED_LIBRARIES)
@ -48,7 +48,7 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
ENDIF(CMAKE_REQUIRED_INCLUDES)
TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
${CMAKE_BINARY_DIR}
"${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
"${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
@ -56,11 +56,11 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
OUTPUT_VARIABLE OUTPUT)
IF(HAVE_${VARIABLE})
MESSAGE(STATUS "Check size of ${TYPE} - done")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n")
ELSE(HAVE_${VARIABLE})
MESSAGE(STATUS "Check size of ${TYPE} - failed")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\nCheckTypeSize.c:\n${CHECK_TYPE_SIZE_FILE_CONTENT}\n\n")
ENDIF(HAVE_${VARIABLE})
ENDIF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")

View File

@ -34,13 +34,13 @@ MACRO(CHECK_VARIABLE_EXISTS VAR VARIABLE)
IF(${VARIABLE})
SET(${VARIABLE} 1 CACHE INTERNAL "Have variable ${VAR}")
MESSAGE(STATUS "Looking for ${VAR} - found")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the variable ${VAR} exists passed with the following output:\n"
"${OUTPUT}\n\n")
ELSE(${VARIABLE})
SET(${VARIABLE} "" CACHE INTERNAL "Have variable ${VAR}")
MESSAGE(STATUS "Looking for ${VAR} - not found")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the variable ${VAR} exists failed with the following output:\n"
"${OUTPUT}\n\n")
ENDIF(${VARIABLE})

View File

@ -647,25 +647,33 @@ IF (QT4_QMAKE_FOUND)
# find moc and uic using qmake
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeTmpQmake/tmp.pro
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake/tmp.pro
"message(MOC<$$QMAKE_MOC>)
message(UIC<$$QMAKE_UIC>)
")
EXECUTE_PROCESS(COMMAND ${QT_QMAKE_EXECUTABLE}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeTmpQmake
WORKING_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake
OUTPUT_VARIABLE _moc_OUTPUT
ERROR_VARIABLE _moc_OUTPUT )
FILE(REMOVE_RECURSE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeTmpQmake")
FILE(REMOVE_RECURSE
"${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake")
STRING(REGEX REPLACE ".*MOC<([^>]+).*" "\\1" QT_MOC_EXECUTABLE_INTERNAL "${_moc_OUTPUT}" )
STRING(REGEX REPLACE ".*UIC<([^>]+).*" "\\1" QT_UIC_EXECUTABLE_INTERNAL "${_moc_OUTPUT}" )
STRING(REGEX REPLACE
".*MOC<([^>]+).*" "\\1" QT_MOC_EXECUTABLE_INTERNAL "${_moc_OUTPUT}" )
STRING(REGEX REPLACE
".*UIC<([^>]+).*" "\\1" QT_UIC_EXECUTABLE_INTERNAL "${_moc_OUTPUT}" )
FILE(TO_CMAKE_PATH "${QT_MOC_EXECUTABLE_INTERNAL}" QT_MOC_EXECUTABLE_INTERNAL)
FILE(TO_CMAKE_PATH "${QT_UIC_EXECUTABLE_INTERNAL}" QT_UIC_EXECUTABLE_INTERNAL)
FILE(TO_CMAKE_PATH
"${QT_MOC_EXECUTABLE_INTERNAL}" QT_MOC_EXECUTABLE_INTERNAL)
FILE(TO_CMAKE_PATH
"${QT_UIC_EXECUTABLE_INTERNAL}" QT_UIC_EXECUTABLE_INTERNAL)
SET(QT_MOC_EXECUTABLE ${QT_MOC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The moc executable")
SET(QT_UIC_EXECUTABLE ${QT_UIC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The uic executable")
SET(QT_MOC_EXECUTABLE
${QT_MOC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The moc executable")
SET(QT_UIC_EXECUTABLE
${QT_UIC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The uic executable")
FIND_PROGRAM(QT_UIC3_EXECUTABLE
NAMES uic3

View File

@ -147,7 +147,7 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
# To minimize external dependencies, create a sdlsound test program
# which will be used to figure out if additional link dependencies are
# required for the link phase.
FILE(WRITE ${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp/DetermineSoundLibs.c
FILE(WRITE ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/DetermineSoundLibs.c
"#include \"SDL_sound.h\"
#include \"SDL.h\"
int main(int argc, char* argv[])
@ -176,7 +176,7 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
# in the TARGET_LINK_LIBRARIES, I seem to loose everything
# in the SDL_LIBRARY string after the "-framework".
# But if I quote the stuff in INCLUDE_DIRECTORIES, it doesn't work.
FILE(WRITE ${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp/CMakeLists.txt
FILE(WRITE ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CMakeLists.txt
"PROJECT(DetermineSoundLibs)
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR})
ADD_EXECUTABLE(DetermineSoundLibs DetermineSoundLibs.c)
@ -185,8 +185,8 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
TRY_COMPILE(
MY_RESULT
${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp
${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp
${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
DetermineSoundLibs
OUTPUT_VARIABLE MY_OUTPUT
)

View File

@ -62,12 +62,14 @@ ELSE(CMAKE_HAVE_SPROC_H)
MESSAGE(STATUS "Check if compiler accepts -pthread - yes")
ELSE(THREADS_PTHREAD_ARG MATCHES "^2$")
MESSAGE(STATUS "Check if compiler accepts -pthread - no")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if compiler accepts -pthread returned ${THREADS_PTHREAD_ARG} instead of 2. The compiler had the following output:\n${OUTPUT}\n\n")
ENDIF(THREADS_PTHREAD_ARG MATCHES "^2$")
ELSE(THREADS_HAVE_PTHREAD_ARG)
MESSAGE(STATUS "Check if compiler accepts -pthread - no")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if compiler accepts -pthread failed with the following output:\n${OUTPUT}\n\n")
ENDIF(THREADS_HAVE_PTHREAD_ARG)
ENDIF("THREADS_HAVE_PTHREAD_ARG" MATCHES "^THREADS_HAVE_PTHREAD_ARG")

View File

@ -92,7 +92,7 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles")
RETURN_VALUE CMAKE_COMPILER_RETURN
)
IF(NOT CMAKE_COMPILER_RETURN)
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining the version of compiler passed with the following output:\n"
"${CMAKE_COMPILER_OUTPUT}\n\n")
STRING(REGEX REPLACE "\n" " " compilerVersion "${CMAKE_COMPILER_OUTPUT}")
@ -127,40 +127,40 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles")
SET(MSVC_VERSION "${compilerVersion}")
ELSE(NOT CMAKE_COMPILER_RETURN)
MESSAGE(STATUS "Check for CL compiler version - failed")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining the version of compiler failed with the following output:\n"
"${CMAKE_COMPILER_OUTPUT}\n\n")
ENDIF(NOT CMAKE_COMPILER_RETURN)
# try to figure out if we are running the free command line
# tools from Microsoft. These tools do not provide debug libraries,
# so the link flags used have to be different.
MAKE_DIRECTORY("${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp2")
MAKE_DIRECTORY("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp2")
SET(testForFreeVCFile
"${CMAKE_ROOT}/Modules/CMakeTestForFreeVC.cxx")
STRING(REGEX REPLACE "/" "\\\\" testForFreeVCFile "${testForFreeVCFile}")
MESSAGE(STATUS "Check if this is a free VC compiler")
EXEC_PROGRAM(${CMAKE_C_COMPILER} ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp2
EXEC_PROGRAM(${CMAKE_C_COMPILER} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp2
ARGS /nologo /MD /EHsc
\"${testForFreeVCFile}\"
OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT
RETURN_VALUE CMAKE_COMPILER_RETURN
)
IF(CMAKE_COMPILER_RETURN)
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if this is a free VC compiler failed with the following output:\n"
"${CMAKE_COMPILER_OUTPUT}\n\n")
MESSAGE(STATUS "Check if this is a free VC compiler - yes")
SET(CMAKE_USING_VC_FREE_TOOLS 1)
ELSE(CMAKE_COMPILER_RETURN)
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if this is a free VC compiler passed with the following output:\n"
"${CMAKE_COMPILER_OUTPUT}\n\n")
MESSAGE(STATUS "Check if this is a free VC compiler - no")
SET(CMAKE_USING_VC_FREE_TOOLS 0)
ENDIF(CMAKE_COMPILER_RETURN)
MAKE_DIRECTORY("${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp3")
MAKE_DIRECTORY("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp3")
MESSAGE(STATUS "Check CL platform")
EXEC_PROGRAM(${CMAKE_C_COMPILER} ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp3
EXEC_PROGRAM(${CMAKE_C_COMPILER} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp3
ARGS /nologo
\"${testForFreeVCFile}\"
/link /machine:i386
@ -170,13 +170,13 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles")
# if there was an error assume it is a 64bit system
IF(CMAKE_COMPILER_RETURN)
FILE(APPEND
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if this is a 64 bit system passed:\n"
"${CMAKE_COMPILER_OUTPUT}\n\n")
MESSAGE(STATUS "Check CL platform - 64 bit")
SET(CMAKE_CL_64 1)
ELSE(CMAKE_COMPILER_RETURN)
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if this is a 32 bit system passed:\n"
"${CMAKE_COMPILER_OUTPUT}\n\n")
MESSAGE(STATUS "Check CL platform - 32 bit")
@ -275,12 +275,12 @@ SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELW
# save computed information for this platform
IF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake")
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeCPlatform.cmake IMMEDIATE)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCPlatform.cmake IMMEDIATE)
ENDIF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake")
IF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake")
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeCXXPlatform.cmake IMMEDIATE)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXPlatform.cmake IMMEDIATE)
ENDIF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake")
INCLUDE(Platform/WindowsPaths)

View File

@ -15,21 +15,21 @@ MACRO(TEST_BIG_ENDIAN VARIABLE)
ENDIF("${VARIABLE}" STREQUAL "FAILED_TO_RUN")
MESSAGE(STATUS "Check if the system is big endian")
IF(HAVE_${VARIABLE})
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining the endianes of the system passed. The system is ")
IF(${VARIABLE})
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"big endian")
MESSAGE(STATUS "Check if the system is big endian - big endian")
ELSE(${VARIABLE})
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"little endian")
MESSAGE(STATUS "Check if the system is big endian - little endian")
ENDIF(${VARIABLE})
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Test produced following output:\n${OUTPUT}\n\n")
ELSE(HAVE_${VARIABLE})
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining the endianes of the system failed with the following output:\n${OUTPUT}\n\n")
MESSAGE("Check if the system is big endian - failed")
ENDIF(HAVE_${VARIABLE})

View File

@ -17,12 +17,12 @@ MACRO(CHECK_CXX_ACCEPTS_FLAG FLAGS VARIABLE)
OUTPUT_VARIABLE OUTPUT)
IF(${VARIABLE})
MESSAGE(STATUS "Checking to see if CXX compiler accepts flag ${FLAGS} - yes")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the CXX compiler accepts the flag ${FLAGS} passed with "
"the following output:\n${OUTPUT}\n\n")
ELSE(${VARIABLE})
MESSAGE(STATUS "Checking to see if CXX compiler accepts flag ${FLAGS} - no")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the CXX compiler accepts the flag ${FLAGS} failed with "
"the following output:\n${OUTPUT}\n\n")
ENDIF(${VARIABLE})

View File

@ -12,14 +12,14 @@ IF("CMAKE_ANSI_FOR_SCOPE" MATCHES "^CMAKE_ANSI_FOR_SCOPE$")
MESSAGE(STATUS "Check for ANSI scope - found")
SET (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL
"Does the compiler support ansi for scope.")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the CXX compiler understands ansi for scopes passed with "
"the following output:\n${OUTPUT}\n\n")
ELSE (CMAKE_ANSI_FOR_SCOPE)
MESSAGE(STATUS "Check for ANSI scope - not found")
SET (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL
"Does the compiler support ansi for scope.")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the CXX compiler understands ansi for scopes failed with "
"the following output:\n${OUTPUT}\n\n")
ENDIF (CMAKE_ANSI_FOR_SCOPE)

View File

@ -11,14 +11,14 @@ IF("CMAKE_HAS_ANSI_STRING_STREAM" MATCHES "^CMAKE_HAS_ANSI_STRING_STREAM$")
MESSAGE(STATUS "Check for sstream - found")
SET (CMAKE_NO_ANSI_STRING_STREAM 0 CACHE INTERNAL
"Does the compiler support sstream")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the CXX compiler has sstream passed with "
"the following output:\n${OUTPUT}\n\n")
ELSE (CMAKE_HAS_ANSI_STRING_STREAM)
MESSAGE(STATUS "Check for sstream - not found")
SET (CMAKE_NO_ANSI_STRING_STREAM 1 CACHE INTERNAL
"Does the compiler support sstream")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the CXX compiler has sstream failed with "
"the following output:\n${OUTPUT}\n\n")
ENDIF (CMAKE_HAS_ANSI_STRING_STREAM)

View File

@ -11,14 +11,14 @@ IF("CMAKE_STD_NAMESPACE" MATCHES "^CMAKE_STD_NAMESPACE$")
MESSAGE(STATUS "Check for STD namespace - found")
SET (CMAKE_NO_STD_NAMESPACE 0 CACHE INTERNAL
"Does the compiler support std::.")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the CXX compiler has std namespace passed with "
"the following output:\n${OUTPUT}\n\n")
ELSE (CMAKE_STD_NAMESPACE)
MESSAGE(STATUS "Check for STD namespace - not found")
SET (CMAKE_NO_STD_NAMESPACE 1 CACHE INTERNAL
"Does the compiler support std::.")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the CXX compiler has std namespace failed with "
"the following output:\n${OUTPUT}\n\n")
ENDIF (CMAKE_STD_NAMESPACE)

View File

@ -19,6 +19,7 @@
#include "cmSystemTools.h"
#include "cmCacheManager.h"
#include "cmMakefile.h"
#include "cmake.h"
#include <cmsys/Directory.hxx>
#include <cmsys/Glob.hxx>
@ -163,7 +164,8 @@ bool cmCacheManager::ParseEntry(const char* entry,
void cmCacheManager::CleanCMakeFiles(const char* path)
{
std::string glob = path;
glob += "/CMakeFiles/*.cmake";
glob += cmake::GetCMakeFilesDirectory();
glob += "/*.cmake";
cmsys::Glob globIt;
globIt.FindFiles(glob);
std::vector<std::string> files = globIt.GetFiles();
@ -601,7 +603,7 @@ bool cmCacheManager::SaveCache(const char* path)
cacheFile.c_str());
cmSystemTools::RemoveFile(tempFile.c_str());
std::string checkCacheFile = path;
checkCacheFile += "/CMakeFiles";
checkCacheFile += cmake::GetCMakeFilesDirectory();
cmSystemTools::MakeDirectory(checkCacheFile.c_str());
checkCacheFile += "/cmake.check_cache";
std::ofstream checkCache(checkCacheFile.c_str());
@ -626,7 +628,7 @@ bool cmCacheManager::DeleteCache(const char* path)
// now remove the files in the CMakeFiles directory
// this cleans up language cache files
cmsys::Directory dir;
cmakeFiles += "/CMakeFiles";
cmakeFiles += cmake::GetCMakeFilesDirectory();
dir.Load(cmakeFiles.c_str());
for (unsigned long fileNum = 0;
fileNum < dir.GetNumberOfFiles();

View File

@ -175,7 +175,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
}
mf->AddDefinition("RUN_CONFIGURE", true);
std::string rootBin = mf->GetHomeOutputDirectory();
rootBin += "/CMakeFiles";
rootBin += cmake::GetCMakeFilesDirectory();
// If the configuration files path has been set,
// then we are in a try compile and need to copy the enable language
@ -930,7 +930,7 @@ cmLocalGenerator *cmGlobalGenerator::CreateLocalGenerator()
void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator *gen )
{
std::string cfp = gen->GetCMakeInstance()->GetHomeOutputDirectory();
cfp += "/CMakeFiles";
cfp += cmake::GetCMakeFilesDirectory();
this->SetConfiguredFilesPath(cfp.c_str());
const char* make =
gen->GetCMakeInstance()->GetCacheDefinition("CMAKE_MAKE_PROGRAM");

View File

@ -134,7 +134,9 @@ bool cmGlobalKdevelopGenerator
tmp=*lt;
cmSystemTools::ReplaceString(tmp, projectDir.c_str(), "");
// make sure the file is part of this source tree
if ((tmp[0]!='/') && (strstr(tmp.c_str(), "CMakeFiles/")==0))
if ((tmp[0]!='/') &&
(strstr(tmp.c_str(),
cmake::GetCMakeFilesDirectoryPostSlash())==0))
{
files.insert(tmp);
tmp=cmSystemTools::GetFilenameName(tmp);
@ -159,7 +161,8 @@ bool cmGlobalKdevelopGenerator
{
tmp=(*si)->GetFullPath();
cmSystemTools::ReplaceString(tmp, projectDir.c_str(), "");
if ((tmp[0]!='/') && (strstr(tmp.c_str(), "CMakeFiles/")==0))
if ((tmp[0]!='/') &&
(strstr(tmp.c_str(), cmake::GetCMakeFilesDirectoryPostSlash())==0))
{
files.insert(tmp);
}
@ -169,7 +172,8 @@ bool cmGlobalKdevelopGenerator
{
tmp=*lt;
cmSystemTools::ReplaceString(tmp, projectDir.c_str(), "");
if ((tmp[0]!='/') && (strstr(tmp.c_str(), "CMakeFiles/")==0))
if ((tmp[0]!='/') &&
(strstr(tmp.c_str(), cmake::GetCMakeFilesDirectoryPostSlash())==0))
{
files.insert(tmp.c_str());
}

View File

@ -206,7 +206,8 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2()
// see if the build system must be regenerated.
std::string makefileName =
this->GetCMakeInstance()->GetHomeOutputDirectory();
makefileName += "/CMakeFiles/Makefile2";
makefileName += cmake::GetCMakeFilesDirectory();
makefileName += "/Makefile2";
cmGeneratedFileStream makefileStream(makefileName.c_str());
if(!makefileStream)
{
@ -293,7 +294,8 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
// see if the build system must be regenerated.
std::string cmakefileName =
this->GetCMakeInstance()->GetHomeOutputDirectory();
cmakefileName += "/CMakeFiles/Makefile.cmake";
cmakefileName += cmake::GetCMakeFilesDirectory();
cmakefileName += "/Makefile.cmake";
cmGeneratedFileStream cmakefileStream(cmakefileName.c_str());
if(!cmakefileStream)
{
@ -360,7 +362,8 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
// Build the path to the cache check file.
std::string check = this->GetCMakeInstance()->GetHomeOutputDirectory();
check += "/CMakeFiles/cmake.check_cache";
check += cmake::GetCMakeFilesDirectory();
check += "/cmake.check_cache";
// Set the corresponding makefile in the cmake file.
cmakefileStream
@ -380,7 +383,8 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
lg =
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
tmpStr = lg->GetMakefile()->GetStartOutputDirectory();
tmpStr += "/CMakeFiles/CMakeDirectoryInformation.cmake";
tmpStr += cmake::GetCMakeFilesDirectory();
tmpStr += "/CMakeDirectoryInformation.cmake";
cmakefileStream << " \"" <<
lg->Convert(tmpStr.c_str(),cmLocalGenerator::HOME_OUTPUT).c_str()
<< "\"\n";
@ -707,7 +711,7 @@ cmGlobalUnixMakefileGenerator3
commands.clear();
std::string progressDir =
lg->GetMakefile()->GetHomeOutputDirectory();
progressDir += "/CMakeFiles";
progressDir += cmake::GetCMakeFilesDirectory();
{
// TODO: Convert the total progress count to a make variable.
@ -734,8 +738,10 @@ cmGlobalUnixMakefileGenerator3
}
commands.push_back(progCmd.str());
}
std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash();
tmp += "Makefile2";
commands.push_back(lg->GetRecursiveMakeCall
("CMakeFiles/Makefile2",t->second.GetName()));
(tmp.c_str(),t->second.GetName()));
{
cmOStringStream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
@ -846,7 +852,7 @@ cmGlobalUnixMakefileGenerator3
std::string progressDir =
lg->GetMakefile()->GetHomeOutputDirectory();
progressDir += "/CMakeFiles";
progressDir += cmake::GetCMakeFilesDirectory();
cmOStringStream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report ";
// all target counts
@ -881,8 +887,10 @@ cmGlobalUnixMakefileGenerator3
// Write the rule.
commands.clear();
std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash();
tmp += "Makefile2";
commands.push_back(lg->GetRecursiveMakeCall
("CMakeFiles/Makefile2",localName.c_str()));
(tmp.c_str(),localName.c_str()));
depends.clear();
depends.push_back("cmake_check_build_system");
localName = lg->GetRelativeTargetDirectory(t->second);

View File

@ -366,7 +366,8 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile(cmLocalGenerator* root)
(this->CurrentReRunCMakeMakefile.c_str());
makefileStream.SetCopyIfDifferent(true);
makefileStream << "# Generated by CMake, DO NOT EDIT\n";
makefileStream << "CMakeFiles/cmake.check_cache: ";
makefileStream << cmake::GetCMakeFilesDirectoryPostSlash();
makefileStream << "cmake.check_cache: ";
for(std::vector<std::string>::const_iterator i = lfiles.begin();
i != lfiles.end(); ++i)
{

View File

@ -20,6 +20,7 @@
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmTarget.h"
#include "cmake.h"
//----------------------------------------------------------------------------
cmInstallTargetGenerator
@ -48,7 +49,8 @@ void cmInstallTargetGenerator::GenerateScript(std::ostream& os)
if(this->Target->NeedRelinkBeforeInstall())
{
fromDir = this->Target->GetMakefile()->GetStartOutputDirectory();
fromDir += "/CMakeFiles/CMakeRelink.dir/";
fromDir += cmake::GetCMakeFilesDirectory();
fromDir += "/CMakeRelink.dir/";
}
else
{

View File

@ -52,7 +52,7 @@ void cmLocalGenerator::Configure()
{
// make sure the CMakeFiles dir is there
std::string filesDir = this->Makefile->GetStartOutputDirectory();
filesDir += "/CMakeFiles";
filesDir += cmake::GetCMakeFilesDirectory();
cmSystemTools::MakeDirectory(filesDir.c_str());
// find & read the list file

View File

@ -280,8 +280,10 @@ void cmLocalUnixMakefileGenerator3
depends.clear();
// Build the target for this pass.
std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash();
tmp += "Makefile2";
commands.push_back(this->GetRecursiveMakeCall
("CMakeFiles/Makefile2",localName.c_str()));
(tmp.c_str(),localName.c_str()));
this->CreateCDCommand(commands,
this->Makefile->GetHomeOutputDirectory(),
this->Makefile->GetStartOutputDirectory());
@ -322,7 +324,8 @@ void cmLocalUnixMakefileGenerator3
void cmLocalUnixMakefileGenerator3::WriteDirectoryInformationFile()
{
std::string infoFileName = this->Makefile->GetStartOutputDirectory();
infoFileName += "/CMakeFiles/CMakeDirectoryInformation.cmake";
infoFileName += cmake::GetCMakeFilesDirectory();
infoFileName += "/CMakeDirectoryInformation.cmake";
// Open the output file.
cmGeneratedFileStream infoFileStream(infoFileName.c_str());
@ -653,7 +656,8 @@ void cmLocalUnixMakefileGenerator3
// the --check-build-system flag.
{
// Build command to run CMake to check if anything needs regenerating.
std::string cmakefileName = "CMakeFiles/Makefile.cmake";
std::string cmakefileName = cmake::GetCMakeFilesDirectoryPostSlash();
cmakefileName += "Makefile.cmake";
std::string runRule =
"$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)";
runRule += " --check-build-system ";
@ -1158,7 +1162,8 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies(const char* tgtInfo)
cmMakefile* mf = this->Makefile;
bool haveDirectoryInfo = false;
std::string dirInfoFile = this->Makefile->GetStartOutputDirectory();
dirInfoFile += "/CMakeFiles/CMakeDirectoryInformation.cmake";
dirInfoFile += cmake::GetCMakeFilesDirectory();
dirInfoFile += "/CMakeDirectoryInformation.cmake";
if(mf->ReadListFile(0, dirInfoFile.c_str()) &&
!cmSystemTools::GetErrorOccuredFlag())
{
@ -1437,7 +1442,7 @@ void cmLocalUnixMakefileGenerator3
if (!this->Parent)
{
std::string progressDir = this->Makefile->GetHomeOutputDirectory();
progressDir += "/CMakeFiles";
progressDir += cmake::GetCMakeFilesDirectory();
cmOStringStream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # src files
progCmd << this->Convert(progressDir.c_str(),
@ -1454,15 +1459,16 @@ void cmLocalUnixMakefileGenerator3
commands.push_back(progCmd.str());
}
commands.push_back
(this->GetRecursiveMakeCall("CMakeFiles/Makefile2",dir.c_str()));
std::string mf2Dir = cmake::GetCMakeFilesDirectoryPostSlash();
mf2Dir += "Makefile2";
commands.push_back(this->GetRecursiveMakeCall(mf2Dir.c_str(),dir.c_str()));
this->CreateCDCommand(commands,
this->Makefile->GetHomeOutputDirectory(),
this->Makefile->GetStartOutputDirectory());
this->Makefile->GetHomeOutputDirectory(),
this->Makefile->GetStartOutputDirectory());
if (!this->Parent)
{
std::string progressDir = this->Makefile->GetHomeOutputDirectory();
progressDir += "/CMakeFiles";
progressDir += cmake::GetCMakeFilesDirectory();
cmOStringStream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
progCmd << this->Convert(progressDir.c_str(),
@ -1480,8 +1486,7 @@ void cmLocalUnixMakefileGenerator3
dir = this->Convert(dir.c_str(),HOME_OUTPUT,MAKEFILE);
commands.clear();
depends.clear();
commands.push_back
(this->GetRecursiveMakeCall("CMakeFiles/Makefile2",dir.c_str()));
commands.push_back(this->GetRecursiveMakeCall(mf2Dir.c_str(),dir.c_str()));
this->CreateCDCommand(commands,
this->Makefile->GetHomeOutputDirectory(),
this->Makefile->GetStartOutputDirectory());
@ -1512,7 +1517,7 @@ void cmLocalUnixMakefileGenerator3
depends.push_back("cmake_check_build_system");
}
commands.push_back
(this->GetRecursiveMakeCall("CMakeFiles/Makefile2", dir.c_str()));
(this->GetRecursiveMakeCall(mf2Dir.c_str(), dir.c_str()));
this->CreateCDCommand(commands,
this->Makefile->GetHomeOutputDirectory(),
this->Makefile->GetStartOutputDirectory());
@ -1525,7 +1530,8 @@ void cmLocalUnixMakefileGenerator3
// write the depend rule, really a recompute depends rule
depends.clear();
commands.clear();
std::string cmakefileName = "CMakeFiles/Makefile.cmake";
std::string cmakefileName = cmake::GetCMakeFilesDirectoryPostSlash();
cmakefileName += "Makefile.cmake";
this->Convert(cmakefileName.c_str(),HOME_OUTPUT,
cmLocalGenerator::MAKEFILE);
std::string runRule =
@ -1873,7 +1879,7 @@ cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath(const char* p)
std::string
cmLocalUnixMakefileGenerator3::GetTargetDirectory(cmTarget& target)
{
std::string dir = "CMakeFiles/";
std::string dir = cmake::GetCMakeFilesDirectoryPostSlash();
dir += target.GetName();
dir += ".dir";
return dir;

View File

@ -1868,6 +1868,9 @@ void cmMakefile::AddDefaultDefinitions()
this->AddDefinition("CMAKE_MINOR_VERSION", temp);
sprintf(temp, "%d", cmMakefile::GetMajorVersion());
this->AddDefinition("CMAKE_MAJOR_VERSION", temp);
this->AddDefinition("CMAKE_FILES_DIRECTORY",
cmake::GetCMakeFilesDirectory());
}
#if defined(CMAKE_BUILD_WITH_CMAKE)

View File

@ -22,6 +22,7 @@
#include "cmMakefile.h"
#include "cmSourceFile.h"
#include "cmTarget.h"
#include "cmake.h"
//----------------------------------------------------------------------------
void cmMakefileExecutableTargetGenerator::WriteRuleFiles()
@ -168,7 +169,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
if(relink)
{
outpath = this->Makefile->GetStartOutputDirectory();
outpath += "/CMakeFiles/CMakeRelink.dir";
outpath += cmake::GetCMakeFilesDirectory();
outpath += "/CMakeRelink.dir";
cmSystemTools::MakeDirectory(outpath.c_str());
outpath += "/";
}

View File

@ -22,6 +22,7 @@
#include "cmMakefile.h"
#include "cmSourceFile.h"
#include "cmTarget.h"
#include "cmake.h"
//----------------------------------------------------------------------------
void cmMakefileLibraryTargetGenerator::WriteRuleFiles()
@ -244,7 +245,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
if(relink)
{
outpath = this->Makefile->GetStartOutputDirectory();
outpath += "/CMakeFiles/CMakeRelink.dir";
outpath += cmake::GetCMakeFilesDirectory();
outpath += "/CMakeRelink.dir";
cmSystemTools::MakeDirectory(outpath.c_str());
outpath += "/";
}
@ -428,7 +430,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
vars.TargetPDB = targetOutPathPDB.c_str();
vars.Language = linkLanguage;
vars.Objects = buildObjs.c_str();
std::string objdir = "CMakeFiles/";
std::string objdir = cmake::GetCMakeFilesDirectoryPostSlash();
objdir += this->Target->GetName();
objdir += ".dir";
vars.ObjectDir = objdir.c_str();

View File

@ -23,6 +23,7 @@
#include "cmMakefile.h"
#include "cmSourceFile.h"
#include "cmTarget.h"
#include "cmake.h"
#include "cmMakefileExecutableTargetGenerator.h"
#include "cmMakefileLibraryTargetGenerator.h"
@ -404,7 +405,7 @@ cmMakefileTargetGenerator
int prog = gg->ShouldAddProgressRule();
std::string progressDir = this->Makefile->GetHomeOutputDirectory();
progressDir += "/CMakeFiles";
progressDir += cmake::GetCMakeFilesDirectory();
cmOStringStream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report ";
progCmd << this->LocalGenerator->Convert(progressDir.c_str(),

View File

@ -110,7 +110,9 @@ int cmTryCompileCommand::CoreTryCompileCode(
// signature
if (srcFileSignature)
{
tmpString = argv[1] + "/CMakeFiles/CMakeTmp";
tmpString = argv[1];
tmpString += cmake::GetCMakeFilesDirectory();
tmpString += "/CMakeTmp";
binaryDirectory = tmpString.c_str();
}
// make sure the binary directory exists

View File

@ -68,7 +68,9 @@ bool cmTryRunCommand::InitialPass(std::vector<std::string> const& argv)
tryCompile, false);
// now try running the command if it compiled
std::string binaryDirectory = argv[2] + "/CMakeFiles/CMakeTmp";
std::string binaryDirectory = argv[2];
binaryDirectory += cmake::GetCMakeFilesDirectory();
binaryDirectory += "/CMakeTmp";
if (!res)
{
int retVal = -1;

View File

@ -67,6 +67,10 @@ class cmake
static unsigned int GetMinorVersion();
static const char *GetReleaseVersion();
///! construct an instance of cmake
static const char *GetCMakeFilesDirectory() {return "/CMakeFiles";};
static const char *GetCMakeFilesDirectoryPostSlash() {return "CMakeFiles/";};
//@{
/**
* Set/Get the home directory (or output directory) in the project. The

View File

@ -7,10 +7,12 @@ MACRO(KWSYS_PLATFORM_CXX_TEST var description invert)
COMPILE_DEFINITIONS -DTEST_${var} ${KWSYS_PLATFORM_CXX_TEST_DEFINES}
OUTPUT_VARIABLE OUTPUT)
IF(${var}_COMPILED)
FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"${description} compiled with the following output:\n${OUTPUT}\n\n")
ELSE(${var}_COMPILED)
FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"${description} failed to compile with the following output:\n${OUTPUT}\n\n")
ENDIF(${var}_COMPILED)
IF(${invert} MATCHES INVERT)

View File

@ -6,7 +6,7 @@ ADD_EXECUTABLE(toclean toclean.cxx)
# List some build-time-generated files.
GET_TARGET_PROPERTY(TOCLEAN_FILES toclean LOCATION)
SET(TOCLEAN_FILES ${TOCLEAN_FILES}
"${ToClean_BINARY_DIR}/CMakeFiles/toclean.dir/toclean${CMAKE_CXX_OUTPUT_EXTENSION}")
"${ToClean_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/toclean.dir/toclean${CMAKE_CXX_OUTPUT_EXTENSION}")
# Create a file that must be registered for cleaning.
FILE(WRITE "${ToClean_BINARY_DIR}/Registered.txt"

View File

@ -2,7 +2,7 @@ PROJECT(TryCompile)
# try to compile a file that should compile
TRY_COMPILE(SHOULD_PASS
${TryCompile_BINARY_DIR}/CMakeFiles/CMakeTmp
${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
${TryCompile_SOURCE_DIR}/pass.c
OUTPUT_VARIABLE TRY_OUT)
IF(NOT SHOULD_PASS)
@ -11,7 +11,7 @@ ENDIF(NOT SHOULD_PASS)
# try to compile a file that should not compile
TRY_COMPILE(SHOULD_FAIL
${TryCompile_BINARY_DIR}/CMakeFiles/CMakeTmp
${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
${TryCompile_SOURCE_DIR}/fail.c
OUTPUT_VARIABLE TRY_OUT)
IF(SHOULD_FAIL)
@ -20,7 +20,7 @@ ENDIF(SHOULD_FAIL)
# try to compile a file that should compile
TRY_COMPILE(SHOULD_PASS
${TryCompile_BINARY_DIR}/CMakeFiles/CMakeTmp
${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
${TryCompile_SOURCE_DIR}/pass.c
OUTPUT_VARIABLE TRY_OUT)
IF(NOT SHOULD_PASS)
@ -29,7 +29,7 @@ ENDIF(NOT SHOULD_PASS)
# try to compile a file that should not compile
TRY_COMPILE(SHOULD_FAIL
${TryCompile_BINARY_DIR}/CMakeFiles/CMakeTmp
${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
${TryCompile_SOURCE_DIR}/fail.c
OUTPUT_VARIABLE TRY_OUT)
IF(SHOULD_FAIL)
@ -46,7 +46,7 @@ ELSE(NOT SHOULD_FAIL)
MESSAGE("Test failed")
ENDIF(NOT SHOULD_FAIL)
TRY_COMPILE(CMAKE_ANSI_FOR_SCOPE
${TryCompile_BINARY_DIR}/CMakeFiles/CMakeTmp
${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
${CMAKE_ROOT}/Modules/TestForAnsiForScope.cxx OUTPUT_VARIABLE OUT)
IF (CMAKE_ANSI_FOR_SCOPE)
MESSAGE("Compiler supports ansi for")
@ -55,7 +55,7 @@ ELSE(CMAKE_ANSI_FOR_SCOPE)
ENDIF(CMAKE_ANSI_FOR_SCOPE)
TRY_COMPILE(CMAKE_ANSI_FOR_SCOPE
${TryCompile_BINARY_DIR}/CMakeFiles/CMakeTmp
${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
${CMAKE_ROOT}/Modules/TestForAnsiForScope.cxx OUTPUT_VARIABLE OUT)
IF (CMAKE_ANSI_FOR_SCOPE)
MESSAGE("Compiler supports ansi for")

View File

@ -22,9 +22,12 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
FOREACH(def ${CMAKE_EXTRA_INCLUDE_FILES})
SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
ENDFOREACH(def)
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in"
"${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" IMMEDIATE @ONLY)
FILE(READ "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c"
CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
IMMEDIATE @ONLY)
FILE(READ
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
CHECK_TYPE_SIZE_FILE_CONTENT)
MESSAGE(STATUS "Check size of ${TYPE}")
IF(CMAKE_REQUIRED_LIBRARIES)
@ -33,17 +36,17 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
ENDIF(CMAKE_REQUIRED_LIBRARIES)
TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
${CMAKE_BINARY_DIR}
"${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/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")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n")
ELSE(HAVE_${VARIABLE})
MESSAGE(STATUS "Check size of ${TYPE} - failed")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\nCheckTypeSize.c:\n${CHECK_TYPE_SIZE_FILE_CONTENT}\n\n")
ENDIF(HAVE_${VARIABLE})
ENDIF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")

View File

@ -383,7 +383,7 @@ MACRO(CURL_INTERNAL_TEST CURL_TEST)
ELSE(${CURL_TEST})
MESSAGE(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
SET(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
"${OUTPUT}\n")
ENDIF(${CURL_TEST})
@ -411,14 +411,15 @@ MACRO(CURL_INTERNAL_TEST_RUN CURL_TEST)
ELSE(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
MESSAGE(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
SET(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
FILE(APPEND "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log"
FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
"${OUTPUT}")
IF(${CURL_TEST}_COMPILE)
FILE(APPEND "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log"
FILE(APPEND
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
"There was a running problem of this test\n")
ENDIF(${CURL_TEST}_COMPILE)
FILE(APPEND "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log"
FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
"\n\n")
ENDIF(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
ENDIF("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$")

View File

@ -15,28 +15,29 @@ MACRO(TRY_COMPILE_FROM_SOURCE SOURCE VAR)
ENDFOREACH(inc)
SET(src "${src}\nint main() { ${SOURCE} ; return 0; }")
FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src2.c"
FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src2.c"
"${src}")
EXEC_PROGRAM("${CMAKE_COMMAND}" "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp"
EXEC_PROGRAM("${CMAKE_COMMAND}"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp"
ARGS -E copy src2.c src.c)
MESSAGE(STATUS "Performing Test ${VAR}")
TRY_COMPILE(${VAR}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.c
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
CMAKE_FLAGS
"${TRY_COMPILE_FROM_SOURCE_ADD_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT)
IF(${VAR})
SET(${VAR} 1 CACHE INTERNAL "Test ${FUNCTION}")
MESSAGE(STATUS "Performing Test ${VAR} - Success")
FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n"
"${OUTPUT}\n"
"Source file was:\n${src}\n" APPEND)
ELSE(${VAR})
MESSAGE(STATUS "Performing Test ${VAR} - Failed")
SET(${VAR} "" CACHE INTERNAL "Test ${FUNCTION}")
FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing C SOURCE FILE Test ${VAR} failed with the following output:\n"
"${OUTPUT}\n"
"Source file was:\n${src}\n" APPEND)