From 8e9a6becccc739e8135d5a3b303e8bf125fe3015 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Wed, 14 Jun 2006 12:28:32 -0400 Subject: ENH: centralized locaiton of CMakeFiles setting --- CMakeLists.txt | 8 ++--- Modules/CMakeDetermineCCompiler.cmake | 4 +-- Modules/CMakeDetermineCXXCompiler.cmake | 6 ++-- Modules/CMakeDetermineFortranCompiler.cmake | 6 ++-- Modules/CMakeDetermineJavaCompiler.cmake | 2 +- Modules/CMakeDetermineRCCompiler.cmake | 2 +- Modules/CMakeDetermineSystem.cmake | 5 +-- Modules/CMakeTestCCompiler.cmake | 10 +++--- Modules/CMakeTestCXXCompiler.cmake | 8 ++--- Modules/CMakeTestFortranCompiler.cmake | 16 +++++----- Modules/CheckCSourceCompiles.cmake | 4 +-- Modules/CheckCXXSourceCompiles.cmake | 8 ++--- Modules/CheckFunctionExists.cmake | 4 +-- Modules/CheckIncludeFile.cmake | 8 ++--- Modules/CheckIncludeFileCXX.cmake | 8 ++--- Modules/CheckIncludeFiles.cmake | 8 ++--- Modules/CheckLibraryExists.cmake | 4 +-- Modules/CheckSymbolExists.cmake | 12 ++++---- Modules/CheckTypeSize.cmake | 10 +++--- Modules/CheckVariableExists.cmake | 4 +-- Modules/FindQt4.cmake | 32 +++++++++++-------- Modules/FindSDL_sound.cmake | 8 ++--- Modules/FindThreads.cmake | 6 ++-- Modules/Platform/Windows-cl.cmake | 24 +++++++-------- Modules/TestBigEndian.cmake | 10 +++--- Modules/TestCXXAcceptsFlag.cmake | 4 +-- Modules/TestForANSIForScope.cmake | 4 +-- Modules/TestForSSTREAM.cmake | 4 +-- Modules/TestForSTDNamespace.cmake | 4 +-- Source/cmCacheManager.cxx | 8 +++-- Source/cmGlobalGenerator.cxx | 4 +-- Source/cmGlobalKdevelopGenerator.cxx | 10 ++++-- Source/cmGlobalUnixMakefileGenerator3.cxx | 24 ++++++++++----- Source/cmGlobalXCodeGenerator.cxx | 3 +- Source/cmInstallTargetGenerator.cxx | 4 ++- Source/cmLocalGenerator.cxx | 2 +- Source/cmLocalUnixMakefileGenerator3.cxx | 36 +++++++++++++--------- Source/cmMakefile.cxx | 3 ++ Source/cmMakefileExecutableTargetGenerator.cxx | 4 ++- Source/cmMakefileLibraryTargetGenerator.cxx | 6 ++-- Source/cmMakefileTargetGenerator.cxx | 3 +- Source/cmTryCompileCommand.cxx | 4 ++- Source/cmTryRunCommand.cxx | 4 ++- Source/cmake.h | 4 +++ Source/kwsys/kwsysPlatformCxxTests.cmake | 6 ++-- Tests/MakeClean/ToClean/CMakeLists.txt | 2 +- Tests/TryCompile/CMakeLists.txt | 12 ++++---- Utilities/cmcurl/CMake/CheckTypeSize.cmake | 15 +++++---- Utilities/cmcurl/CMakeLists.txt | 9 +++--- .../cmxmlrpc/CMake/TryCompileFromSource.cmake | 11 ++++--- 50 files changed, 232 insertions(+), 175 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 333d8fa..3316515 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index 2cd31f9..4d7ced5 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -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.*" ) diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index 72622b8..35197eb 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -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") diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake index 812a544..edec369 100644 --- a/Modules/CMakeDetermineFortranCompiler.cmake +++ b/Modules/CMakeDetermineFortranCompiler.cmake @@ -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") diff --git a/Modules/CMakeDetermineJavaCompiler.cmake b/Modules/CMakeDetermineJavaCompiler.cmake index 2edb46d..3d31233 100644 --- a/Modules/CMakeDetermineJavaCompiler.cmake +++ b/Modules/CMakeDetermineJavaCompiler.cmake @@ -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") diff --git a/Modules/CMakeDetermineRCCompiler.cmake b/Modules/CMakeDetermineRCCompiler.cmake index c5732b2..e48f21f 100644 --- a/Modules/CMakeDetermineRCCompiler.cmake +++ b/Modules/CMakeDetermineRCCompiler.cmake @@ -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") diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake index 5fa1d18..a2c22b4 100644 --- a/Modules/CMakeDetermineSystem.cmake +++ b/Modules/CMakeDetermineSystem.cmake @@ -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) diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake index baf32df..0beadd8 100644 --- a/Modules/CMakeTestCCompiler.cmake +++ b/Modules/CMakeTestCCompiler.cmake @@ -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) diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake index ece7687..0b0fefc 100644 --- a/Modules/CMakeTestCXXCompiler.cmake +++ b/Modules/CMakeTestCXXCompiler.cmake @@ -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) diff --git a/Modules/CMakeTestFortranCompiler.cmake b/Modules/CMakeTestFortranCompiler.cmake index 3e003ee..cc8c565 100644 --- a/Modules/CMakeTestFortranCompiler.cmake +++ b/Modules/CMakeTestFortranCompiler.cmake @@ -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 "") diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake index ec74325..62e26b4 100644 --- a/Modules/CheckCSourceCompiles.cmake +++ b/Modules/CheckCSourceCompiles.cmake @@ -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}" diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake index 52a2217..ca4a6ec 100644 --- a/Modules/CheckCXXSourceCompiles.cmake +++ b/Modules/CheckCXXSourceCompiles.cmake @@ -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") diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake index 80ff365..e319a81 100644 --- a/Modules/CheckFunctionExists.cmake +++ b/Modules/CheckFunctionExists.cmake @@ -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}) diff --git a/Modules/CheckIncludeFile.cmake b/Modules/CheckIncludeFile.cmake index aafe7a8..cfb6921 100644 --- a/Modules/CheckIncludeFile.cmake +++ b/Modules/CheckIncludeFile.cmake @@ -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") diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake index 9d8eaac..548515b 100644 --- a/Modules/CheckIncludeFileCXX.cmake +++ b/Modules/CheckIncludeFileCXX.cmake @@ -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") diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake index 7ff0ebb..5739afe 100644 --- a/Modules/CheckIncludeFiles.cmake +++ b/Modules/CheckIncludeFiles.cmake @@ -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") diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake index 1003ca7..1e8a6bf 100644 --- a/Modules/CheckLibraryExists.cmake +++ b/Modules/CheckLibraryExists.cmake @@ -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") diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake index 9391ac9..99b8918 100644 --- a/Modules/CheckSymbolExists.cmake +++ b/Modules/CheckSymbolExists.cmake @@ -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}$") diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake index edaa006..2eb1224 100644 --- a/Modules/CheckTypeSize.cmake +++ b/Modules/CheckTypeSize.cmake @@ -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}$") diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake index 2b0bdab..a6cdc01 100644 --- a/Modules/CheckVariableExists.cmake +++ b/Modules/CheckVariableExists.cmake @@ -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}) diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index ed2d055..e4d44c0 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -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") - - 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) - - 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") + 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}" ) + + 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") FIND_PROGRAM(QT_UIC3_EXECUTABLE NAMES uic3 diff --git a/Modules/FindSDL_sound.cmake b/Modules/FindSDL_sound.cmake index bee01b1..62be3ee 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}/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 ) diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake index 9a254e9..74405d6 100644 --- a/Modules/FindThreads.cmake +++ b/Modules/FindThreads.cmake @@ -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") diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake index 071c4ae..3c71c60 100644 --- a/Modules/Platform/Windows-cl.cmake +++ b/Modules/Platform/Windows-cl.cmake @@ -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) diff --git a/Modules/TestBigEndian.cmake b/Modules/TestBigEndian.cmake index 3a38dfc..021b9a6 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}/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}) diff --git a/Modules/TestCXXAcceptsFlag.cmake b/Modules/TestCXXAcceptsFlag.cmake index 8ead32a..2242dcf 100644 --- a/Modules/TestCXXAcceptsFlag.cmake +++ b/Modules/TestCXXAcceptsFlag.cmake @@ -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}) diff --git a/Modules/TestForANSIForScope.cmake b/Modules/TestForANSIForScope.cmake index ca41cca..b8afc10 100644 --- a/Modules/TestForANSIForScope.cmake +++ b/Modules/TestForANSIForScope.cmake @@ -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) diff --git a/Modules/TestForSSTREAM.cmake b/Modules/TestForSSTREAM.cmake index f0d12d9..55afbc3 100644 --- a/Modules/TestForSSTREAM.cmake +++ b/Modules/TestForSSTREAM.cmake @@ -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) diff --git a/Modules/TestForSTDNamespace.cmake b/Modules/TestForSTDNamespace.cmake index e0991ef..58d2ff3 100644 --- a/Modules/TestForSTDNamespace.cmake +++ b/Modules/TestForSTDNamespace.cmake @@ -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) diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index a0a231f..5eecb1d 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -19,6 +19,7 @@ #include "cmSystemTools.h" #include "cmCacheManager.h" #include "cmMakefile.h" +#include "cmake.h" #include #include @@ -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 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(); diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index c04ad73..0feb91e 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -175,7 +175,7 @@ cmGlobalGenerator::EnableLanguage(std::vectorconst& 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"); diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index 9b60ea5..fa58fb6 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -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()); } diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index da3f6a3..387e7e0 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -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(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); diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index f398a7f..5a1a2d5 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -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::const_iterator i = lfiles.begin(); i != lfiles.end(); ++i) { diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index e58fd9d..7ad7825 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -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 { diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index cbe6532..52f48ac 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -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 diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index b9ae7dd..03e55a3 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -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; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 0ce05a8..fe0c39b 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -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) diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 7b30dd2..f00105b 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -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 += "/"; } diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index c3df2a5..a292605 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -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(); diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index a030679..8973627 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -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(), diff --git a/Source/cmTryCompileCommand.cxx b/Source/cmTryCompileCommand.cxx index c7405ca..f3fe893 100644 --- a/Source/cmTryCompileCommand.cxx +++ b/Source/cmTryCompileCommand.cxx @@ -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 diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx index ba7b481..f8f2e86 100644 --- a/Source/cmTryRunCommand.cxx +++ b/Source/cmTryRunCommand.cxx @@ -68,7 +68,9 @@ bool cmTryRunCommand::InitialPass(std::vector 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; diff --git a/Source/cmake.h b/Source/cmake.h index b2cea7b..516d981 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -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 diff --git a/Source/kwsys/kwsysPlatformCxxTests.cmake b/Source/kwsys/kwsysPlatformCxxTests.cmake index 6da82d6..7775457 100644 --- a/Source/kwsys/kwsysPlatformCxxTests.cmake +++ b/Source/kwsys/kwsysPlatformCxxTests.cmake @@ -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) diff --git a/Tests/MakeClean/ToClean/CMakeLists.txt b/Tests/MakeClean/ToClean/CMakeLists.txt index 5703f2e..05ea15c 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}/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" diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt index 7ea918d..f2c6bc4 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}/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") diff --git a/Utilities/cmcurl/CMake/CheckTypeSize.cmake b/Utilities/cmcurl/CMake/CheckTypeSize.cmake index 700a54d..e573d5b 100644 --- a/Utilities/cmcurl/CMake/CheckTypeSize.cmake +++ b/Utilities/cmcurl/CMake/CheckTypeSize.cmake @@ -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}$") diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt index 6cec671..72c157d 100644 --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt @@ -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$") diff --git a/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake b/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake index 6cf5fac..ee06a97 100644 --- a/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake +++ b/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake @@ -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) -- cgit v0.12