You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1793 lines
52 KiB

20 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your (potentially crosscompiling) toolchain -have TRY_RUN() complain if you try to use it in crosscompiling mode (which were compiled but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in TRY_RUN(), probably TRY_RUN won't be able to run the executables if they have a different suffix because they are probably crosscompiled, but nevertheless it should be able to find them -make several cmake variables presettable by the user: CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move ranlib on OSX from the file command to a command in executed in cmake_install.cmake -add support for stripping during install in cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, first (very incomplete) step to support MS crosscompiling tools -remove stdio.h from the simple C program which checks if the compiler works, since this may not exist for some embedded platforms -create a new CMakeFindBinUtils.cmake which collects the search fro ar, ranlib, strip, ld, link, install_name_tool and other tools like these -add support for CMAKE_FIND_ROOT_PATH for all FIND_XXX commands, which is a list of directories which will be prepended to all search directories, right now as a cmake variable, turning it into a global cmake property may need some more work -remove cmTestTestHandler::TryExecutable(), it's unused -split cmFileCommand::HandleInstall() into slightly smaller functions Alex
18 years ago
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #include "cmFileCommand.h"
  14. #include "cmake.h"
  15. #include "cmHexFileConverter.h"
  16. #include "cmFileTimeComparison.h"
  17. #include <sys/types.h>
  18. #include <sys/stat.h>
  19. #include <cmsys/Directory.hxx>
  20. #include <cmsys/Glob.hxx>
  21. #include <cmsys/RegularExpression.hxx>
  22. // Table of permissions flags.
  23. #if defined(_WIN32) && !defined(__CYGWIN__)
  24. static mode_t mode_owner_read = S_IREAD;
  25. static mode_t mode_owner_write = S_IWRITE;
  26. static mode_t mode_owner_execute = S_IEXEC;
  27. static mode_t mode_group_read = 0;
  28. static mode_t mode_group_write = 0;
  29. static mode_t mode_group_execute = 0;
  30. static mode_t mode_world_read = 0;
  31. static mode_t mode_world_write = 0;
  32. static mode_t mode_world_execute = 0;
  33. static mode_t mode_setuid = 0;
  34. static mode_t mode_setgid = 0;
  35. #else
  36. static mode_t mode_owner_read = S_IRUSR;
  37. static mode_t mode_owner_write = S_IWUSR;
  38. static mode_t mode_owner_execute = S_IXUSR;
  39. static mode_t mode_group_read = S_IRGRP;
  40. static mode_t mode_group_write = S_IWGRP;
  41. static mode_t mode_group_execute = S_IXGRP;
  42. static mode_t mode_world_read = S_IROTH;
  43. static mode_t mode_world_write = S_IWOTH;
  44. static mode_t mode_world_execute = S_IXOTH;
  45. static mode_t mode_setuid = S_ISUID;
  46. static mode_t mode_setgid = S_ISGID;
  47. #endif
  48. // cmLibraryCommand
  49. bool cmFileCommand::InitialPass(std::vector<std::string> const& args)
  50. {
  51. if(args.size() < 2 )
  52. {
  53. this->SetError("must be called with at least two arguments.");
  54. return false;
  55. }
  56. std::string subCommand = args[0];
  57. if ( subCommand == "WRITE" )
  58. {
  59. return this->HandleWriteCommand(args, false);
  60. }
  61. else if ( subCommand == "APPEND" )
  62. {
  63. return this->HandleWriteCommand(args, true);
  64. }
  65. else if ( subCommand == "READ" )
  66. {
  67. return this->HandleReadCommand(args);
  68. }
  69. else if ( subCommand == "STRINGS" )
  70. {
  71. return this->HandleStringsCommand(args);
  72. }
  73. else if ( subCommand == "GLOB" )
  74. {
  75. return this->HandleGlobCommand(args, false);
  76. }
  77. else if ( subCommand == "GLOB_RECURSE" )
  78. {
  79. return this->HandleGlobCommand(args, true);
  80. }
  81. else if ( subCommand == "MAKE_DIRECTORY" )
  82. {
  83. return this->HandleMakeDirectoryCommand(args);
  84. }
  85. else if ( subCommand == "REMOVE" )
  86. {
  87. return this->HandleRemove(args, false);
  88. }
  89. else if ( subCommand == "REMOVE_RECURSE" )
  90. {
  91. return this->HandleRemove(args, true);
  92. }
  93. else if ( subCommand == "INSTALL" )
  94. {
  95. return this->HandleInstallCommand(args);
  96. }
  97. else if ( subCommand == "RELATIVE_PATH" )
  98. {
  99. return this->HandleRelativePathCommand(args);
  100. }
  101. else if ( subCommand == "TO_CMAKE_PATH" )
  102. {
  103. return this->HandleCMakePathCommand(args, false);
  104. }
  105. else if ( subCommand == "TO_NATIVE_PATH" )
  106. {
  107. return this->HandleCMakePathCommand(args, true);
  108. }
  109. std::string e = "does not recognize sub-command "+subCommand;
  110. this->SetError(e.c_str());
  111. return false;
  112. }
  113. //----------------------------------------------------------------------------
  114. bool cmFileCommand::HandleWriteCommand(std::vector<std::string> const& args,
  115. bool append)
  116. {
  117. std::string message;
  118. std::vector<std::string>::const_iterator i = args.begin();
  119. i++; // Get rid of subcommand
  120. std::string fileName = *i;
  121. if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) )
  122. {
  123. fileName = this->Makefile->GetCurrentDirectory();
  124. fileName += "/" + *i;
  125. }
  126. i++;
  127. for(;i != args.end(); ++i)
  128. {
  129. message += *i;
  130. }
  131. if ( !this->Makefile->CanIWriteThisFile(fileName.c_str()) )
  132. {
  133. std::string e
  134. = "attempted to write a file: " + fileName +
  135. " into a source directory.";
  136. this->SetError(e.c_str());
  137. cmSystemTools::SetFatalErrorOccured();
  138. return false;
  139. }
  140. std::string dir = cmSystemTools::GetFilenamePath(fileName);
  141. cmSystemTools::MakeDirectory(dir.c_str());
  142. mode_t mode =
  143. #if defined( _MSC_VER ) || defined( __MINGW32__ )
  144. S_IREAD | S_IWRITE
  145. #elif defined( __BORLANDC__ )
  146. S_IRUSR | S_IWUSR
  147. #else
  148. S_IRUSR | S_IWUSR |
  149. S_IRGRP |
  150. S_IROTH
  151. #endif
  152. ;
  153. // Set permissions to writable
  154. if ( cmSystemTools::GetPermissions(fileName.c_str(), mode) )
  155. {
  156. cmSystemTools::SetPermissions(fileName.c_str(),
  157. #if defined( _MSC_VER ) || defined( __MINGW32__ )
  158. S_IREAD | S_IWRITE
  159. #else
  160. S_IRUSR | S_IWUSR
  161. #endif
  162. );
  163. }
  164. // If GetPermissions fails, pretend like it is ok. File open will fail if
  165. // the file is not writable
  166. std::ofstream file(fileName.c_str(), append?std::ios::app: std::ios::out);
  167. if ( !file )
  168. {
  169. std::string error = "Internal CMake error when trying to open file: ";
  170. error += fileName.c_str();
  171. error += " for writing.";
  172. this->SetError(error.c_str());
  173. return false;
  174. }
  175. file << message;
  176. file.close();
  177. cmSystemTools::SetPermissions(fileName.c_str(), mode);
  178. this->Makefile->AddWrittenFile(fileName.c_str());
  179. return true;
  180. }
  181. //----------------------------------------------------------------------------
  182. bool cmFileCommand::HandleReadCommand(std::vector<std::string> const& args)
  183. {
  184. if ( args.size() < 3 )
  185. {
  186. this->SetError("READ must be called with at least two additional "
  187. "arguments");
  188. return false;
  189. }
  190. std::string fileName = args[1];
  191. if ( !cmsys::SystemTools::FileIsFullPath(args[1].c_str()) )
  192. {
  193. fileName = this->Makefile->GetCurrentDirectory();
  194. fileName += "/" + args[1];
  195. }
  196. std::string variable = args[2];
  197. std::ifstream file(fileName.c_str(), std::ios::in);
  198. if ( !file )
  199. {
  200. std::string error = "Internal CMake error when trying to open file: ";
  201. error += fileName.c_str();
  202. error += " for reading.";
  203. this->SetError(error.c_str());
  204. return false;
  205. }
  206. // if there a limit?
  207. long sizeLimit = -1;
  208. if (args.size() >= 5 && args[3] == "LIMIT")
  209. {
  210. sizeLimit = atoi(args[4].c_str());
  211. }
  212. std::string output;
  213. std::string line;
  214. bool has_newline = false;
  215. while (sizeLimit != 0 &&
  216. cmSystemTools::GetLineFromStream(file, line, &has_newline,
  217. sizeLimit) )
  218. {
  219. if (sizeLimit > 0)
  220. {
  221. sizeLimit = sizeLimit - static_cast<long>(line.size());
  222. if (has_newline)
  223. {
  224. sizeLimit--;
  225. }
  226. if (sizeLimit < 0)
  227. {
  228. sizeLimit = 0;
  229. }
  230. }
  231. output += line;
  232. if ( has_newline )
  233. {
  234. output += "\n";
  235. }
  236. }
  237. this->Makefile->AddDefinition(variable.c_str(), output.c_str());
  238. return true;
  239. }
  240. //----------------------------------------------------------------------------
  241. bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
  242. {
  243. if(args.size() < 3)
  244. {
  245. this->SetError("STRINGS requires a file name and output variable");
  246. return false;
  247. }
  248. // Get the file to read.
  249. std::string fileName = args[1];
  250. if(!cmsys::SystemTools::FileIsFullPath(fileName.c_str()))
  251. {
  252. fileName = this->Makefile->GetCurrentDirectory();
  253. fileName += "/" + args[1];
  254. }
  255. // Get the variable in which to store the results.
  256. std::string outVar = args[2];
  257. // Parse the options.
  258. enum { arg_none,
  259. arg_limit_input,
  260. arg_limit_output,
  261. arg_limit_count,
  262. arg_length_minimum,
  263. arg_length_maximum,
  264. arg__maximum,
  265. arg_regex };
  266. unsigned int minlen = 0;
  267. unsigned int maxlen = 0;
  268. int limit_input = -1;
  269. int limit_output = -1;
  270. unsigned int limit_count = 0;
  271. cmsys::RegularExpression regex;
  272. bool have_regex = false;
  273. bool newline_consume = false;
  274. bool hex_conversion_enabled = true;
  275. int arg_mode = arg_none;
  276. for(unsigned int i=3; i < args.size(); ++i)
  277. {
  278. if(args[i] == "LIMIT_INPUT")
  279. {
  280. arg_mode = arg_limit_input;
  281. }
  282. else if(args[i] == "LIMIT_OUTPUT")
  283. {
  284. arg_mode = arg_limit_output;
  285. }
  286. else if(args[i] == "LIMIT_COUNT")
  287. {
  288. arg_mode = arg_limit_count;
  289. }
  290. else if(args[i] == "LENGTH_MINIMUM")
  291. {
  292. arg_mode = arg_length_minimum;
  293. }
  294. else if(args[i] == "LENGTH_MAXIMUM")
  295. {
  296. arg_mode = arg_length_maximum;
  297. }
  298. else if(args[i] == "REGEX")
  299. {
  300. arg_mode = arg_regex;
  301. }
  302. else if(args[i] == "NEWLINE_CONSUME")
  303. {
  304. newline_consume = true;
  305. arg_mode = arg_none;
  306. }
  307. else if(args[i] == "NO_HEX_CONVERSION")
  308. {
  309. hex_conversion_enabled = false;
  310. arg_mode = arg_none;
  311. }
  312. else if(arg_mode == arg_limit_input)
  313. {
  314. if(sscanf(args[i].c_str(), "%d", &limit_input) != 1 ||
  315. limit_input < 0)
  316. {
  317. cmOStringStream e;
  318. e << "STRINGS option LIMIT_INPUT value \""
  319. << args[i] << "\" is not an unsigned integer.";
  320. this->SetError(e.str().c_str());
  321. return false;
  322. }
  323. arg_mode = arg_none;
  324. }
  325. else if(arg_mode == arg_limit_output)
  326. {
  327. if(sscanf(args[i].c_str(), "%d", &limit_output) != 1 ||
  328. limit_output < 0)
  329. {
  330. cmOStringStream e;
  331. e << "STRINGS option LIMIT_OUTPUT value \""
  332. << args[i] << "\" is not an unsigned integer.";
  333. this->SetError(e.str().c_str());
  334. return false;
  335. }
  336. arg_mode = arg_none;
  337. }
  338. else if(arg_mode == arg_limit_count)
  339. {
  340. int count;
  341. if(sscanf(args[i].c_str(), "%d", &count) != 1 || count < 0)
  342. {
  343. cmOStringStream e;
  344. e << "STRINGS option LIMIT_COUNT value \""
  345. << args[i] << "\" is not an unsigned integer.";
  346. this->SetError(e.str().c_str());
  347. return false;
  348. }
  349. limit_count = count;
  350. arg_mode = arg_none;
  351. }
  352. else if(arg_mode == arg_length_minimum)
  353. {
  354. int len;
  355. if(sscanf(args[i].c_str(), "%d", &len) != 1 || len < 0)
  356. {
  357. cmOStringStream e;
  358. e << "STRINGS option LENGTH_MINIMUM value \""
  359. << args[i] << "\" is not an unsigned integer.";
  360. this->SetError(e.str().c_str());
  361. return false;
  362. }
  363. minlen = len;
  364. arg_mode = arg_none;
  365. }
  366. else if(arg_mode == arg_length_maximum)
  367. {
  368. int len;
  369. if(sscanf(args[i].c_str(), "%d", &len) != 1 || len < 0)
  370. {
  371. cmOStringStream e;
  372. e << "STRINGS option LENGTH_MAXIMUM value \""
  373. << args[i] << "\" is not an unsigned integer.";
  374. this->SetError(e.str().c_str());
  375. return false;
  376. }
  377. maxlen = len;
  378. arg_mode = arg_none;
  379. }
  380. else if(arg_mode == arg_regex)
  381. {
  382. if(!regex.compile(args[i].c_str()))
  383. {
  384. cmOStringStream e;
  385. e << "STRINGS option REGEX value \""
  386. << args[i] << "\" could not be compiled.";
  387. this->SetError(e.str().c_str());
  388. return false;
  389. }
  390. have_regex = true;
  391. arg_mode = arg_none;
  392. }
  393. else
  394. {
  395. cmOStringStream e;
  396. e << "STRINGS given unknown argument \""
  397. << args[i] << "\"";
  398. this->SetError(e.str().c_str());
  399. return false;
  400. }
  401. }
  402. if (hex_conversion_enabled)
  403. {
  404. // TODO: should work without temp file, but just on a memory buffer
  405. std::string binaryFileName = this->Makefile->GetCurrentOutputDirectory();
  406. binaryFileName += cmake::GetCMakeFilesDirectory();
  407. binaryFileName += "/FileCommandStringsBinaryFile";
  408. if(cmHexFileConverter::TryConvert(fileName.c_str(),binaryFileName.c_str()))
  409. {
  410. fileName = binaryFileName;
  411. }
  412. }
  413. // Open the specified file.
  414. #if defined(_WIN32) || defined(__CYGWIN__)
  415. std::ifstream fin(fileName.c_str(), std::ios::in | std::ios::binary);
  416. #else
  417. std::ifstream fin(fileName.c_str(), std::ios::in);
  418. #endif
  419. if(!fin)
  420. {
  421. cmOStringStream e;
  422. e << "STRINGS file \"" << fileName << "\" cannot be read.";
  423. this->SetError(e.str().c_str());
  424. return false;
  425. }
  426. // Parse strings out of the file.
  427. int output_size = 0;
  428. std::vector<std::string> strings;
  429. std::string s;
  430. int c;
  431. while((!limit_count || strings.size() < limit_count) &&
  432. (limit_input < 0 || static_cast<int>(fin.tellg()) < limit_input) &&
  433. (c = fin.get(), fin))
  434. {
  435. if(c == '\0')
  436. {
  437. // A terminating null character has been found. Check if the
  438. // current string matches the requirements. Since it was
  439. // terminated by a null character, we require that the length be
  440. // at least one no matter what the user specified.
  441. if(s.length() >= minlen && s.length() >= 1 &&
  442. (!have_regex || regex.find(s.c_str())))
  443. {
  444. output_size += static_cast<int>(s.size()) + 1;
  445. if(limit_output >= 0 && output_size >= limit_output)
  446. {
  447. s = "";
  448. break;
  449. }
  450. strings.push_back(s);
  451. }
  452. // Reset the string to empty.
  453. s = "";
  454. }
  455. else if(c == '\n' && !newline_consume)
  456. {
  457. // The current line has been terminated. Check if the current
  458. // string matches the requirements. The length may now be as
  459. // low as zero since blank lines are allowed.
  460. if(s.length() >= minlen &&
  461. (!have_regex || regex.find(s.c_str())))
  462. {
  463. output_size += static_cast<int>(s.size()) + 1;
  464. if(limit_output >= 0 && output_size >= limit_output)
  465. {
  466. s = "";
  467. break;
  468. }
  469. strings.push_back(s);
  470. }
  471. // Reset the string to empty.
  472. s = "";
  473. }
  474. else if(c == '\r')
  475. {
  476. // Ignore CR character to make output always have UNIX newlines.
  477. }
  478. else if(c >= 0x20 && c < 0x7F || c == '\t' ||
  479. (c == '\n' && newline_consume))
  480. {
  481. // This is an ASCII character that may be part of a string.
  482. s += c;
  483. }
  484. else
  485. {
  486. // This is a non-string character. Reset the string to emtpy.
  487. s = "";
  488. }
  489. // Terminate a string if the maximum length is reached.
  490. if(maxlen > 0 && s.size() == maxlen)
  491. {
  492. if(s.length() >= minlen &&
  493. (!have_regex || regex.find(s.c_str())))
  494. {
  495. output_size += static_cast<int>(s.size()) + 1;
  496. if(limit_output >= 0 && output_size >= limit_output)
  497. {
  498. s = "";
  499. break;
  500. }
  501. strings.push_back(s);
  502. }
  503. s = "";
  504. }
  505. }
  506. // If there is a non-empty current string we have hit the end of the
  507. // input file or the input size limit. Check if the current string
  508. // matches the requirements.
  509. if((!limit_count || strings.size() < limit_count) &&
  510. !s.empty() && s.length() >= minlen &&
  511. (!have_regex || regex.find(s.c_str())))
  512. {
  513. output_size += static_cast<int>(s.size()) + 1;
  514. if(limit_output < 0 || output_size < limit_output)
  515. {
  516. strings.push_back(s);
  517. }
  518. }
  519. // Encode the result in a CMake list.
  520. const char* sep = "";
  521. std::string output;
  522. for(std::vector<std::string>::const_iterator si = strings.begin();
  523. si != strings.end(); ++si)
  524. {
  525. // Separate the strings in the output to make it a list.
  526. output += sep;
  527. sep = ";";
  528. // Store the string in the output, but escape semicolons to
  529. // make sure it is a list.
  530. std::string const& sr = *si;
  531. for(unsigned int i=0; i < sr.size(); ++i)
  532. {
  533. if(sr[i] == ';')
  534. {
  535. output += '\\';
  536. }
  537. output += sr[i];
  538. }
  539. }
  540. // Save the output in a makefile variable.
  541. this->Makefile->AddDefinition(outVar.c_str(), output.c_str());
  542. return true;
  543. }
  544. //----------------------------------------------------------------------------
  545. bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args,
  546. bool recurse)
  547. {
  548. if ( args.size() < 2 )
  549. {
  550. this->SetError("GLOB requires at least a variable name");
  551. return false;
  552. }
  553. std::vector<std::string>::const_iterator i = args.begin();
  554. i++; // Get rid of subcommand
  555. std::string variable = *i;
  556. i++;
  557. cmsys::Glob g;
  558. g.SetRecurse(recurse);
  559. std::string output = "";
  560. bool first = true;
  561. for ( ; i != args.end(); ++i )
  562. {
  563. if ( *i == "RELATIVE" )
  564. {
  565. ++i; // skip RELATIVE
  566. if ( i == args.end() )
  567. {
  568. this->SetError("GLOB requires a directory after the RELATIVE tag");
  569. return false;
  570. }
  571. g.SetRelative(i->c_str());
  572. ++i;
  573. if(i == args.end())
  574. {
  575. this->SetError("GLOB requires a glob expression after the directory");
  576. return false;
  577. }
  578. }
  579. if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) )
  580. {
  581. std::string expr = this->Makefile->GetCurrentDirectory();
  582. // Handle script mode
  583. if ( expr.size() > 0 )
  584. {
  585. expr += "/" + *i;
  586. g.FindFiles(expr);
  587. }
  588. else
  589. {
  590. g.FindFiles(*i);
  591. }
  592. }
  593. else
  594. {
  595. g.FindFiles(*i);
  596. }
  597. std::vector<std::string>::size_type cc;
  598. std::vector<std::string>& files = g.GetFiles();
  599. for ( cc = 0; cc < files.size(); cc ++ )
  600. {
  601. if ( !first )
  602. {
  603. output += ";";
  604. }
  605. output += files[cc];
  606. first = false;
  607. }
  608. }
  609. this->Makefile->AddDefinition(variable.c_str(), output.c_str());
  610. return true;
  611. }
  612. //----------------------------------------------------------------------------
  613. bool cmFileCommand::HandleMakeDirectoryCommand(
  614. std::vector<std::string> const& args)
  615. {
  616. if(args.size() < 2 )
  617. {
  618. this->SetError("called with incorrect number of arguments");
  619. return false;
  620. }
  621. std::vector<std::string>::const_iterator i = args.begin();
  622. i++; // Get rid of subcommand
  623. std::string expr;
  624. for ( ; i != args.end(); ++i )
  625. {
  626. const std::string* cdir = &(*i);
  627. if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) )
  628. {
  629. expr = this->Makefile->GetCurrentDirectory();
  630. expr += "/" + *i;
  631. cdir = &expr;
  632. }
  633. if ( !this->Makefile->CanIWriteThisFile(cdir->c_str()) )
  634. {
  635. std::string e = "attempted to create a directory: " + *cdir
  636. + " into a source directory.";
  637. this->SetError(e.c_str());
  638. cmSystemTools::SetFatalErrorOccured();
  639. return false;
  640. }
  641. if ( !cmSystemTools::MakeDirectory(cdir->c_str()) )
  642. {
  643. std::string error = "problem creating directory: " + *cdir;
  644. this->SetError(error.c_str());
  645. return false;
  646. }
  647. }
  648. return true;
  649. }
  650. //----------------------------------------------------------------------------
  651. // File installation helper class.
  652. struct cmFileInstaller
  653. {
  654. // Methods to actually install files.
  655. bool InstallFile(const char* fromFile, const char* toFile, bool always);
  656. bool InstallDirectory(const char* source, const char* destination,
  657. bool always);
  658. // All instances need the file command and makefile using them.
  659. cmFileInstaller(cmFileCommand* fc, cmMakefile* mf):
  660. FileCommand(fc), Makefile(mf), DestDirLength(0)
  661. {
  662. // Get the current manifest.
  663. this->Manifest =
  664. this->Makefile->GetSafeDefinition("CMAKE_INSTALL_MANIFEST_FILES");
  665. }
  666. ~cmFileInstaller()
  667. {
  668. // Save the updated install manifest.
  669. this->Makefile->AddDefinition("CMAKE_INSTALL_MANIFEST_FILES",
  670. this->Manifest.c_str());
  671. }
  672. private:
  673. cmFileCommand* FileCommand;
  674. cmMakefile* Makefile;
  675. cmFileTimeComparison FileTimes;
  676. public:
  677. // The length of the destdir setting.
  678. int DestDirLength;
  679. // The current file manifest (semicolon separated list).
  680. std::string Manifest;
  681. // Permissions for files and directories installed by this object.
  682. mode_t FilePermissions;
  683. mode_t DirPermissions;
  684. // Properties set by pattern and regex match rules.
  685. struct MatchProperties
  686. {
  687. bool Exclude;
  688. mode_t Permissions;
  689. MatchProperties(): Exclude(false), Permissions(0) {}
  690. };
  691. struct MatchRule
  692. {
  693. cmsys::RegularExpression Regex;
  694. MatchProperties Properties;
  695. std::string RegexString;
  696. MatchRule(std::string const& regex):
  697. Regex(regex.c_str()), RegexString(regex) {}
  698. };
  699. std::vector<MatchRule> MatchRules;
  700. // Get the properties from rules matching this input file.
  701. MatchProperties CollectMatchProperties(const char* file)
  702. {
  703. // Match rules are case-insensitive on some platforms.
  704. #if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__)
  705. std::string lower = cmSystemTools::LowerCase(file);
  706. file = lower.c_str();
  707. #endif
  708. // Collect properties from all matching rules.
  709. MatchProperties result;
  710. for(std::vector<MatchRule>::iterator mr = this->MatchRules.begin();
  711. mr != this->MatchRules.end(); ++mr)
  712. {
  713. if(mr->Regex.find(file))
  714. {
  715. result.Exclude |= mr->Properties.Exclude;
  716. result.Permissions |= mr->Properties.Permissions;
  717. }
  718. }
  719. return result;
  720. }
  721. // Append a file to the installation manifest.
  722. void ManifestAppend(std::string const& file)
  723. {
  724. this->Manifest += ";";
  725. this->Manifest += file.substr(this->DestDirLength);
  726. }
  727. // Translate an argument to a permissions bit.
  728. bool CheckPermissions(std::string const& arg, mode_t& permissions)
  729. {
  730. if(arg == "OWNER_READ") { permissions |= mode_owner_read; }
  731. else if(arg == "OWNER_WRITE") { permissions |= mode_owner_write; }
  732. else if(arg == "OWNER_EXECUTE") { permissions |= mode_owner_execute; }
  733. else if(arg == "GROUP_READ") { permissions |= mode_group_read; }
  734. else if(arg == "GROUP_WRITE") { permissions |= mode_group_write; }
  735. else if(arg == "GROUP_EXECUTE") { permissions |= mode_group_execute; }
  736. else if(arg == "WORLD_READ") { permissions |= mode_world_read; }
  737. else if(arg == "WORLD_WRITE") { permissions |= mode_world_write; }
  738. else if(arg == "WORLD_EXECUTE") { permissions |= mode_world_execute; }
  739. else if(arg == "SETUID") { permissions |= mode_setuid; }
  740. else if(arg == "SETGID") { permissions |= mode_setgid; }
  741. else
  742. {
  743. cmOStringStream e;
  744. e << "INSTALL given invalid permission \"" << arg << "\".";
  745. this->FileCommand->SetError(e.str().c_str());
  746. return false;
  747. }
  748. return true;
  749. }
  750. private:
  751. bool InstallSymlink(const char* fromFile, const char* toFile, bool always);
  752. };
  753. //----------------------------------------------------------------------------
  754. bool cmFileInstaller::InstallSymlink(const char* fromFile, const char* toFile,
  755. bool always)
  756. {
  757. // Read the original symlink.
  758. std::string symlinkTarget;
  759. if(!cmSystemTools::ReadSymlink(fromFile, symlinkTarget))
  760. {
  761. cmOStringStream e;
  762. e << "INSTALL cannot read symlink \"" << fromFile
  763. << "\" to duplicate at \"" << toFile << "\".";
  764. this->FileCommand->SetError(e.str().c_str());
  765. return false;
  766. }
  767. // Compare the symlink value to that at the destination if not
  768. // always installing.
  769. bool copy = true;
  770. if(!always)
  771. {
  772. std::string oldSymlinkTarget;
  773. if(cmSystemTools::ReadSymlink(toFile, oldSymlinkTarget))
  774. {
  775. if(symlinkTarget == oldSymlinkTarget)
  776. {
  777. copy = false;
  778. }
  779. }
  780. }
  781. // Inform the user about this file installation.
  782. std::string message = (copy? "Installing: " : "Up-to-date: ");
  783. message += toFile;
  784. this->Makefile->DisplayStatus(message.c_str(), -1);
  785. if(copy)
  786. {
  787. // Remove the destination file so we can always create the symlink.
  788. cmSystemTools::RemoveFile(toFile);
  789. // Create the symlink.
  790. if(!cmSystemTools::CreateSymlink(symlinkTarget.c_str(), toFile))
  791. {
  792. cmOStringStream e;
  793. e << "INSTALL cannot duplicate symlink \"" << fromFile
  794. << "\" at \"" << toFile << "\".";
  795. this->FileCommand->SetError(e.str().c_str());
  796. return false;
  797. }
  798. }
  799. // Add the file to the manifest.
  800. this->ManifestAppend(toFile);
  801. return true;
  802. }
  803. //----------------------------------------------------------------------------
  804. bool cmFileInstaller::InstallFile(const char* fromFile, const char* toFile,
  805. bool always)
  806. {
  807. // Collect any properties matching this file name.
  808. MatchProperties match_properties = this->CollectMatchProperties(fromFile);
  809. // Skip the file if it is excluded.
  810. if(match_properties.Exclude)
  811. {
  812. return true;
  813. }
  814. // Short-circuit for symbolic links.
  815. if(cmSystemTools::FileIsSymlink(fromFile))
  816. {
  817. return this->InstallSymlink(fromFile, toFile, always);
  818. }
  819. // Determine whether we will copy the file.
  820. bool copy = true;
  821. if(!always)
  822. {
  823. // If both files exist and "fromFile" is not newer than "toFile"
  824. // do not copy.
  825. int timeResult;
  826. if(this->FileTimes.FileTimeCompare(fromFile, toFile, &timeResult) &&
  827. timeResult <= 0)
  828. {
  829. copy = false;
  830. }
  831. }
  832. // Inform the user about this file installation.
  833. std::string message = (copy? "Installing: " : "Up-to-date: ");
  834. message += toFile;
  835. this->Makefile->DisplayStatus(message.c_str(), -1);
  836. // Copy the file.
  837. if(copy && !cmSystemTools::CopyAFile(fromFile, toFile, true))
  838. {
  839. cmOStringStream e;
  840. e << "INSTALL cannot copy file \"" << fromFile
  841. << "\" to \"" << toFile << "\".";
  842. this->FileCommand->SetError(e.str().c_str());
  843. return false;
  844. }
  845. // Add the file to the manifest.
  846. this->ManifestAppend(toFile);
  847. // Set the file modification time of the destination file.
  848. if(copy && !always)
  849. {
  850. cmSystemTools::CopyFileTime(fromFile, toFile);
  851. }
  852. // Set permissions of the destination file.
  853. mode_t permissions = (match_properties.Permissions?
  854. match_properties.Permissions : this->FilePermissions);
  855. if(!permissions)
  856. {
  857. // No permissions were explicitly provided but the user requested
  858. // that the source file permissions be used.
  859. cmSystemTools::GetPermissions(fromFile, permissions);
  860. }
  861. if(permissions && !cmSystemTools::SetPermissions(toFile, permissions))
  862. {
  863. cmOStringStream e;
  864. e << "Problem setting permissions on file \"" << toFile << "\"";
  865. this->FileCommand->SetError(e.str().c_str());
  866. return false;
  867. }
  868. return true;
  869. }
  870. //----------------------------------------------------------------------------
  871. bool cmFileInstaller::InstallDirectory(const char* source,
  872. const char* destination,
  873. bool always)
  874. {
  875. // Collect any properties matching this directory name.
  876. MatchProperties match_properties = this->CollectMatchProperties(source);
  877. // Skip the directory if it is excluded.
  878. if(match_properties.Exclude)
  879. {
  880. return true;
  881. }
  882. // Short-circuit for symbolic links.
  883. if(cmSystemTools::FileIsSymlink(source))
  884. {
  885. return this->InstallSymlink(source, destination, always);
  886. }
  887. // Inform the user about this directory installation.
  888. std::string message = "Installing: ";
  889. message += destination;
  890. this->Makefile->DisplayStatus(message.c_str(), -1);
  891. // Make sure the destination directory exists.
  892. if(!cmSystemTools::MakeDirectory(destination))
  893. {
  894. return false;
  895. }
  896. // Compute the requested permissions for the destination directory.
  897. mode_t permissions = (match_properties.Permissions?
  898. match_properties.Permissions : this->DirPermissions);
  899. if(!permissions)
  900. {
  901. // No permissions were explicitly provided but the user requested
  902. // that the source directory permissions be used.
  903. cmSystemTools::GetPermissions(source, permissions);
  904. }
  905. // Compute the set of permissions required on this directory to
  906. // recursively install files and subdirectories safely.
  907. mode_t required_permissions =
  908. mode_owner_read | mode_owner_write | mode_owner_execute;
  909. // If the required permissions are specified it is safe to set the
  910. // final permissions now. Otherwise we must add the required
  911. // permissions temporarily during file installation.
  912. mode_t permissions_before = 0;
  913. mode_t permissions_after = 0;
  914. if(permissions & required_permissions)
  915. {
  916. permissions_before = permissions;
  917. }
  918. else
  919. {
  920. permissions_before = permissions | required_permissions;
  921. permissions_after = permissions;
  922. }
  923. // Set the required permissions of the destination directory.
  924. if(permissions_before &&
  925. !cmSystemTools::SetPermissions(destination, permissions_before))
  926. {
  927. cmOStringStream e;
  928. e << "Problem setting permissions on directory \""
  929. << destination << "\"";
  930. this->FileCommand->SetError(e.str().c_str());
  931. return false;
  932. }
  933. // Load the directory contents to traverse it recursively.
  934. cmsys::Directory dir;
  935. if(source && *source)
  936. {
  937. dir.Load(source);
  938. }
  939. unsigned long numFiles = static_cast<unsigned long>(dir.GetNumberOfFiles());
  940. for(unsigned long fileNum = 0; fileNum < numFiles; ++fileNum)
  941. {
  942. if(!(strcmp(dir.GetFile(fileNum), ".") == 0 ||
  943. strcmp(dir.GetFile(fileNum), "..") == 0))
  944. {
  945. cmsys_stl::string fromPath = source;
  946. fromPath += "/";
  947. fromPath += dir.GetFile(fileNum);
  948. if(cmSystemTools::FileIsDirectory(fromPath.c_str()))
  949. {
  950. cmsys_stl::string toDir = destination;
  951. toDir += "/";
  952. toDir += dir.GetFile(fileNum);
  953. if(!this->InstallDirectory(fromPath.c_str(), toDir.c_str(), always))
  954. {
  955. return false;
  956. }
  957. }
  958. else
  959. {
  960. // Install this file.
  961. std::string toFile = destination;
  962. toFile += "/";
  963. toFile += dir.GetFile(fileNum);
  964. if(!this->InstallFile(fromPath.c_str(), toFile.c_str(), always))
  965. {
  966. return false;
  967. }
  968. }
  969. }
  970. }
  971. // Set the requested permissions of the destination directory.
  972. if(permissions_after &&
  973. !cmSystemTools::SetPermissions(destination, permissions_after))
  974. {
  975. cmOStringStream e;
  976. e << "Problem setting permissions on directory \"" << destination << "\"";
  977. this->FileCommand->SetError(e.str().c_str());
  978. return false;
  979. }
  980. return true;
  981. }
  982. //----------------------------------------------------------------------------
  983. void cmFileCommand::HandleInstallPermissions(cmFileInstaller& installer,
  984. mode_t& permissions_file,
  985. mode_t& permissions_dir,
  986. int itype,
  987. bool use_given_permissions_file,
  988. bool use_given_permissions_dir,
  989. bool use_source_permissions) const
  990. {
  991. // Choose a default for shared library permissions.
  992. bool install_so_no_exe = this->Makefile->IsOn("CMAKE_INSTALL_SO_NO_EXE");
  993. // If file permissions were not specified set default permissions
  994. // for this target type.
  995. if(!use_given_permissions_file && !use_source_permissions)
  996. {
  997. switch(itype)
  998. {
  999. case cmTarget::SHARED_LIBRARY:
  1000. case cmTarget::MODULE_LIBRARY:
  1001. if(install_so_no_exe)
  1002. {
  1003. // Use read/write permissions.
  1004. permissions_file = 0;
  1005. permissions_file |= mode_owner_read;
  1006. permissions_file |= mode_owner_write;
  1007. permissions_file |= mode_group_read;
  1008. permissions_file |= mode_world_read;
  1009. break;
  1010. }
  1011. case cmTarget::EXECUTABLE:
  1012. case cmTarget::INSTALL_PROGRAMS:
  1013. // Use read/write/executable permissions.
  1014. permissions_file = 0;
  1015. permissions_file |= mode_owner_read;
  1016. permissions_file |= mode_owner_write;
  1017. permissions_file |= mode_owner_execute;
  1018. permissions_file |= mode_group_read;
  1019. permissions_file |= mode_group_execute;
  1020. permissions_file |= mode_world_read;
  1021. permissions_file |= mode_world_execute;
  1022. break;
  1023. default:
  1024. // Use read/write permissions.
  1025. permissions_file = 0;
  1026. permissions_file |= mode_owner_read;
  1027. permissions_file |= mode_owner_write;
  1028. permissions_file |= mode_group_read;
  1029. permissions_file |= mode_world_read;
  1030. break;
  1031. }
  1032. }
  1033. // If directory permissions were not specified set default permissions.
  1034. if(!use_given_permissions_dir && !use_source_permissions)
  1035. {
  1036. // Use read/write/executable permissions.
  1037. permissions_dir = 0;
  1038. permissions_dir |= mode_owner_read;
  1039. permissions_dir |= mode_owner_write;
  1040. permissions_dir |= mode_owner_execute;
  1041. permissions_dir |= mode_group_read;
  1042. permissions_dir |= mode_group_execute;
  1043. permissions_dir |= mode_world_read;
  1044. permissions_dir |= mode_world_execute;
  1045. }
  1046. // Set the installer permissions.
  1047. installer.FilePermissions = permissions_file;
  1048. installer.DirPermissions = permissions_dir;
  1049. }
  1050. //----------------------------------------------------------------------------
  1051. void cmFileCommand
  1052. ::GetTargetTypeFromString(const std::string& stype, int& itype) const
  1053. {
  1054. if ( stype == "EXECUTABLE" )
  1055. {
  1056. itype = cmTarget::EXECUTABLE;
  1057. }
  1058. else if ( stype == "PROGRAM" )
  1059. {
  1060. itype = cmTarget::INSTALL_PROGRAMS;
  1061. }
  1062. else if ( stype == "STATIC_LIBRARY" )
  1063. {
  1064. itype = cmTarget::STATIC_LIBRARY;
  1065. }
  1066. else if ( stype == "SHARED_LIBRARY" )
  1067. {
  1068. itype = cmTarget::SHARED_LIBRARY;
  1069. }
  1070. else if ( stype == "MODULE" )
  1071. {
  1072. itype = cmTarget::MODULE_LIBRARY;
  1073. }
  1074. else if ( stype == "DIRECTORY" )
  1075. {
  1076. itype = cmTarget::INSTALL_DIRECTORY;
  1077. }
  1078. }
  1079. //----------------------------------------------------------------------------
  1080. bool cmFileCommand::HandleInstallDestination(cmFileInstaller& installer,
  1081. std::string& destination)
  1082. {
  1083. if ( destination.size() < 2 )
  1084. {
  1085. this->SetError("called with inapropriate arguments. "
  1086. "No DESTINATION provided or .");
  1087. return false;
  1088. }
  1089. const char* destdir = cmSystemTools::GetEnv("DESTDIR");
  1090. if ( destdir && *destdir )
  1091. {
  1092. std::string sdestdir = destdir;
  1093. cmSystemTools::ConvertToUnixSlashes(sdestdir);
  1094. char ch1 = destination[0];
  1095. char ch2 = destination[1];
  1096. char ch3 = 0;
  1097. if ( destination.size() > 2 )
  1098. {
  1099. ch3 = destination[2];
  1100. }
  1101. int skip = 0;
  1102. if ( ch1 != '/' )
  1103. {
  1104. int relative = 0;
  1105. if ( ( ch1 >= 'a' && ch1 <= 'z' || ch1 >= 'A' && ch1 <= 'Z' ) &&
  1106. ch2 == ':' )
  1107. {
  1108. // Assume windows
  1109. // let's do some destdir magic:
  1110. skip = 2;
  1111. if ( ch3 != '/' )
  1112. {
  1113. relative = 1;
  1114. }
  1115. }
  1116. else
  1117. {
  1118. relative = 1;
  1119. }
  1120. if ( relative )
  1121. {
  1122. // This is relative path on unix or windows. Since we are doing
  1123. // destdir, this case does not make sense.
  1124. this->SetError("called with relative DESTINATION. This "
  1125. "does not make sense when using DESTDIR. Specify "
  1126. "absolute path or remove DESTDIR environment variable.");
  1127. return false;
  1128. }
  1129. }
  1130. else
  1131. {
  1132. if ( ch2 == '/' )
  1133. {
  1134. // looks like a network path.
  1135. this->SetError("called with network path DESTINATION. This "
  1136. "does not make sense when using DESTDIR. Specify local "
  1137. "absolute path or remove DESTDIR environment variable.");
  1138. return false;
  1139. }
  1140. }
  1141. destination = sdestdir + (destination.c_str() + skip);
  1142. installer.DestDirLength = int(sdestdir.size());
  1143. }
  1144. if ( !cmSystemTools::FileExists(destination.c_str()) )
  1145. {
  1146. if ( !cmSystemTools::MakeDirectory(destination.c_str()) )
  1147. {
  1148. std::string errstring = "cannot create directory: " + destination +
  1149. ". Maybe need administrative privileges.";
  1150. this->SetError(errstring.c_str());
  1151. return false;
  1152. }
  1153. }
  1154. if ( !cmSystemTools::FileIsDirectory(destination.c_str()) )
  1155. {
  1156. std::string errstring = "INSTALL destination: " + destination +
  1157. " is not a directory.";
  1158. this->SetError(errstring.c_str());
  1159. return false;
  1160. }
  1161. return true;
  1162. }
  1163. //----------------------------------------------------------------------------
  1164. bool cmFileCommand::HandleInstallCommand(std::vector<std::string> const& args)
  1165. {
  1166. if ( args.size() < 6 )
  1167. {
  1168. this->SetError("called with incorrect number of arguments");
  1169. return false;
  1170. }
  1171. // Construct a file installer object.
  1172. cmFileInstaller installer(this, this->Makefile);
  1173. std::string rename = "";
  1174. std::string destination = "";
  1175. std::vector<std::string> files;
  1176. int itype = cmTarget::INSTALL_FILES;
  1177. std::map<cmStdString, const char*> properties;
  1178. bool optional = false;
  1179. bool result = this->ParseInstallArgs(args, installer, properties,
  1180. itype, rename, destination, files,
  1181. optional);
  1182. if (result == true)
  1183. {
  1184. result = this->DoInstall(installer,
  1185. itype, rename, destination, files, optional);
  1186. }
  1187. return result;
  1188. }
  1189. //----------------------------------------------------------------------------
  1190. bool cmFileCommand::ParseInstallArgs(std::vector<std::string> const& args,
  1191. cmFileInstaller& installer,
  1192. std::map<cmStdString, const char*>& properties,
  1193. int& itype,
  1194. std::string& rename,
  1195. std::string& destination,
  1196. std::vector<std::string>& files,
  1197. bool& optional)
  1198. {
  1199. std::string stype = "FILES";
  1200. bool doing_files = false;
  1201. bool doing_properties = false;
  1202. bool doing_permissions_file = false;
  1203. bool doing_permissions_dir = false;
  1204. bool doing_permissions_match = false;
  1205. bool use_given_permissions_file = false;
  1206. bool use_given_permissions_dir = false;
  1207. bool use_source_permissions = false;
  1208. mode_t permissions_file = 0;
  1209. mode_t permissions_dir = 0;
  1210. cmFileInstaller::MatchRule* current_match_rule = 0;
  1211. std::vector<std::string>::size_type i = 0;
  1212. i++; // Get rid of subcommand
  1213. for ( ; i != args.size(); ++i )
  1214. {
  1215. const std::string* cstr = &args[i];
  1216. if ( *cstr == "DESTINATION" && i < args.size()-1 )
  1217. {
  1218. if(current_match_rule)
  1219. {
  1220. cmOStringStream e;
  1221. e << "INSTALL does not allow \"" << *cstr << "\" after REGEX.";
  1222. this->SetError(e.str().c_str());
  1223. return false;
  1224. }
  1225. i++;
  1226. destination = args[i];
  1227. doing_files = false;
  1228. doing_properties = false;
  1229. doing_permissions_file = false;
  1230. doing_permissions_dir = false;
  1231. }
  1232. else if ( *cstr == "TYPE" && i < args.size()-1 )
  1233. {
  1234. if(current_match_rule)
  1235. {
  1236. cmOStringStream e;
  1237. e << "INSTALL does not allow \"" << *cstr << "\" after REGEX.";
  1238. this->SetError(e.str().c_str());
  1239. return false;
  1240. }
  1241. i++;
  1242. stype = args[i];
  1243. if ( args[i+1] == "OPTIONAL" )
  1244. {
  1245. i++;
  1246. optional = true;
  1247. }
  1248. doing_properties = false;
  1249. doing_files = false;
  1250. doing_permissions_file = false;
  1251. doing_permissions_dir = false;
  1252. }
  1253. else if ( *cstr == "RENAME" && i < args.size()-1 )
  1254. {
  1255. if(current_match_rule)
  1256. {
  1257. cmOStringStream e;
  1258. e << "INSTALL does not allow \"" << *cstr << "\" after REGEX.";
  1259. this->SetError(e.str().c_str());
  1260. return false;
  1261. }
  1262. i++;
  1263. rename = args[i];
  1264. doing_properties = false;
  1265. doing_files = false;
  1266. doing_permissions_file = false;
  1267. doing_permissions_dir = false;
  1268. }
  1269. else if ( *cstr == "REGEX" && i < args.size()-1 )
  1270. {
  1271. i++;
  1272. installer.MatchRules.push_back(cmFileInstaller::MatchRule(args[i]));
  1273. current_match_rule = &*(installer.MatchRules.end()-1);
  1274. if(!current_match_rule->Regex.is_valid())
  1275. {
  1276. cmOStringStream e;
  1277. e << "INSTALL could not compile REGEX \"" << args[i] << "\".";
  1278. this->SetError(e.str().c_str());
  1279. return false;
  1280. }
  1281. doing_properties = false;
  1282. doing_files = false;
  1283. doing_permissions_file = false;
  1284. doing_permissions_dir = false;
  1285. }
  1286. else if ( *cstr == "EXCLUDE" )
  1287. {
  1288. // Add this property to the current match rule.
  1289. if(!current_match_rule)
  1290. {
  1291. cmOStringStream e;
  1292. e << "INSTALL does not allow \""
  1293. << *cstr << "\" before a REGEX is given.";
  1294. this->SetError(e.str().c_str());
  1295. return false;
  1296. }
  1297. current_match_rule->Properties.Exclude = true;
  1298. doing_permissions_match = true;
  1299. }
  1300. else if ( *cstr == "PROPERTIES" )
  1301. {
  1302. if(current_match_rule)
  1303. {
  1304. cmOStringStream e;
  1305. e << "INSTALL does not allow \"" << *cstr << "\" after REGEX.";
  1306. this->SetError(e.str().c_str());
  1307. return false;
  1308. }
  1309. doing_properties = true;
  1310. doing_files = false;
  1311. doing_permissions_file = false;
  1312. doing_permissions_dir = false;
  1313. }
  1314. else if ( *cstr == "PERMISSIONS" )
  1315. {
  1316. if(current_match_rule)
  1317. {
  1318. doing_permissions_match = true;
  1319. doing_permissions_file = false;
  1320. }
  1321. else
  1322. {
  1323. doing_permissions_match = false;
  1324. doing_permissions_file = true;
  1325. use_given_permissions_file = true;
  1326. }
  1327. doing_properties = false;
  1328. doing_files = false;
  1329. doing_permissions_dir = false;
  1330. }
  1331. else if ( *cstr == "DIR_PERMISSIONS" )
  1332. {
  1333. if(current_match_rule)
  1334. {
  1335. cmOStringStream e;
  1336. e << "INSTALL does not allow \"" << *cstr << "\" after REGEX.";
  1337. this->SetError(e.str().c_str());
  1338. return false;
  1339. }
  1340. use_given_permissions_dir = true;
  1341. doing_properties = false;
  1342. doing_files = false;
  1343. doing_permissions_file = false;
  1344. doing_permissions_dir = true;
  1345. }
  1346. else if ( *cstr == "USE_SOURCE_PERMISSIONS" )
  1347. {
  1348. if(current_match_rule)
  1349. {
  1350. cmOStringStream e;
  1351. e << "INSTALL does not allow \"" << *cstr << "\" after REGEX.";
  1352. this->SetError(e.str().c_str());
  1353. return false;
  1354. }
  1355. doing_properties = false;
  1356. doing_files = false;
  1357. doing_permissions_file = false;
  1358. doing_permissions_dir = false;
  1359. use_source_permissions = true;
  1360. }
  1361. else if ( *cstr == "COMPONENTS" )
  1362. {
  1363. cmOStringStream e;
  1364. e << "INSTALL called with old-style COMPONENTS argument. "
  1365. << "This script was generated with an older version of CMake. "
  1366. << "Re-run this cmake version on your build tree.";
  1367. this->SetError(e.str().c_str());
  1368. return false;
  1369. }
  1370. else if ( *cstr == "CONFIGURATIONS" )
  1371. {
  1372. cmOStringStream e;
  1373. e << "INSTALL called with old-style CONFIGURATIONS argument. "
  1374. << "This script was generated with an older version of CMake. "
  1375. << "Re-run this cmake version on your build tree.";
  1376. this->SetError(e.str().c_str());
  1377. return false;
  1378. }
  1379. else if ( *cstr == "FILES" && !doing_files)
  1380. {
  1381. if(current_match_rule)
  1382. {
  1383. cmOStringStream e;
  1384. e << "INSTALL does not allow \"" << *cstr << "\" after REGEX.";
  1385. this->SetError(e.str().c_str());
  1386. return false;
  1387. }
  1388. doing_files = true;
  1389. doing_properties = false;
  1390. doing_permissions_file = false;
  1391. doing_permissions_dir = false;
  1392. }
  1393. else if ( doing_properties && i < args.size()-1 )
  1394. {
  1395. properties[args[i]] = args[i+1].c_str();
  1396. i++;
  1397. }
  1398. else if ( doing_files )
  1399. {
  1400. files.push_back(*cstr);
  1401. }
  1402. else if(doing_permissions_file)
  1403. {
  1404. if(!installer.CheckPermissions(args[i], permissions_file))
  1405. {
  1406. return false;
  1407. }
  1408. }
  1409. else if(doing_permissions_dir)
  1410. {
  1411. if(!installer.CheckPermissions(args[i], permissions_dir))
  1412. {
  1413. return false;
  1414. }
  1415. }
  1416. else if(doing_permissions_match)
  1417. {
  1418. if(!installer.CheckPermissions(
  1419. args[i], current_match_rule->Properties.Permissions))
  1420. {
  1421. return false;
  1422. }
  1423. }
  1424. else
  1425. {
  1426. this->SetError("called with inappropriate arguments");
  1427. return false;
  1428. }
  1429. }
  1430. // now check and postprocess what has been parsed
  1431. if ( files.size() == 0 )
  1432. {
  1433. this->SetError(
  1434. "called with inapropriate arguments. No FILES provided.");
  1435. return false;
  1436. }
  1437. // Check rename form.
  1438. if(!rename.empty())
  1439. {
  1440. if(itype != cmTarget::INSTALL_FILES &&
  1441. itype != cmTarget::INSTALL_PROGRAMS)
  1442. {
  1443. this->SetError("INSTALL option RENAME may be used only with "
  1444. "FILES or PROGRAMS.");
  1445. return false;
  1446. }
  1447. if(files.size() > 1)
  1448. {
  1449. this->SetError("INSTALL option RENAME may be used only with "
  1450. "one file.");
  1451. return false;
  1452. }
  1453. }
  1454. if (this->HandleInstallDestination(installer, destination) == false)
  1455. {
  1456. return false;
  1457. }
  1458. if(properties.find("VERSION") != properties.end())
  1459. {
  1460. cmOStringStream e;
  1461. e << "INSTALL called with old-style VERSION property. "
  1462. << "This script was generated with an older version of CMake. "
  1463. << "Re-run this cmake version on your build tree.";
  1464. this->SetError(e.str().c_str());
  1465. return false;
  1466. }
  1467. if(properties.find("SOVERSION") != properties.end())
  1468. {
  1469. cmOStringStream e;
  1470. e << "INSTALL called with old-style SOVERSION property. "
  1471. << "This script was generated with an older version of CMake. "
  1472. << "Re-run this cmake version on your build tree.";
  1473. this->SetError(e.str().c_str());
  1474. return false;
  1475. }
  1476. this->GetTargetTypeFromString(stype, itype);
  1477. this->HandleInstallPermissions(installer,
  1478. permissions_file,
  1479. permissions_dir,
  1480. itype,
  1481. use_given_permissions_file,
  1482. use_given_permissions_dir,
  1483. use_source_permissions);
  1484. return true;
  1485. }
  1486. //----------------------------------------------------------------------------
  1487. bool cmFileCommand::DoInstall( cmFileInstaller& installer,
  1488. const int itype,
  1489. const std::string& rename,
  1490. const std::string& destination,
  1491. const std::vector<std::string>& files,
  1492. const bool optional)
  1493. {
  1494. typedef std::set<cmStdString>::const_iterator iter_type;
  1495. // Check whether files should be copied always or only if they have
  1496. // changed.
  1497. bool copy_always =
  1498. cmSystemTools::IsOn(cmSystemTools::GetEnv("CMAKE_INSTALL_ALWAYS"));
  1499. // Handle each file listed.
  1500. for (std::vector<std::string>::size_type i = 0; i < files.size(); i ++ )
  1501. {
  1502. // Split the input file into its directory and name components.
  1503. std::vector<std::string> fromPathComponents;
  1504. cmSystemTools::SplitPath(files[i].c_str(), fromPathComponents);
  1505. std::string fromName = *(fromPathComponents.end()-1);
  1506. std::string fromDir = cmSystemTools::JoinPath(fromPathComponents.begin(),
  1507. fromPathComponents.end()-1);
  1508. // Compute the full path to the destination file.
  1509. std::string toFile = destination;
  1510. std::string const& toName = rename.empty()? fromName : rename;
  1511. if(!toName.empty())
  1512. {
  1513. toFile += "/";
  1514. toFile += toName;
  1515. }
  1516. // Construct the full path to the source file. The file name may
  1517. // have been changed above.
  1518. std::string fromFile = fromDir;
  1519. if(!fromName.empty())
  1520. {
  1521. fromFile += "/";
  1522. fromFile += fromName;
  1523. }
  1524. std::string message;
  1525. if(!cmSystemTools::SameFile(fromFile.c_str(), toFile.c_str()))
  1526. {
  1527. if(itype == cmTarget::INSTALL_DIRECTORY &&
  1528. (fromFile.empty() ||
  1529. cmSystemTools::FileIsDirectory(fromFile.c_str())))
  1530. {
  1531. // Try installing this directory.
  1532. if(!installer.InstallDirectory(fromFile.c_str(), toFile.c_str(),
  1533. copy_always))
  1534. {
  1535. return false;
  1536. }
  1537. }
  1538. else if(cmSystemTools::FileExists(fromFile.c_str()))
  1539. {
  1540. // Install this file.
  1541. if(!installer.InstallFile(fromFile.c_str(), toFile.c_str(),
  1542. copy_always))
  1543. {
  1544. return false;
  1545. }
  1546. }
  1547. else if(!optional)
  1548. {
  1549. // The input file does not exist and installation is not optional.
  1550. cmOStringStream e;
  1551. e << "INSTALL cannot find file \"" << fromFile << "\" to install.";
  1552. this->SetError(e.str().c_str());
  1553. return false;
  1554. }
  1555. }
  1556. }
  1557. return true;
  1558. }
  1559. //----------------------------------------------------------------------------
  1560. bool cmFileCommand::HandleRelativePathCommand(
  1561. std::vector<std::string> const& args)
  1562. {
  1563. if(args.size() != 4 )
  1564. {
  1565. this->SetError("called with incorrect number of arguments");
  1566. return false;
  1567. }
  1568. const std::string& outVar = args[1];
  1569. const std::string& directoryName = args[2];
  1570. const std::string& fileName = args[3];
  1571. if(!cmSystemTools::FileIsFullPath(directoryName.c_str()))
  1572. {
  1573. std::string errstring =
  1574. "RelativePath must be passed a full path to the directory: "
  1575. + directoryName;
  1576. this->SetError(errstring.c_str());
  1577. return false;
  1578. }
  1579. if(!cmSystemTools::FileIsFullPath(fileName.c_str()))
  1580. {
  1581. std::string errstring =
  1582. "RelativePath must be passed a full path to the file: "
  1583. + fileName;
  1584. this->SetError(errstring.c_str());
  1585. return false;
  1586. }
  1587. std::string res = cmSystemTools::RelativePath(directoryName.c_str(),
  1588. fileName.c_str());
  1589. this->Makefile->AddDefinition(outVar.c_str(),
  1590. res.c_str());
  1591. return true;
  1592. }
  1593. //----------------------------------------------------------------------------
  1594. bool cmFileCommand::HandleRemove(std::vector<std::string> const& args,
  1595. bool recurse)
  1596. {
  1597. std::string message;
  1598. std::vector<std::string>::const_iterator i = args.begin();
  1599. i++; // Get rid of subcommand
  1600. for(;i != args.end(); ++i)
  1601. {
  1602. if(cmSystemTools::FileIsDirectory(i->c_str()) && recurse)
  1603. {
  1604. cmSystemTools::RemoveADirectory(i->c_str());
  1605. }
  1606. else
  1607. {
  1608. cmSystemTools::RemoveFile(i->c_str());
  1609. }
  1610. }
  1611. return true;
  1612. }
  1613. //----------------------------------------------------------------------------
  1614. bool cmFileCommand::HandleCMakePathCommand(std::vector<std::string>
  1615. const& args,
  1616. bool nativePath)
  1617. {
  1618. std::vector<std::string>::const_iterator i = args.begin();
  1619. if(args.size() != 3)
  1620. {
  1621. this->SetError("FILE(SYSTEM_PATH ENV result) must be called with "
  1622. "only three arguments.");
  1623. return false;
  1624. }
  1625. i++; // Get rid of subcommand
  1626. #if defined(_WIN32) && !defined(__CYGWIN__)
  1627. char pathSep = ';';
  1628. #else
  1629. char pathSep = ':';
  1630. #endif
  1631. std::vector<cmsys::String> path = cmSystemTools::SplitString(i->c_str(),
  1632. pathSep);
  1633. i++;
  1634. const char* var = i->c_str();
  1635. std::string value;
  1636. for(std::vector<cmsys::String>::iterator j = path.begin();
  1637. j != path.end(); ++j)
  1638. {
  1639. if(j != path.begin())
  1640. {
  1641. value += ";";
  1642. }
  1643. if(!nativePath)
  1644. {
  1645. cmSystemTools::ConvertToUnixSlashes(*j);
  1646. }
  1647. else
  1648. {
  1649. *j = cmSystemTools::ConvertToOutputPath(j->c_str());
  1650. // remove double quotes in the path
  1651. cmsys::String& s = *j;
  1652. if(s.size() > 1 && s[0] == '\"' && s[s.size()-1] == '\"')
  1653. {
  1654. s = s.substr(1,s.size()-2);
  1655. }
  1656. }
  1657. value += *j;
  1658. }
  1659. this->Makefile->AddDefinition(var, value.c_str());
  1660. return true;
  1661. }