From c6b011e35e63cbb695b7c939c00afba21fc94825 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Fri, 29 Jul 2005 09:19:25 -0400 Subject: [PATCH] ENH: put cmake files intoa CMakeFiles subdir to clean up bin tree --- Modules/CMakeDetermineCCompiler.cmake | 6 ++--- Modules/CMakeDetermineCXXCompiler.cmake | 6 ++--- Modules/CMakeDetermineFortranCompiler.cmake | 6 ++--- Modules/CMakeDetermineJavaCompiler.cmake | 2 +- Modules/CMakeDetermineRCCompiler.cmake | 2 +- Modules/CMakeDetermineSystem.cmake | 4 ++-- Modules/CMakeTestCCompiler.cmake | 4 ++-- Modules/CMakeTestCXXCompiler.cmake | 4 ++-- Modules/CMakeTestFortranCompiler.cmake | 8 +++---- Modules/CheckFunctionExists.cmake | 4 ++-- Modules/CheckIncludeFile.cmake | 4 ++-- Modules/CheckIncludeFileCXX.cmake | 4 ++-- Modules/CheckIncludeFiles.cmake | 4 ++-- Modules/CheckLibraryExists.cmake | 4 ++-- Modules/CheckSymbolExists.cmake | 4 ++-- Modules/CheckTypeSize.cmake | 4 ++-- Modules/CheckVariableExists.cmake | 4 ++-- Modules/FindThreads.cmake | 4 ++-- Modules/Platform/Windows-cl.cmake | 12 +++++----- Modules/TestBigEndian.cmake | 10 ++++---- Modules/TestCXXAcceptsFlag.cmake | 4 ++-- Modules/TestForANSIForScope.cmake | 4 ++-- Modules/TestForSTDNamespace.cmake | 4 ++-- Source/cmCacheManager.cxx | 2 ++ Source/cmGlobalGenerator.cxx | 21 ++++++++++------ Source/cmGlobalUnixMakefileGenerator3.cxx | 24 ++++++++++--------- Source/cmGlobalXCodeGenerator.cxx | 2 +- Source/cmLocalGenerator.cxx | 5 ++++ Source/cmLocalUnixMakefileGenerator3.cxx | 16 ++++++++----- Source/cmLocalVisualStudio7Generator.cxx | 2 +- Tests/MakeClean/ToClean/CMakeLists.txt | 2 +- Utilities/cmcurl/CMakeLists.txt | 8 +++---- .../cmxmlrpc/CMake/TryCompileFromSource.cmake | 4 ++-- 33 files changed, 109 insertions(+), 89 deletions(-) diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index c4dfa112f..bd7e9d24b 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -67,11 +67,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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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.*" ) @@ -87,7 +87,7 @@ ENDIF(NOT CMAKE_COMPILER_IS_GNUCC_RUN) # configure variables set in this file for fast reload later on CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in - ${CMAKE_BINARY_DIR}/CMakeCCompiler.cmake IMMEDIATE) + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeCCompiler.cmake IMMEDIATE) MARK_AS_ADVANCED(CMAKE_AR) SET(CMAKE_C_COMPILER_ENV_VAR "CC") diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index 60cf28394..916640a16 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -53,11 +53,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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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.*" ) @@ -66,6 +66,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}/CMakeCXXCompiler.cmake IMMEDIATE) + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeCXXCompiler.cmake IMMEDIATE) SET(CMAKE_CXX_COMPILER_ENV_VAR "CXX") diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake index 33dfce64d..74d5cbd5d 100644 --- a/Modules/CMakeDetermineFortranCompiler.cmake +++ b/Modules/CMakeDetermineFortranCompiler.cmake @@ -90,11 +90,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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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.*" ) @@ -110,6 +110,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}/CMakeFortranCompiler.cmake IMMEDIATE) + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeFortranCompiler.cmake IMMEDIATE) MARK_AS_ADVANCED(CMAKE_AR) SET(CMAKE_Fortran_COMPILER_ENV_VAR "FC") diff --git a/Modules/CMakeDetermineJavaCompiler.cmake b/Modules/CMakeDetermineJavaCompiler.cmake index 3b787a96f..2c69ffe72 100644 --- a/Modules/CMakeDetermineJavaCompiler.cmake +++ b/Modules/CMakeDetermineJavaCompiler.cmake @@ -81,6 +81,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}/CMakeJavaCompiler.cmake IMMEDIATE @ONLY) + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeJavaCompiler.cmake IMMEDIATE @ONLY) MARK_AS_ADVANCED(CMAKE_AR CMAKE_Java_COMPILER_FULLPATH) SET(CMAKE_Java_COMPILER_ENV_VAR "JAVA_COMPILER") diff --git a/Modules/CMakeDetermineRCCompiler.cmake b/Modules/CMakeDetermineRCCompiler.cmake index 8150b304d..e826b508a 100644 --- a/Modules/CMakeDetermineRCCompiler.cmake +++ b/Modules/CMakeDetermineRCCompiler.cmake @@ -43,5 +43,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}/CMakeRCCompiler.cmake IMMEDIATE) + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeRCCompiler.cmake IMMEDIATE) SET(CMAKE_RC_COMPILER_ENV_VAR "RC") diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake index d22694167..78b0474b6 100644 --- a/Modules/CMakeDetermineSystem.cmake +++ b/Modules/CMakeDetermineSystem.cmake @@ -70,10 +70,10 @@ IF(CMAKE_SYSTEM_VERSION) ENDIF(CMAKE_SYSTEM_VERSION) -FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log +FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeSystem.cmake IMMEDIATE) + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeSystem.cmake IMMEDIATE) diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake index f36d5c843..4c534bb0f 100644 --- a/Modules/CMakeTestCCompiler.cmake +++ b/Modules/CMakeTestCCompiler.cmake @@ -18,7 +18,7 @@ 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}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}\" " @@ -28,7 +28,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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log "Determining if the C compiler works passed with " "the following output:\n${OUTPUT}\n\n") ENDIF(C_TEST_WAS_RUN) diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake index 4dff11d56..6071a68af 100644 --- a/Modules/CMakeTestCXXCompiler.cmake +++ b/Modules/CMakeTestCXXCompiler.cmake @@ -18,7 +18,7 @@ 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}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}\" " @@ -28,7 +28,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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log "Determining if the CXX compiler works passed with " "the following output:\n${OUTPUT}\n\n") ENDIF(CXX_TEST_WAS_RUN) diff --git a/Modules/CMakeTestFortranCompiler.cmake b/Modules/CMakeTestFortranCompiler.cmake index 49c6664e1..9d5ec4bd3 100644 --- a/Modules/CMakeTestFortranCompiler.cmake +++ b/Modules/CMakeTestFortranCompiler.cmake @@ -18,7 +18,7 @@ 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}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}\" " @@ -28,7 +28,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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log "Determining if the Fortran compiler works passed with " "the following output:\n${OUTPUT}\n\n") ENDIF(FORTRAN_TEST_WAS_RUN) @@ -50,13 +50,13 @@ IF(CMAKE_Fortran_COMPILER_WORKS) 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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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 "") diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake index 683697090..a0ebfa2c7 100644 --- a/Modules/CheckFunctionExists.cmake +++ b/Modules/CheckFunctionExists.cmake @@ -24,13 +24,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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Determining if the function ${FUNCTION} exists failed with the following output:\n" "${OUTPUT}\n\n") ENDIF(${VARIABLE}) diff --git a/Modules/CheckIncludeFile.cmake b/Modules/CheckIncludeFile.cmake index c5e34753d..0459fb357 100644 --- a/Modules/CheckIncludeFile.cmake +++ b/Modules/CheckIncludeFile.cmake @@ -32,14 +32,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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Determining if the include file ${INCLUDE} " "exists failed with the following output:\n" "${OUTPUT}\n\n") diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake index 5f5811ae4..a5c91080f 100644 --- a/Modules/CheckIncludeFileCXX.cmake +++ b/Modules/CheckIncludeFileCXX.cmake @@ -30,14 +30,14 @@ MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) IF(${VARIABLE}) MESSAGE(STATUS "Checking for CXX include file ${INCLUDE} -- found") SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}") - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log "Determining if the include file ${INCLUDE} " "exists passed with the following output:\n" "${OUTPUT}\n\n") ELSE(${VARIABLE}) MESSAGE(STATUS "Checking for CXX include file ${INCLUDE} -- not found") SET(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}") - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Determining if the include file ${INCLUDE} " "exists failed with the following output:\n" "${OUTPUT}\n\n") diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake index cf0361c8f..589f4ae6b 100644 --- a/Modules/CheckIncludeFiles.cmake +++ b/Modules/CheckIncludeFiles.cmake @@ -29,14 +29,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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Determining if files ${INCLUDE} " "exist failed with the following output:\n" "${OUTPUT}\nSource:\n${CHECK_INCLUDE_FILES_CONTENT}\n") diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake index 0b70d2993..830d87986 100644 --- a/Modules/CheckLibraryExists.cmake +++ b/Modules/CheckLibraryExists.cmake @@ -28,14 +28,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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Determining if the function ${FUNCTION} exists in the ${LIBRARY} " "failed with the following output:\n" "${OUTPUT}\n\n") diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake index 0bd65f7a3..2e75ad84c 100644 --- a/Modules/CheckSymbolExists.cmake +++ b/Modules/CheckSymbolExists.cmake @@ -36,7 +36,7 @@ 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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log "Determining if the ${SYMBOL} " "exist passed with the following output:\n" "${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.c:\n" @@ -44,7 +44,7 @@ MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE) ELSE(${VARIABLE}) MESSAGE(STATUS "Looking for ${SYMBOL} - not found.") SET(${VARIABLE} "" CACHE INTERNAL "Have symbol ${SYMBOL}") - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Determining if the ${SYMBOL} " "exist failed with the following output:\n" "${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.c:\n" diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake index c9a71f0c9..79df8b5ed 100644 --- a/Modules/CheckTypeSize.cmake +++ b/Modules/CheckTypeSize.cmake @@ -39,11 +39,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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}$") diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake index 93da0045d..14fdcd2ca 100644 --- a/Modules/CheckVariableExists.cmake +++ b/Modules/CheckVariableExists.cmake @@ -23,13 +23,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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Determining if the variable ${VAR} exists failed with the following output:\n" "${OUTPUT}\n\n") ENDIF(${VARIABLE}) diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake index af2801bf9..ad6080e84 100644 --- a/Modules/FindThreads.cmake +++ b/Modules/FindThreads.cmake @@ -62,12 +62,12 @@ 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}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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") diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake index a575789e7..e05ba690c 100644 --- a/Modules/Platform/Windows-cl.cmake +++ b/Modules/Platform/Windows-cl.cmake @@ -1,5 +1,5 @@ # try to load any previously computed information for C on this platform -INCLUDE( ${CMAKE_BINARY_DIR}/CMakeCPlatform.cmake OPTIONAL) +INCLUDE( ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeCPlatform.cmake OPTIONAL) SET(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:") SET(CMAKE_LINK_LIBRARY_FLAG "") @@ -84,7 +84,7 @@ IF(CMAKE_GENERATOR MATCHES "NMake Makefiles") RETURN_VALUE CMAKE_COMPILER_RETURN ) IF(NOT CMAKE_COMPILER_RETURN) - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}") @@ -103,7 +103,7 @@ IF(CMAKE_GENERATOR MATCHES "NMake Makefiles") ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*VERSION=1[4-9][0-9][0-9].*" ) ELSE(NOT CMAKE_COMPILER_RETURN) MESSAGE(STATUS "Check for CL compiler version - failed") - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Determining the version of compiler failed with the following output:\n" "${CMAKE_COMPILER_OUTPUT}\n\n") ENDIF(NOT CMAKE_COMPILER_RETURN) @@ -122,13 +122,13 @@ IF(CMAKE_GENERATOR MATCHES "NMake Makefiles") RETURN_VALUE CMAKE_COMPILER_RETURN ) IF(CMAKE_COMPILER_RETURN) - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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") @@ -210,4 +210,4 @@ SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELW # save computed information for this platform CONFIGURE_FILE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in - ${CMAKE_BINARY_DIR}/CMakeCPlatform.cmake IMMEDIATE) + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeCPlatform.cmake IMMEDIATE) diff --git a/Modules/TestBigEndian.cmake b/Modules/TestBigEndian.cmake index 0759c75ff..bf95d5321 100644 --- a/Modules/TestBigEndian.cmake +++ b/Modules/TestBigEndian.cmake @@ -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}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Determining the endianes of the system passed. The system is ") IF(${VARIABLE}) - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "big endian") MESSAGE(STATUS "Check if the system is big endian - big endian") ELSE(${VARIABLE}) - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "little endian") MESSAGE(STATUS "Check if the system is big endian - little endian") ENDIF(${VARIABLE}) - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test produced following output:\n${OUTPUT}\n\n") ELSE(HAVE_${VARIABLE}) - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}) diff --git a/Modules/TestCXXAcceptsFlag.cmake b/Modules/TestCXXAcceptsFlag.cmake index a0cabd798..196d26bc6 100644 --- a/Modules/TestCXXAcceptsFlag.cmake +++ b/Modules/TestCXXAcceptsFlag.cmake @@ -16,12 +16,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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Determining if the CXX compiler accepts the flag ${FLAGS} failed with " "the following output:\n${OUTPUT}\n\n") ENDIF(${VARIABLE}) diff --git a/Modules/TestForANSIForScope.cmake b/Modules/TestForANSIForScope.cmake index c48a16a61..2ca263413 100644 --- a/Modules/TestForANSIForScope.cmake +++ b/Modules/TestForANSIForScope.cmake @@ -13,14 +13,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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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) diff --git a/Modules/TestForSTDNamespace.cmake b/Modules/TestForSTDNamespace.cmake index d779712ac..e25850e36 100644 --- a/Modules/TestForSTDNamespace.cmake +++ b/Modules/TestForSTDNamespace.cmake @@ -12,14 +12,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}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Determining if the CXX compiler has std namespace failed with " "the following output:\n${OUTPUT}\n\n") ENDIF (CMAKE_STD_NAMESPACE) diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 1429ef3b6..cbd3697b2 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -557,6 +557,8 @@ bool cmCacheManager::SaveCache(const char* path) cacheFile.c_str()); cmSystemTools::RemoveFile(tempFile.c_str()); std::string checkCacheFile = path; + checkCacheFile += "/CMakeFiles"; + cmSystemTools::MakeDirectory(checkCacheFile.c_str()); checkCacheFile += "/cmake.check_cache"; std::ofstream checkCache(checkCacheFile.c_str()); if(!checkCache) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 0b2bc1a9e..545309baa 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -100,8 +100,9 @@ void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf) } // enable the given language -void cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, - cmMakefile *mf) +void +cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, + cmMakefile *mf) { if(languages.size() == 0) { @@ -113,6 +114,8 @@ void cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, mf->AddDefinition("RUN_CONFIGURE", true); bool needTestLanguage = false; std::string rootBin = mf->GetHomeOutputDirectory(); + rootBin += "/CMakeFiles"; + // If the configuration files path has been set, // then we are in a try compile and need to copy the enable language // files into the try compile directory @@ -251,10 +254,12 @@ void cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, std::string determineCompiler = "CMakeDetermine"; determineCompiler += lang; determineCompiler += "Compiler.cmake"; - std::string determineFile = mf->GetModulesFile(determineCompiler.c_str()); + std::string determineFile = + mf->GetModulesFile(determineCompiler.c_str()); if(!mf->ReadListFile(0,determineFile.c_str())) { - cmSystemTools::Error("Could not find cmake module file:", determineFile.c_str()); + cmSystemTools::Error("Could not find cmake module file:", + determineFile.c_str()); } // Some generators like visual studio should not use the env variables // So the global generator can specify that in this variable @@ -344,7 +349,8 @@ void cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, std::string ifpath = mf->GetModulesFile(testLang.c_str()); if(!mf->ReadListFile(0,ifpath.c_str())) { - cmSystemTools::Error("Could not find cmake module file:", ifpath.c_str()); + cmSystemTools::Error("Could not find cmake module file:", + ifpath.c_str()); } // **** Step 8, load backwards compatibility stuff for C and CXX // for old versions of CMake ListFiles C and CXX had some @@ -785,8 +791,9 @@ cmLocalGenerator *cmGlobalGenerator::CreateLocalGenerator() void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator *gen ) { - this->SetConfiguredFilesPath( - gen->GetCMakeInstance()->GetHomeOutputDirectory()); + std::string cfp = gen->GetCMakeInstance()->GetHomeOutputDirectory(); + cfp += "/CMakeFiles"; + this->SetConfiguredFilesPath(cfp.c_str()); const char* make = gen->GetCMakeInstance()->GetCacheDefinition("CMAKE_MAKE_PROGRAM"); this->GetCMakeInstance()->AddCacheEntry("CMAKE_MAKE_PROGRAM", make, diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index d1542c4ef..6684be19c 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -171,7 +171,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2() // see if the build system must be regenerated. std::string makefileName = this->GetCMakeInstance()->GetHomeOutputDirectory(); - makefileName += "/Makefile2"; + makefileName += "/CMakeFiles/Makefile2"; cmGeneratedFileStream makefileStream(makefileName.c_str()); if(!makefileStream) { @@ -240,7 +240,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() // see if the build system must be regenerated. std::string cmakefileName = this->GetCMakeInstance()->GetHomeOutputDirectory(); - cmakefileName += "/Makefile.cmake"; + cmakefileName += "/CMakeFiles/Makefile.cmake"; cmGeneratedFileStream cmakefileStream(cmakefileName.c_str()); if(!cmakefileStream) { @@ -305,7 +305,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() // Build the path to the cache check file. std::string check = this->GetCMakeInstance()->GetHomeOutputDirectory(); - check += "/cmake.check_cache"; + check += "/CMakeFiles/cmake.check_cache"; // Set the corresponding makefile in the cmake file. cmakefileStream @@ -322,7 +322,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() { lg = static_cast(m_LocalGenerators[i]); tmpStr = lg->GetMakefile()->GetStartOutputDirectory(); - tmpStr += "/CMakeDirectoryInformation.cmake"; + tmpStr += "/CMakeFiles/CMakeDirectoryInformation.cmake"; cmakefileStream << " \"" << lg->Convert(tmpStr.c_str(),cmLocalGenerator::HOME_OUTPUT).c_str() << "\"\n"; } @@ -374,7 +374,7 @@ void cmGlobalUnixMakefileGenerator3 // Check the build system in this directory. depends.push_back("cmake_check_build_system"); - commands.push_back(lg->GetRecursiveMakeCall("Makefile2","all")); + commands.push_back(lg->GetRecursiveMakeCall("CMakeFiles/Makefile2","all")); // Write the rule. lg->WriteMakeRule(makefileStream, "The main all target", "all", depends, commands); @@ -382,14 +382,14 @@ void cmGlobalUnixMakefileGenerator3 // write the clean depends.clear(); commands.clear(); - commands.push_back(lg->GetRecursiveMakeCall("Makefile2","clean")); + commands.push_back(lg->GetRecursiveMakeCall("CMakeFiles/Makefile2","clean")); lg->WriteMakeRule(makefileStream, "The main clean target", "clean", depends, commands); // write the depend rule, really a recompute depends rule depends.clear(); commands.clear(); - std::string cmakefileName = "Makefile.cmake"; + std::string cmakefileName = "CMakeFiles/Makefile.cmake"; std::string runRule = "$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)"; runRule += " --check-build-system "; @@ -472,7 +472,8 @@ cmGlobalUnixMakefileGenerator3 // write the directory rule commands.clear(); commands.push_back - (lg->GetRecursiveMakeCall("Makefile2",makeTargetName.c_str())); + (lg->GetRecursiveMakeCall("CMakeFiles/Makefile2", + makeTargetName.c_str())); // Write the rule. lg->WriteMakeRule(ruleFileStream, "Convenience name for directory.", @@ -602,7 +603,8 @@ cmGlobalUnixMakefileGenerator3 // write the directory rule commands.clear(); commands.push_back - (lg->GetRecursiveMakeCall("Makefile2",makeTargetName.c_str())); + (lg->GetRecursiveMakeCall("CMakeFiles/Makefile2", + makeTargetName.c_str())); // Write the rule. lg->WriteMakeRule(ruleFileStream, "Convenience name for directory.", @@ -703,7 +705,7 @@ cmGlobalUnixMakefileGenerator3 // Write the rule. commands.clear(); - commands.push_back(lg->GetRecursiveMakeCall("Makefile2", + commands.push_back(lg->GetRecursiveMakeCall("CMakeFiles/Makefile2", t->second.GetName())); depends.clear(); depends.push_back("cmake_check_build_system"); @@ -798,7 +800,7 @@ cmGlobalUnixMakefileGenerator3 // Write the rule. commands.clear(); - commands.push_back(lg->GetRecursiveMakeCall("Makefile2", + commands.push_back(lg->GetRecursiveMakeCall("CMakeFiles/Makefile2", localName.c_str())); depends.clear(); depends.push_back("cmake_check_build_system"); diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index cc396380d..066c3e2ef 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -367,7 +367,7 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile(cmLocalGenerator* root) m_CurrentReRunCMakeMakefile += "/ReRunCMake.make"; cmGeneratedFileStream makefileStream(m_CurrentReRunCMakeMakefile.c_str()); makefileStream << "# Generated by CMake, DO NOT EDIT\n"; - makefileStream << "cmake.check_cache: "; + makefileStream << "CMakeFiles/cmake.check_cache: "; for(std::vector::const_iterator i = lfiles.begin(); i != lfiles.end(); ++i) { diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 4f620a92b..d927b3b89 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -43,6 +43,11 @@ cmLocalGenerator::~cmLocalGenerator() void cmLocalGenerator::Configure() { + // make sure the CMakeFiles dir is there + std::string filesDir = m_Makefile->GetStartOutputDirectory(); + filesDir += "/CMakeFiles"; + cmSystemTools::MakeDirectory(filesDir.c_str()); + // find & read the list file std::string currentStart = m_Makefile->GetStartDirectory(); currentStart += "/CMakeLists.txt"; diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 0918ff921..b1cd324e1 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -172,7 +172,7 @@ void cmLocalUnixMakefileGenerator3 void cmLocalUnixMakefileGenerator3::WriteDirectoryInformationFile() { std::string infoFileName = m_Makefile->GetStartOutputDirectory(); - infoFileName += "/CMakeDirectoryInformation.cmake"; + infoFileName += "/CMakeFiles/CMakeDirectoryInformation.cmake"; // Open the output file. cmGeneratedFileStream infoFileStream(infoFileName.c_str()); @@ -1048,7 +1048,7 @@ cmLocalUnixMakefileGenerator3 // the --check-build-system flag. { // Build command to run CMake to check if anything needs regenerating. - std::string cmakefileName = "Makefile.cmake"; + std::string cmakefileName = "CMakeFiles/Makefile.cmake"; std::string runRule = "$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)"; runRule += " --check-build-system "; @@ -1866,6 +1866,10 @@ cmLocalUnixMakefileGenerator3::GetTargetDirectory(cmTarget& target) { dir += prefix; } + else + { + dir = "CMakeFiles/"; + } dir += target.GetName(); dir += ".dir"; return dir; @@ -2579,7 +2583,7 @@ cmLocalUnixMakefileGenerator3 bool haveDirectoryInfo = false; std::string dirInfoFile = args[4]; - dirInfoFile += "/CMakeDirectoryInformation.cmake"; + dirInfoFile += "/CMakeFiles/CMakeDirectoryInformation.cmake"; if(mf->ReadListFile(0, dirInfoFile.c_str()) && !cmSystemTools::GetErrorOccuredFlag()) { @@ -2754,7 +2758,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefile() std::string dir = m_Makefile->GetStartOutputDirectory(); dir += "/directorystart"; dir = this->Convert(dir.c_str(),HOME_OUTPUT,MAKEFILE); - this->CreateJumpCommand(commands,"Makefile2",dir); + this->CreateJumpCommand(commands,"CMakeFiles/Makefile2",dir); this->WriteMakeRule(ruleFileStream, "The main all target", "all", depends, commands); // Write the clean rule. @@ -2762,7 +2766,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefile() dir += "/clean"; dir = this->Convert(dir.c_str(),HOME_OUTPUT,MAKEFILE); commands.clear(); - this->CreateJumpCommand(commands,"Makefile2",dir); + this->CreateJumpCommand(commands,"CMakeFiles/Makefile2",dir); this->WriteMakeRule(ruleFileStream, "The main clean target", "clean", depends, commands); // write our targets, and while doing it collect up the object @@ -2819,7 +2823,7 @@ void cmLocalUnixMakefileGenerator3 commands.clear(); depends.clear(); - this->CreateJumpCommand(commands,"Makefile2",localName); + this->CreateJumpCommand(commands,"CMakeFiles/Makefile2",localName); this->WriteMakeRule(ruleFileStream, "Convenience name for target.", localName.c_str(), depends, commands); diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 2b125df28..27cd85637 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1432,7 +1432,7 @@ std::string cmLocalVisualStudio7Generator::GetTargetDirectory(cmTarget& target) // Put a prefix on the name if one is given by the CMake code. if(const char* prefix = m_Makefile->GetDefinition("CMAKE_TARGET_DIR_PREFIX")) { - dir += prefix; + dir = prefix; } dir += target.GetName(); dir += ".dir"; diff --git a/Tests/MakeClean/ToClean/CMakeLists.txt b/Tests/MakeClean/ToClean/CMakeLists.txt index 622a861ed..5703f2e87 100644 --- a/Tests/MakeClean/ToClean/CMakeLists.txt +++ b/Tests/MakeClean/ToClean/CMakeLists.txt @@ -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}/toclean.dir/toclean${CMAKE_CXX_OUTPUT_EXTENSION}") + "${ToClean_BINARY_DIR}/CMakeFiles/toclean.dir/toclean${CMAKE_CXX_OUTPUT_EXTENSION}") # Create a file that must be registered for cleaning. FILE(WRITE "${ToClean_BINARY_DIR}/Registered.txt" diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt index 146203ef7..14f19b53d 100644 --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt @@ -376,7 +376,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}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Performing Curl Test ${CURL_TEST} failed with the following output:\n" "${OUTPUT}\n") ENDIF(${CURL_TEST}) @@ -404,14 +404,14 @@ 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}/CMakeError.log" + FILE(APPEND "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log" "Performing Curl Test ${CURL_TEST} failed with the following output:\n" "${OUTPUT}") IF(${CURL_TEST}_COMPILE) - FILE(APPEND "${CMAKE_BINARY_DIR}/CMakeError.log" + FILE(APPEND "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log" "There was a running problem of this test\n") ENDIF(${CURL_TEST}_COMPILE) - FILE(APPEND "${CMAKE_BINARY_DIR}/CMakeError.log" + FILE(APPEND "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log" "\n\n") ENDIF(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST}) ENDIF("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$") diff --git a/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake b/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake index 2eab76fcd..c5a423d08 100644 --- a/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake +++ b/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake @@ -28,14 +28,14 @@ MACRO(TRY_COMPILE_FROM_SOURCE SOURCE VAR) IF(${VAR}) SET(${VAR} 1 CACHE INTERNAL "Test ${FUNCTION}") MESSAGE(STATUS "Performing Test ${VAR} - Success") - WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeOutput.log + WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeFiles/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}") - WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeError.log + WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Performing C SOURCE FILE Test ${VAR} failed with the following output:\n" "${OUTPUT}\n" "Source file was:\n${src}\n" APPEND)