From 4bdca3b404d5fafe89779ea5cd1dce50018afbcc Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Thu, 12 Jan 2006 13:49:32 -0500 Subject: ENH: put CmakeTmp into CMakeFiles --- Modules/CMakeTestCCompiler.cmake | 4 ++-- Modules/CMakeTestCXXCompiler.cmake | 4 ++-- Modules/CMakeTestFortranCompiler.cmake | 8 ++++---- Modules/CheckCSourceCompiles.cmake | 4 ++-- Modules/CheckCXXSourceCompiles.cmake | 8 ++++---- Modules/CheckIncludeFile.cmake | 4 ++-- Modules/CheckIncludeFileCXX.cmake | 4 ++-- Modules/CheckIncludeFiles.cmake | 6 +++--- Modules/CheckSymbolExists.cmake | 8 ++++---- Modules/CheckTypeSize.cmake | 6 +++--- Modules/FindSDL_sound.cmake | 8 ++++---- Modules/Platform/Windows-cl.cmake | 4 ++-- Source/CTest/Curl/CMake/CheckTypeSize.cmake | 6 +++--- Source/cmTryCompileCommand.cxx | 4 ++-- Source/cmTryCompileCommand.h | 2 +- Source/cmTryRunCommand.cxx | 2 +- Tests/TryCompile/CMakeLists.txt | 14 ++++++++------ Utilities/cmcurl/CMake/CheckTypeSize.cmake | 6 +++--- Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake | 4 ++-- 19 files changed, 54 insertions(+), 52 deletions(-) diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake index a1c77a8..baf32df 100644 --- a/Modules/CMakeTestCCompiler.cmake +++ b/Modules/CMakeTestCCompiler.cmake @@ -6,13 +6,13 @@ # 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}/CMakeTmp/testCCompiler.c + FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeTmp/testCCompiler.c + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/testCCompiler.c OUTPUT_VARIABLE OUTPUT) SET(C_TEST_WAS_RUN 1) ENDIF(NOT CMAKE_C_COMPILER_WORKS) diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake index 0571587..ece7687 100644 --- a/Modules/CMakeTestCXXCompiler.cmake +++ b/Modules/CMakeTestCXXCompiler.cmake @@ -6,13 +6,13 @@ # 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}/CMakeTmp/testCXXCompiler.cxx + FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeTmp/testCXXCompiler.cxx + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/testCXXCompiler.cxx OUTPUT_VARIABLE OUTPUT) SET(CXX_TEST_WAS_RUN 1) ENDIF(NOT CMAKE_CXX_COMPILER_WORKS) diff --git a/Modules/CMakeTestFortranCompiler.cmake b/Modules/CMakeTestFortranCompiler.cmake index 1178ef4..3e003ee 100644 --- a/Modules/CMakeTestFortranCompiler.cmake +++ b/Modules/CMakeTestFortranCompiler.cmake @@ -6,13 +6,13 @@ # 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}/CMakeTmp/testFortranCompiler.f " + FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/testFortranCompiler.f " PROGRAM TESTFortran PRINT *, 'Hello' END ") TRY_COMPILE(CMAKE_Fortran_COMPILER_WORKS ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/CMakeTmp/testFortranCompiler.f + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/testFortranCompiler.f OUTPUT_VARIABLE OUTPUT) SET(FORTRAN_TEST_WAS_RUN 1) ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS) @@ -41,13 +41,13 @@ 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}/CMakeTmp/testFortranCompilerF90.f90 " + FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeTmp/testFortranCompilerF90.f90 + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/testFortranCompilerF90.f90 OUTPUT_VARIABLE OUTPUT) IF(CMAKE_Fortran_COMPILER_SUPPORTS_F90) MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- yes") diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake index 16dcada..a6fc692 100644 --- a/Modules/CheckCSourceCompiles.cmake +++ b/Modules/CheckCSourceCompiles.cmake @@ -20,13 +20,13 @@ MACRO(CHECK_C_SOURCE_COMPILES SOURCE VAR) SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") ENDIF(CMAKE_REQUIRED_INCLUDES) - FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeTmp/src.c" + FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.c" "${SOURCE}") MESSAGE(STATUS "Performing Test ${VAR}") TRY_COMPILE(${VAR} ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/CMakeTmp/src.c + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.c CMAKE_FLAGS "${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}" "${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}" diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake index a9e0ef1..9c59050 100644 --- a/Modules/CheckCXXSourceCompiles.cmake +++ b/Modules/CheckCXXSourceCompiles.cmake @@ -20,13 +20,13 @@ MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR) SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") ENDIF(CMAKE_REQUIRED_INCLUDES) - FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeTmp/src.c" + FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.c" "${SOURCE}") MESSAGE(STATUS "Performing Test ${VAR}") TRY_COMPILE(${VAR} ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/CMakeTmp/src.cxx + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.cxx CMAKE_FLAGS "${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}" "${CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES}" @@ -34,14 +34,14 @@ MACRO(CHECK_CXX_SOURCE_COMPILES 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${SOURCE}\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${SOURCE}\n" APPEND) diff --git a/Modules/CheckIncludeFile.cmake b/Modules/CheckIncludeFile.cmake index 462302c..a3de4cf 100644 --- a/Modules/CheckIncludeFile.cmake +++ b/Modules/CheckIncludeFile.cmake @@ -12,7 +12,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}/CMakeTmp/CheckIncludeFile.c IMMEDIATE) + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckIncludeFile.c IMMEDIATE) MESSAGE(STATUS "Looking for ${INCLUDE}") IF(${ARGC} EQUAL 3) SET(CMAKE_C_FLAGS_SAVE ${CMAKE_C_FLAGS}) @@ -21,7 +21,7 @@ MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE) TRY_COMPILE(${VARIABLE} ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFile.c + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckIncludeFile.c CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS} OUTPUT_VARIABLE OUTPUT) diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake index 588f30b..f165b48 100644 --- a/Modules/CheckIncludeFileCXX.cmake +++ b/Modules/CheckIncludeFileCXX.cmake @@ -12,7 +12,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}/CMakeTmp/CheckIncludeFile.cxx IMMEDIATE) + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckIncludeFile.cxx IMMEDIATE) MESSAGE(STATUS "Looking for C++ include ${INCLUDE}") IF(${ARGC} EQUAL 3) SET(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS}) @@ -21,7 +21,7 @@ MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) TRY_COMPILE(${VARIABLE} ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFile.cxx + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckIncludeFile.cxx CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS} OUTPUT_VARIABLE OUTPUT) diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake index 7e94593..cd526e6 100644 --- a/Modules/CheckIncludeFiles.cmake +++ b/Modules/CheckIncludeFiles.cmake @@ -19,20 +19,20 @@ MACRO(CHECK_INCLUDE_FILES INCLUDE VARIABLE) ENDFOREACH(FILE) SET(CHECK_INCLUDE_FILES_CONTENT "${CHECK_INCLUDE_FILES_CONTENT}\n\nint main(){return 0;}\n") - FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFiles.c + FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckIncludeFiles.c "${CHECK_INCLUDE_FILES_CONTENT}") MESSAGE(STATUS "Looking for include files ${VARIABLE}") TRY_COMPILE(${VARIABLE} ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFiles.c + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckIncludeFiles.c CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILES_FLAGS} OUTPUT_VARIABLE OUTPUT) IF(${VARIABLE}) MESSAGE(STATUS "Looking for include files ${VARIABLE} - found") SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${VARIABLE}") - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeFiles/CMakeOutput.log "Determining if files ${INCLUDE} " "exist passed with the following output:\n" "${OUTPUT}\n\n") diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake index c0f0698..d39f5d1 100644 --- a/Modules/CheckSymbolExists.cmake +++ b/Modules/CheckSymbolExists.cmake @@ -25,13 +25,13 @@ MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE) SET(CHECK_SYMBOL_EXISTS_CONTENT "${CHECK_SYMBOL_EXISTS_CONTENT}\nvoid cmakeRequireSymbol(int dummy,...){(void)dummy;}\nint main()\n{\n#ifndef ${SYMBOL}\n cmakeRequireSymbol(0,&${SYMBOL});\n#endif\n return 0;\n}\n") - FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.c + FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckSymbolExists.c "${CHECK_SYMBOL_EXISTS_CONTENT}") MESSAGE(STATUS "Looking for ${SYMBOL}") TRY_COMPILE(${VARIABLE} ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.c + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckSymbolExists.c CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_SYMBOL_EXISTS_FLAGS} "${CHECK_SYMBOL_EXISTS_LIBS}" @@ -42,7 +42,7 @@ MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE) 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" + "${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckSymbolExists.c:\n" "${CHECK_SYMBOL_EXISTS_CONTENT}\n") ELSE(${VARIABLE}) MESSAGE(STATUS "Looking for ${SYMBOL} - not found.") @@ -50,7 +50,7 @@ MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE) 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" + "${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckSymbolExists.c:\n" "${CHECK_SYMBOL_EXISTS_CONTENT}\n") ENDIF(${VARIABLE}) ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$") diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake index da2b4ed..14d97d6 100644 --- a/Modules/CheckTypeSize.cmake +++ b/Modules/CheckTypeSize.cmake @@ -22,8 +22,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}/CMakeTmp/CheckTypeSize.c" IMMEDIATE @ONLY) - FILE(READ "${CMAKE_BINARY_DIR}/CMakeTmp/CheckTypeSize.c" + "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" IMMEDIATE @ONLY) + FILE(READ "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" CHECK_TYPE_SIZE_FILE_CONTENT) MESSAGE(STATUS "Check size of ${TYPE}") IF(CMAKE_REQUIRED_LIBRARIES) @@ -32,7 +32,7 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE) ENDIF(CMAKE_REQUIRED_LIBRARIES) TRY_RUN(${VARIABLE} HAVE_${VARIABLE} ${CMAKE_BINARY_DIR} - "${CMAKE_BINARY_DIR}/CMakeTmp/CheckTypeSize.c" + "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS} "${CHECK_TYPE_SIZE_ADD_LIBRARIES}" OUTPUT_VARIABLE OUTPUT) diff --git a/Modules/FindSDL_sound.cmake b/Modules/FindSDL_sound.cmake index be9f54c..bee01b1 100644 --- a/Modules/FindSDL_sound.cmake +++ b/Modules/FindSDL_sound.cmake @@ -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}/CMakeTmp/DetermineSoundLibs.c + FILE(WRITE ${PROJECT_BINARY_DIR}/CMakeFiles/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}/CMakeTmp/CMakeLists.txt + FILE(WRITE ${PROJECT_BINARY_DIR}/CMakeFiles/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}/CMakeTmp - ${PROJECT_BINARY_DIR}/CMakeTmp + ${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp + ${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp DetermineSoundLibs OUTPUT_VARIABLE MY_OUTPUT ) diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake index 712560a..f7d06b5 100644 --- a/Modules/Platform/Windows-cl.cmake +++ b/Modules/Platform/Windows-cl.cmake @@ -115,12 +115,12 @@ IF(CMAKE_GENERATOR MATCHES "NMake Makefiles") # 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}/CMakeTmp2") + MAKE_DIRECTORY("${CMAKE_BINARY_DIR}/CMakeFiles/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}/CMakeTmp2 + EXEC_PROGRAM(${CMAKE_C_COMPILER} ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp2 ARGS /nologo /MD /EHsc \"${testForFreeVCFile}\" OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT diff --git a/Source/CTest/Curl/CMake/CheckTypeSize.cmake b/Source/CTest/Curl/CMake/CheckTypeSize.cmake index ddc990a..dd023a6 100644 --- a/Source/CTest/Curl/CMake/CheckTypeSize.cmake +++ b/Source/CTest/Curl/CMake/CheckTypeSize.cmake @@ -23,8 +23,8 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE) 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}/CMakeTmp/CheckTypeSize.c" IMMEDIATE @ONLY) - FILE(READ "${CMAKE_BINARY_DIR}/CMakeTmp/CheckTypeSize.c" + "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" @ONLY) + FILE(READ "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" CHECK_TYPE_SIZE_FILE_CONTENT) MESSAGE(STATUS "Check size of ${TYPE}") IF(CMAKE_REQUIRED_LIBRARIES) @@ -33,7 +33,7 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE) ENDIF(CMAKE_REQUIRED_LIBRARIES) TRY_RUN(${VARIABLE} HAVE_${VARIABLE} ${CMAKE_BINARY_DIR} - "${CMAKE_BINARY_DIR}/CMakeTmp/CheckTypeSize.c" + "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS} "${CHECK_TYPE_SIZE_ADD_LIBRARIES}" OUTPUT_VARIABLE OUTPUT) diff --git a/Source/cmTryCompileCommand.cxx b/Source/cmTryCompileCommand.cxx index 3991f21..7d0014c 100644 --- a/Source/cmTryCompileCommand.cxx +++ b/Source/cmTryCompileCommand.cxx @@ -110,7 +110,7 @@ int cmTryCompileCommand::CoreTryCompileCode( // signature if (srcFileSignature) { - tmpString = argv[1] + "/CMakeTmp"; + tmpString = argv[1] + "/CMakeFiles/CMakeTmp"; binaryDirectory = tmpString.c_str(); } // make sure the binary directory exists @@ -201,7 +201,7 @@ int cmTryCompileCommand::CoreTryCompileCode( projectName = "CMAKE_TRY_COMPILE"; targetName = "cmTryCompileExec"; // if the source is not in CMakeTmp - if(source.find(argv[1] + "/CMakeTmp") == source.npos) + if(source.find(argv[1] + "/CMakeFiles/CMakeTmp") == source.npos) { mf->AddCMakeDependFile(source.c_str()); } diff --git a/Source/cmTryCompileCommand.h b/Source/cmTryCompileCommand.h index 6a5c48c..55774fb 100644 --- a/Source/cmTryCompileCommand.h +++ b/Source/cmTryCompileCommand.h @@ -89,7 +89,7 @@ public: "extra flags that can be included are, " "INCLUDE_DIRECTORIES, LINK_DIRECTORIES, and LINK_LIBRARIES. " "COMPILE_DEFINITIONS are -Ddefinition that will be passed to the " - "compile line. If srcfile is specified the files in bindir/CMakeTmp " + "compile line. If srcfile is specified the files in bindir/CMakeFiles/CMakeTmp " "are cleaned automatically. If OUTPUT_VARIABLE is specified, then the " "output from the build process is stored in the given variable. " "TRY_COMPILE creates a CMakeList.txt " diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx index b4f1456..a2179d8 100644 --- a/Source/cmTryRunCommand.cxx +++ b/Source/cmTryRunCommand.cxx @@ -67,7 +67,7 @@ bool cmTryRunCommand::InitialPass(std::vector const& argv) int res = cmTryCompileCommand::CoreTryCompileCode(m_Makefile, tryCompile, false); // now try running the command if it compiled - std::string binaryDirectory = argv[2] + "/CMakeTmp"; + std::string binaryDirectory = argv[2] + "/CMakeFiles/CMakeTmp"; if (!res) { int retVal = -1; diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt index db62542..7ea918d 100644 --- a/Tests/TryCompile/CMakeLists.txt +++ b/Tests/TryCompile/CMakeLists.txt @@ -2,7 +2,7 @@ PROJECT(TryCompile) # try to compile a file that should compile TRY_COMPILE(SHOULD_PASS - ${TryCompile_BINARY_DIR}/CMakeTmp + ${TryCompile_BINARY_DIR}/CMakeFiles/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}/CMakeTmp + ${TryCompile_BINARY_DIR}/CMakeFiles/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}/CMakeTmp + ${TryCompile_BINARY_DIR}/CMakeFiles/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}/CMakeTmp + ${TryCompile_BINARY_DIR}/CMakeFiles/CMakeTmp ${TryCompile_SOURCE_DIR}/fail.c OUTPUT_VARIABLE TRY_OUT) IF(SHOULD_FAIL) @@ -45,7 +45,8 @@ IF(NOT SHOULD_FAIL) ELSE(NOT SHOULD_FAIL) MESSAGE("Test failed") ENDIF(NOT SHOULD_FAIL) -TRY_COMPILE(CMAKE_ANSI_FOR_SCOPE ${TryCompile_BINARY_DIR}/CMakeTmp +TRY_COMPILE(CMAKE_ANSI_FOR_SCOPE + ${TryCompile_BINARY_DIR}/CMakeFiles/CMakeTmp ${CMAKE_ROOT}/Modules/TestForAnsiForScope.cxx OUTPUT_VARIABLE OUT) IF (CMAKE_ANSI_FOR_SCOPE) MESSAGE("Compiler supports ansi for") @@ -53,7 +54,8 @@ ELSE(CMAKE_ANSI_FOR_SCOPE) MESSAGE("Compiler does not support ansi for scope") ENDIF(CMAKE_ANSI_FOR_SCOPE) -TRY_COMPILE(CMAKE_ANSI_FOR_SCOPE ${TryCompile_BINARY_DIR}/CMakeTmp +TRY_COMPILE(CMAKE_ANSI_FOR_SCOPE + ${TryCompile_BINARY_DIR}/CMakeFiles/CMakeTmp ${CMAKE_ROOT}/Modules/TestForAnsiForScope.cxx OUTPUT_VARIABLE OUT) IF (CMAKE_ANSI_FOR_SCOPE) MESSAGE("Compiler supports ansi for") diff --git a/Utilities/cmcurl/CMake/CheckTypeSize.cmake b/Utilities/cmcurl/CMake/CheckTypeSize.cmake index ddc990a..dd023a6 100644 --- a/Utilities/cmcurl/CMake/CheckTypeSize.cmake +++ b/Utilities/cmcurl/CMake/CheckTypeSize.cmake @@ -23,8 +23,8 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE) 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}/CMakeTmp/CheckTypeSize.c" IMMEDIATE @ONLY) - FILE(READ "${CMAKE_BINARY_DIR}/CMakeTmp/CheckTypeSize.c" + "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" @ONLY) + FILE(READ "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" CHECK_TYPE_SIZE_FILE_CONTENT) MESSAGE(STATUS "Check size of ${TYPE}") IF(CMAKE_REQUIRED_LIBRARIES) @@ -33,7 +33,7 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE) ENDIF(CMAKE_REQUIRED_LIBRARIES) TRY_RUN(${VARIABLE} HAVE_${VARIABLE} ${CMAKE_BINARY_DIR} - "${CMAKE_BINARY_DIR}/CMakeTmp/CheckTypeSize.c" + "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS} "${CHECK_TYPE_SIZE_ADD_LIBRARIES}" OUTPUT_VARIABLE OUTPUT) diff --git a/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake b/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake index c5a423d..44dc8e4 100644 --- a/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake +++ b/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake @@ -15,13 +15,13 @@ MACRO(TRY_COMPILE_FROM_SOURCE SOURCE VAR) ENDFOREACH(inc) SET(src "${src}\nint main() { ${SOURCE} ; return 0; }") - FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeTmp/src.c" + FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.c" "${src}") MESSAGE(STATUS "Performing Test ${VAR}") TRY_COMPILE(${VAR} ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/CMakeTmp/src.c + ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.c CMAKE_FLAGS "${TRY_COMPILE_FROM_SOURCE_ADD_LIBRARIES}" OUTPUT_VARIABLE OUTPUT) -- cgit v0.12