ENH: put CmakeTmp into CMakeFiles
This commit is contained in:
parent
1fd9060406
commit
4bdca3b404
|
@ -6,13 +6,13 @@
|
||||||
# any makefiles or projects.
|
# any makefiles or projects.
|
||||||
IF(NOT CMAKE_C_COMPILER_WORKS)
|
IF(NOT CMAKE_C_COMPILER_WORKS)
|
||||||
MESSAGE(STATUS "Check for working C compiler: ${CMAKE_C_COMPILER}")
|
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"
|
"#ifdef __cplusplus\n"
|
||||||
"# error \"The CMAKE_C_COMPILER is set to a C++ compiler\"\n"
|
"# error \"The CMAKE_C_COMPILER is set to a C++ compiler\"\n"
|
||||||
"#endif\n"
|
"#endif\n"
|
||||||
"int main(){return 0;}\n")
|
"int main(){return 0;}\n")
|
||||||
TRY_COMPILE(CMAKE_C_COMPILER_WORKS ${CMAKE_BINARY_DIR}
|
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)
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
SET(C_TEST_WAS_RUN 1)
|
SET(C_TEST_WAS_RUN 1)
|
||||||
ENDIF(NOT CMAKE_C_COMPILER_WORKS)
|
ENDIF(NOT CMAKE_C_COMPILER_WORKS)
|
||||||
|
|
|
@ -6,13 +6,13 @@
|
||||||
# any makefiles or projects.
|
# any makefiles or projects.
|
||||||
IF(NOT CMAKE_CXX_COMPILER_WORKS)
|
IF(NOT CMAKE_CXX_COMPILER_WORKS)
|
||||||
MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER}")
|
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"
|
"#ifndef __cplusplus\n"
|
||||||
"# error \"The CMAKE_CXX_COMPILER is set to a C compiler\"\n"
|
"# error \"The CMAKE_CXX_COMPILER is set to a C compiler\"\n"
|
||||||
"#endif\n"
|
"#endif\n"
|
||||||
"int main(){return 0;}\n")
|
"int main(){return 0;}\n")
|
||||||
TRY_COMPILE(CMAKE_CXX_COMPILER_WORKS ${CMAKE_BINARY_DIR}
|
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)
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
SET(CXX_TEST_WAS_RUN 1)
|
SET(CXX_TEST_WAS_RUN 1)
|
||||||
ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)
|
ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)
|
||||||
|
|
|
@ -6,13 +6,13 @@
|
||||||
# any makefiles or projects.
|
# any makefiles or projects.
|
||||||
IF(NOT CMAKE_Fortran_COMPILER_WORKS)
|
IF(NOT CMAKE_Fortran_COMPILER_WORKS)
|
||||||
MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_Fortran_COMPILER}")
|
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
|
PROGRAM TESTFortran
|
||||||
PRINT *, 'Hello'
|
PRINT *, 'Hello'
|
||||||
END
|
END
|
||||||
")
|
")
|
||||||
TRY_COMPILE(CMAKE_Fortran_COMPILER_WORKS ${CMAKE_BINARY_DIR}
|
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)
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
SET(FORTRAN_TEST_WAS_RUN 1)
|
SET(FORTRAN_TEST_WAS_RUN 1)
|
||||||
ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS)
|
ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS)
|
||||||
|
@ -41,13 +41,13 @@ IF(CMAKE_Fortran_COMPILER_WORKS)
|
||||||
IF(DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
|
IF(DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
|
||||||
ELSE(DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
|
ELSE(DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
|
||||||
MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90")
|
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
|
PROGRAM TESTFortran90
|
||||||
stop = 1 ; do while ( stop .eq. 0 ) ; end do
|
stop = 1 ; do while ( stop .eq. 0 ) ; end do
|
||||||
END PROGRAM TESTFortran90
|
END PROGRAM TESTFortran90
|
||||||
")
|
")
|
||||||
TRY_COMPILE(CMAKE_Fortran_COMPILER_SUPPORTS_F90 ${CMAKE_BINARY_DIR}
|
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)
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
IF(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
|
IF(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
|
||||||
MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- yes")
|
MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- yes")
|
||||||
|
|
|
@ -20,13 +20,13 @@ MACRO(CHECK_C_SOURCE_COMPILES SOURCE VAR)
|
||||||
SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
|
SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
|
||||||
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
|
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
|
||||||
ENDIF(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}")
|
"${SOURCE}")
|
||||||
|
|
||||||
MESSAGE(STATUS "Performing Test ${VAR}")
|
MESSAGE(STATUS "Performing Test ${VAR}")
|
||||||
TRY_COMPILE(${VAR}
|
TRY_COMPILE(${VAR}
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
${CMAKE_BINARY_DIR}/CMakeTmp/src.c
|
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.c
|
||||||
CMAKE_FLAGS
|
CMAKE_FLAGS
|
||||||
"${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
|
"${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
|
||||||
"${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
|
"${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
|
||||||
|
|
|
@ -20,13 +20,13 @@ MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
|
||||||
SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES
|
SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES
|
||||||
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
|
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
|
||||||
ENDIF(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}")
|
"${SOURCE}")
|
||||||
|
|
||||||
MESSAGE(STATUS "Performing Test ${VAR}")
|
MESSAGE(STATUS "Performing Test ${VAR}")
|
||||||
TRY_COMPILE(${VAR}
|
TRY_COMPILE(${VAR}
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
${CMAKE_BINARY_DIR}/CMakeTmp/src.cxx
|
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.cxx
|
||||||
CMAKE_FLAGS
|
CMAKE_FLAGS
|
||||||
"${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}"
|
"${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}"
|
||||||
"${CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES}"
|
"${CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES}"
|
||||||
|
@ -34,14 +34,14 @@ MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
|
||||||
IF(${VAR})
|
IF(${VAR})
|
||||||
SET(${VAR} 1 CACHE INTERNAL "Test ${FUNCTION}")
|
SET(${VAR} 1 CACHE INTERNAL "Test ${FUNCTION}")
|
||||||
MESSAGE(STATUS "Performing Test ${VAR} - Success")
|
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"
|
"Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n"
|
||||||
"${OUTPUT}\n"
|
"${OUTPUT}\n"
|
||||||
"Source file was:\n${SOURCE}\n" APPEND)
|
"Source file was:\n${SOURCE}\n" APPEND)
|
||||||
ELSE(${VAR})
|
ELSE(${VAR})
|
||||||
MESSAGE(STATUS "Performing Test ${VAR} - Failed")
|
MESSAGE(STATUS "Performing Test ${VAR} - Failed")
|
||||||
SET(${VAR} "" CACHE INTERNAL "Test ${FUNCTION}")
|
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"
|
"Performing C++ SOURCE FILE Test ${VAR} failed with the following output:\n"
|
||||||
"${OUTPUT}\n"
|
"${OUTPUT}\n"
|
||||||
"Source file was:\n${SOURCE}\n" APPEND)
|
"Source file was:\n${SOURCE}\n" APPEND)
|
||||||
|
|
|
@ -12,7 +12,7 @@ MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
|
||||||
SET(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
SET(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||||
SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
|
SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
|
||||||
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.c.in
|
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}")
|
MESSAGE(STATUS "Looking for ${INCLUDE}")
|
||||||
IF(${ARGC} EQUAL 3)
|
IF(${ARGC} EQUAL 3)
|
||||||
SET(CMAKE_C_FLAGS_SAVE ${CMAKE_C_FLAGS})
|
SET(CMAKE_C_FLAGS_SAVE ${CMAKE_C_FLAGS})
|
||||||
|
@ -21,7 +21,7 @@ MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
|
||||||
|
|
||||||
TRY_COMPILE(${VARIABLE}
|
TRY_COMPILE(${VARIABLE}
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFile.c
|
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckIncludeFile.c
|
||||||
CMAKE_FLAGS
|
CMAKE_FLAGS
|
||||||
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS}
|
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS}
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
|
|
|
@ -12,7 +12,7 @@ MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
|
||||||
SET(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
SET(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||||
SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
|
SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
|
||||||
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
|
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}")
|
MESSAGE(STATUS "Looking for C++ include ${INCLUDE}")
|
||||||
IF(${ARGC} EQUAL 3)
|
IF(${ARGC} EQUAL 3)
|
||||||
SET(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS})
|
SET(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS})
|
||||||
|
@ -21,7 +21,7 @@ MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
|
||||||
|
|
||||||
TRY_COMPILE(${VARIABLE}
|
TRY_COMPILE(${VARIABLE}
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFile.cxx
|
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckIncludeFile.cxx
|
||||||
CMAKE_FLAGS
|
CMAKE_FLAGS
|
||||||
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS}
|
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS}
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
|
|
|
@ -19,20 +19,20 @@ MACRO(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
|
||||||
ENDFOREACH(FILE)
|
ENDFOREACH(FILE)
|
||||||
SET(CHECK_INCLUDE_FILES_CONTENT
|
SET(CHECK_INCLUDE_FILES_CONTENT
|
||||||
"${CHECK_INCLUDE_FILES_CONTENT}\n\nint main(){return 0;}\n")
|
"${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}")
|
"${CHECK_INCLUDE_FILES_CONTENT}")
|
||||||
|
|
||||||
MESSAGE(STATUS "Looking for include files ${VARIABLE}")
|
MESSAGE(STATUS "Looking for include files ${VARIABLE}")
|
||||||
TRY_COMPILE(${VARIABLE}
|
TRY_COMPILE(${VARIABLE}
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFiles.c
|
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckIncludeFiles.c
|
||||||
CMAKE_FLAGS
|
CMAKE_FLAGS
|
||||||
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILES_FLAGS}
|
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILES_FLAGS}
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
IF(${VARIABLE})
|
IF(${VARIABLE})
|
||||||
MESSAGE(STATUS "Looking for include files ${VARIABLE} - found")
|
MESSAGE(STATUS "Looking for include files ${VARIABLE} - found")
|
||||||
SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${VARIABLE}")
|
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} "
|
"Determining if files ${INCLUDE} "
|
||||||
"exist passed with the following output:\n"
|
"exist passed with the following output:\n"
|
||||||
"${OUTPUT}\n\n")
|
"${OUTPUT}\n\n")
|
||||||
|
|
|
@ -25,13 +25,13 @@ MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
|
||||||
SET(CHECK_SYMBOL_EXISTS_CONTENT
|
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")
|
"${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}")
|
"${CHECK_SYMBOL_EXISTS_CONTENT}")
|
||||||
|
|
||||||
MESSAGE(STATUS "Looking for ${SYMBOL}")
|
MESSAGE(STATUS "Looking for ${SYMBOL}")
|
||||||
TRY_COMPILE(${VARIABLE}
|
TRY_COMPILE(${VARIABLE}
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.c
|
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckSymbolExists.c
|
||||||
CMAKE_FLAGS
|
CMAKE_FLAGS
|
||||||
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_SYMBOL_EXISTS_FLAGS}
|
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_SYMBOL_EXISTS_FLAGS}
|
||||||
"${CHECK_SYMBOL_EXISTS_LIBS}"
|
"${CHECK_SYMBOL_EXISTS_LIBS}"
|
||||||
|
@ -42,7 +42,7 @@ MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
|
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
|
||||||
"Determining if the ${SYMBOL} "
|
"Determining if the ${SYMBOL} "
|
||||||
"exist passed with the following output:\n"
|
"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")
|
"${CHECK_SYMBOL_EXISTS_CONTENT}\n")
|
||||||
ELSE(${VARIABLE})
|
ELSE(${VARIABLE})
|
||||||
MESSAGE(STATUS "Looking for ${SYMBOL} - not found.")
|
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
|
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
|
||||||
"Determining if the ${SYMBOL} "
|
"Determining if the ${SYMBOL} "
|
||||||
"exist failed with the following output:\n"
|
"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")
|
"${CHECK_SYMBOL_EXISTS_CONTENT}\n")
|
||||||
ENDIF(${VARIABLE})
|
ENDIF(${VARIABLE})
|
||||||
ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
|
ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
|
||||||
|
|
|
@ -22,8 +22,8 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
|
||||||
SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
|
SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
|
||||||
ENDFOREACH(def)
|
ENDFOREACH(def)
|
||||||
CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CheckTypeSize.c.in"
|
CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CheckTypeSize.c.in"
|
||||||
"${CMAKE_BINARY_DIR}/CMakeTmp/CheckTypeSize.c" IMMEDIATE @ONLY)
|
"${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" IMMEDIATE @ONLY)
|
||||||
FILE(READ "${CMAKE_BINARY_DIR}/CMakeTmp/CheckTypeSize.c"
|
FILE(READ "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c"
|
||||||
CHECK_TYPE_SIZE_FILE_CONTENT)
|
CHECK_TYPE_SIZE_FILE_CONTENT)
|
||||||
MESSAGE(STATUS "Check size of ${TYPE}")
|
MESSAGE(STATUS "Check size of ${TYPE}")
|
||||||
IF(CMAKE_REQUIRED_LIBRARIES)
|
IF(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
@ -32,7 +32,7 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
|
||||||
ENDIF(CMAKE_REQUIRED_LIBRARIES)
|
ENDIF(CMAKE_REQUIRED_LIBRARIES)
|
||||||
TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
|
TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
|
||||||
${CMAKE_BINARY_DIR}
|
${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}
|
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
|
||||||
"${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
|
"${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
|
|
|
@ -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
|
# To minimize external dependencies, create a sdlsound test program
|
||||||
# which will be used to figure out if additional link dependencies are
|
# which will be used to figure out if additional link dependencies are
|
||||||
# required for the link phase.
|
# 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_sound.h\"
|
||||||
#include \"SDL.h\"
|
#include \"SDL.h\"
|
||||||
int main(int argc, char* argv[])
|
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 TARGET_LINK_LIBRARIES, I seem to loose everything
|
||||||
# in the SDL_LIBRARY string after the "-framework".
|
# in the SDL_LIBRARY string after the "-framework".
|
||||||
# But if I quote the stuff in INCLUDE_DIRECTORIES, it doesn't work.
|
# 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)
|
"PROJECT(DetermineSoundLibs)
|
||||||
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR})
|
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR})
|
||||||
ADD_EXECUTABLE(DetermineSoundLibs DetermineSoundLibs.c)
|
ADD_EXECUTABLE(DetermineSoundLibs DetermineSoundLibs.c)
|
||||||
|
@ -185,8 +185,8 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
|
||||||
|
|
||||||
TRY_COMPILE(
|
TRY_COMPILE(
|
||||||
MY_RESULT
|
MY_RESULT
|
||||||
${PROJECT_BINARY_DIR}/CMakeTmp
|
${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp
|
||||||
${PROJECT_BINARY_DIR}/CMakeTmp
|
${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp
|
||||||
DetermineSoundLibs
|
DetermineSoundLibs
|
||||||
OUTPUT_VARIABLE MY_OUTPUT
|
OUTPUT_VARIABLE MY_OUTPUT
|
||||||
)
|
)
|
||||||
|
|
|
@ -115,12 +115,12 @@ IF(CMAKE_GENERATOR MATCHES "NMake Makefiles")
|
||||||
# try to figure out if we are running the free command line
|
# try to figure out if we are running the free command line
|
||||||
# tools from Microsoft. These tools do not provide debug libraries,
|
# tools from Microsoft. These tools do not provide debug libraries,
|
||||||
# so the link flags used have to be different.
|
# so the link flags used have to be different.
|
||||||
MAKE_DIRECTORY("${CMAKE_BINARY_DIR}/CMakeTmp2")
|
MAKE_DIRECTORY("${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp2")
|
||||||
SET(testForFreeVCFile
|
SET(testForFreeVCFile
|
||||||
"${CMAKE_ROOT}/Modules/CMakeTestForFreeVC.cxx")
|
"${CMAKE_ROOT}/Modules/CMakeTestForFreeVC.cxx")
|
||||||
STRING(REGEX REPLACE "/" "\\\\" testForFreeVCFile "${testForFreeVCFile}")
|
STRING(REGEX REPLACE "/" "\\\\" testForFreeVCFile "${testForFreeVCFile}")
|
||||||
MESSAGE(STATUS "Check if this is a free VC compiler")
|
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
|
ARGS /nologo /MD /EHsc
|
||||||
\"${testForFreeVCFile}\"
|
\"${testForFreeVCFile}\"
|
||||||
OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT
|
OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT
|
||||||
|
|
|
@ -23,8 +23,8 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
|
||||||
SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
|
SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
|
||||||
ENDFOREACH(def)
|
ENDFOREACH(def)
|
||||||
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in"
|
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in"
|
||||||
"${CMAKE_BINARY_DIR}/CMakeTmp/CheckTypeSize.c" IMMEDIATE @ONLY)
|
"${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" @ONLY)
|
||||||
FILE(READ "${CMAKE_BINARY_DIR}/CMakeTmp/CheckTypeSize.c"
|
FILE(READ "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c"
|
||||||
CHECK_TYPE_SIZE_FILE_CONTENT)
|
CHECK_TYPE_SIZE_FILE_CONTENT)
|
||||||
MESSAGE(STATUS "Check size of ${TYPE}")
|
MESSAGE(STATUS "Check size of ${TYPE}")
|
||||||
IF(CMAKE_REQUIRED_LIBRARIES)
|
IF(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
@ -33,7 +33,7 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
|
||||||
ENDIF(CMAKE_REQUIRED_LIBRARIES)
|
ENDIF(CMAKE_REQUIRED_LIBRARIES)
|
||||||
TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
|
TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
|
||||||
${CMAKE_BINARY_DIR}
|
${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}
|
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
|
||||||
"${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
|
"${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
|
|
|
@ -110,7 +110,7 @@ int cmTryCompileCommand::CoreTryCompileCode(
|
||||||
// signature
|
// signature
|
||||||
if (srcFileSignature)
|
if (srcFileSignature)
|
||||||
{
|
{
|
||||||
tmpString = argv[1] + "/CMakeTmp";
|
tmpString = argv[1] + "/CMakeFiles/CMakeTmp";
|
||||||
binaryDirectory = tmpString.c_str();
|
binaryDirectory = tmpString.c_str();
|
||||||
}
|
}
|
||||||
// make sure the binary directory exists
|
// make sure the binary directory exists
|
||||||
|
@ -201,7 +201,7 @@ int cmTryCompileCommand::CoreTryCompileCode(
|
||||||
projectName = "CMAKE_TRY_COMPILE";
|
projectName = "CMAKE_TRY_COMPILE";
|
||||||
targetName = "cmTryCompileExec";
|
targetName = "cmTryCompileExec";
|
||||||
// if the source is not in CMakeTmp
|
// 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());
|
mf->AddCMakeDependFile(source.c_str());
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ public:
|
||||||
"extra flags that can be included are, "
|
"extra flags that can be included are, "
|
||||||
"INCLUDE_DIRECTORIES, LINK_DIRECTORIES, and LINK_LIBRARIES. "
|
"INCLUDE_DIRECTORIES, LINK_DIRECTORIES, and LINK_LIBRARIES. "
|
||||||
"COMPILE_DEFINITIONS are -Ddefinition that will be passed to the "
|
"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 "
|
"are cleaned automatically. If OUTPUT_VARIABLE is specified, then the "
|
||||||
"output from the build process is stored in the given variable. "
|
"output from the build process is stored in the given variable. "
|
||||||
"TRY_COMPILE creates a CMakeList.txt "
|
"TRY_COMPILE creates a CMakeList.txt "
|
||||||
|
|
|
@ -67,7 +67,7 @@ bool cmTryRunCommand::InitialPass(std::vector<std::string> const& argv)
|
||||||
int res = cmTryCompileCommand::CoreTryCompileCode(m_Makefile, tryCompile, false);
|
int res = cmTryCompileCommand::CoreTryCompileCode(m_Makefile, tryCompile, false);
|
||||||
|
|
||||||
// now try running the command if it compiled
|
// now try running the command if it compiled
|
||||||
std::string binaryDirectory = argv[2] + "/CMakeTmp";
|
std::string binaryDirectory = argv[2] + "/CMakeFiles/CMakeTmp";
|
||||||
if (!res)
|
if (!res)
|
||||||
{
|
{
|
||||||
int retVal = -1;
|
int retVal = -1;
|
||||||
|
|
|
@ -2,7 +2,7 @@ PROJECT(TryCompile)
|
||||||
|
|
||||||
# try to compile a file that should compile
|
# try to compile a file that should compile
|
||||||
TRY_COMPILE(SHOULD_PASS
|
TRY_COMPILE(SHOULD_PASS
|
||||||
${TryCompile_BINARY_DIR}/CMakeTmp
|
${TryCompile_BINARY_DIR}/CMakeFiles/CMakeTmp
|
||||||
${TryCompile_SOURCE_DIR}/pass.c
|
${TryCompile_SOURCE_DIR}/pass.c
|
||||||
OUTPUT_VARIABLE TRY_OUT)
|
OUTPUT_VARIABLE TRY_OUT)
|
||||||
IF(NOT SHOULD_PASS)
|
IF(NOT SHOULD_PASS)
|
||||||
|
@ -11,7 +11,7 @@ ENDIF(NOT SHOULD_PASS)
|
||||||
|
|
||||||
# try to compile a file that should not compile
|
# try to compile a file that should not compile
|
||||||
TRY_COMPILE(SHOULD_FAIL
|
TRY_COMPILE(SHOULD_FAIL
|
||||||
${TryCompile_BINARY_DIR}/CMakeTmp
|
${TryCompile_BINARY_DIR}/CMakeFiles/CMakeTmp
|
||||||
${TryCompile_SOURCE_DIR}/fail.c
|
${TryCompile_SOURCE_DIR}/fail.c
|
||||||
OUTPUT_VARIABLE TRY_OUT)
|
OUTPUT_VARIABLE TRY_OUT)
|
||||||
IF(SHOULD_FAIL)
|
IF(SHOULD_FAIL)
|
||||||
|
@ -20,7 +20,7 @@ ENDIF(SHOULD_FAIL)
|
||||||
|
|
||||||
# try to compile a file that should compile
|
# try to compile a file that should compile
|
||||||
TRY_COMPILE(SHOULD_PASS
|
TRY_COMPILE(SHOULD_PASS
|
||||||
${TryCompile_BINARY_DIR}/CMakeTmp
|
${TryCompile_BINARY_DIR}/CMakeFiles/CMakeTmp
|
||||||
${TryCompile_SOURCE_DIR}/pass.c
|
${TryCompile_SOURCE_DIR}/pass.c
|
||||||
OUTPUT_VARIABLE TRY_OUT)
|
OUTPUT_VARIABLE TRY_OUT)
|
||||||
IF(NOT SHOULD_PASS)
|
IF(NOT SHOULD_PASS)
|
||||||
|
@ -29,7 +29,7 @@ ENDIF(NOT SHOULD_PASS)
|
||||||
|
|
||||||
# try to compile a file that should not compile
|
# try to compile a file that should not compile
|
||||||
TRY_COMPILE(SHOULD_FAIL
|
TRY_COMPILE(SHOULD_FAIL
|
||||||
${TryCompile_BINARY_DIR}/CMakeTmp
|
${TryCompile_BINARY_DIR}/CMakeFiles/CMakeTmp
|
||||||
${TryCompile_SOURCE_DIR}/fail.c
|
${TryCompile_SOURCE_DIR}/fail.c
|
||||||
OUTPUT_VARIABLE TRY_OUT)
|
OUTPUT_VARIABLE TRY_OUT)
|
||||||
IF(SHOULD_FAIL)
|
IF(SHOULD_FAIL)
|
||||||
|
@ -45,7 +45,8 @@ IF(NOT SHOULD_FAIL)
|
||||||
ELSE(NOT SHOULD_FAIL)
|
ELSE(NOT SHOULD_FAIL)
|
||||||
MESSAGE("Test failed")
|
MESSAGE("Test failed")
|
||||||
ENDIF(NOT SHOULD_FAIL)
|
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)
|
${CMAKE_ROOT}/Modules/TestForAnsiForScope.cxx OUTPUT_VARIABLE OUT)
|
||||||
IF (CMAKE_ANSI_FOR_SCOPE)
|
IF (CMAKE_ANSI_FOR_SCOPE)
|
||||||
MESSAGE("Compiler supports ansi for")
|
MESSAGE("Compiler supports ansi for")
|
||||||
|
@ -53,7 +54,8 @@ ELSE(CMAKE_ANSI_FOR_SCOPE)
|
||||||
MESSAGE("Compiler does not support ansi for scope")
|
MESSAGE("Compiler does not support ansi for scope")
|
||||||
ENDIF(CMAKE_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)
|
${CMAKE_ROOT}/Modules/TestForAnsiForScope.cxx OUTPUT_VARIABLE OUT)
|
||||||
IF (CMAKE_ANSI_FOR_SCOPE)
|
IF (CMAKE_ANSI_FOR_SCOPE)
|
||||||
MESSAGE("Compiler supports ansi for")
|
MESSAGE("Compiler supports ansi for")
|
||||||
|
|
|
@ -23,8 +23,8 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
|
||||||
SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
|
SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
|
||||||
ENDFOREACH(def)
|
ENDFOREACH(def)
|
||||||
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in"
|
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in"
|
||||||
"${CMAKE_BINARY_DIR}/CMakeTmp/CheckTypeSize.c" IMMEDIATE @ONLY)
|
"${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" @ONLY)
|
||||||
FILE(READ "${CMAKE_BINARY_DIR}/CMakeTmp/CheckTypeSize.c"
|
FILE(READ "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c"
|
||||||
CHECK_TYPE_SIZE_FILE_CONTENT)
|
CHECK_TYPE_SIZE_FILE_CONTENT)
|
||||||
MESSAGE(STATUS "Check size of ${TYPE}")
|
MESSAGE(STATUS "Check size of ${TYPE}")
|
||||||
IF(CMAKE_REQUIRED_LIBRARIES)
|
IF(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
@ -33,7 +33,7 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
|
||||||
ENDIF(CMAKE_REQUIRED_LIBRARIES)
|
ENDIF(CMAKE_REQUIRED_LIBRARIES)
|
||||||
TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
|
TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
|
||||||
${CMAKE_BINARY_DIR}
|
${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}
|
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
|
||||||
"${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
|
"${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
|
|
|
@ -15,13 +15,13 @@ MACRO(TRY_COMPILE_FROM_SOURCE SOURCE VAR)
|
||||||
ENDFOREACH(inc)
|
ENDFOREACH(inc)
|
||||||
|
|
||||||
SET(src "${src}\nint main() { ${SOURCE} ; return 0; }")
|
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}")
|
"${src}")
|
||||||
|
|
||||||
MESSAGE(STATUS "Performing Test ${VAR}")
|
MESSAGE(STATUS "Performing Test ${VAR}")
|
||||||
TRY_COMPILE(${VAR}
|
TRY_COMPILE(${VAR}
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
${CMAKE_BINARY_DIR}/CMakeTmp/src.c
|
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.c
|
||||||
CMAKE_FLAGS
|
CMAKE_FLAGS
|
||||||
"${TRY_COMPILE_FROM_SOURCE_ADD_LIBRARIES}"
|
"${TRY_COMPILE_FROM_SOURCE_ADD_LIBRARIES}"
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
|
|
Loading…
Reference in New Issue