CMake 2.8.1-rc3
This commit is contained in:
parent
5f926016a9
commit
f195a131cc
@ -329,7 +329,7 @@ ENDMACRO (CMAKE_BUILD_UTILITIES)
|
|||||||
SET(CMake_VERSION_MAJOR 2)
|
SET(CMake_VERSION_MAJOR 2)
|
||||||
SET(CMake_VERSION_MINOR 8)
|
SET(CMake_VERSION_MINOR 8)
|
||||||
SET(CMake_VERSION_PATCH 1)
|
SET(CMake_VERSION_PATCH 1)
|
||||||
SET(CMake_VERSION_RC 2)
|
SET(CMake_VERSION_RC 3)
|
||||||
|
|
||||||
# We use odd minor numbers for development versions.
|
# We use odd minor numbers for development versions.
|
||||||
# Use a date for the development patch level.
|
# Use a date for the development patch level.
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Changes in CMake 2.8.1 RC 3
|
||||||
|
- Add CMAKE_XCODE_ATTRIBUTE_<attr> interface to set compiler (#9125)
|
||||||
|
- Fix Eclipse files for targets in subdirectories (#9978)
|
||||||
|
- Fix custom command rule hashes to avoid extra rebuilds
|
||||||
|
- Print non-make generator name in initial compiler test
|
||||||
|
|
||||||
Changes in CMake 2.8.1 RC 2
|
Changes in CMake 2.8.1 RC 2
|
||||||
- CPack: Avoid deleting long PATH values with NSIS (#10257)
|
- CPack: Avoid deleting long PATH values with NSIS (#10257)
|
||||||
- CTest: Fix and test cost-based test scheduler
|
- CTest: Fix and test cost-based test scheduler
|
||||||
|
@ -12,13 +12,15 @@
|
|||||||
# (To distributed this file outside of CMake, substitute the full
|
# (To distributed this file outside of CMake, substitute the full
|
||||||
# License text for the above reference.)
|
# License text for the above reference.)
|
||||||
|
|
||||||
|
INCLUDE(CMakeTestCompilerCommon)
|
||||||
|
|
||||||
# This file is used by EnableLanguage in cmGlobalGenerator to
|
# This file is used by EnableLanguage in cmGlobalGenerator to
|
||||||
# determine that that selected C compiler can actually compile
|
# determine that that selected C compiler can actually compile
|
||||||
# and link the most basic of programs. If not, a fatal error
|
# and link the most basic of programs. If not, a fatal error
|
||||||
# is set and cmake stops processing commands and will not generate
|
# is set and cmake stops processing commands and will not generate
|
||||||
# any makefiles or projects.
|
# any makefiles or projects.
|
||||||
IF(NOT CMAKE_C_COMPILER_WORKS)
|
IF(NOT CMAKE_C_COMPILER_WORKS)
|
||||||
MESSAGE(STATUS "Check for working C compiler: ${CMAKE_C_COMPILER}")
|
PrintTestCompilerStatus("C" "")
|
||||||
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c
|
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c
|
||||||
"#ifdef __cplusplus\n"
|
"#ifdef __cplusplus\n"
|
||||||
"# error \"The CMAKE_C_COMPILER is set to a C++ compiler\"\n"
|
"# error \"The CMAKE_C_COMPILER is set to a C++ compiler\"\n"
|
||||||
@ -38,7 +40,7 @@ IF(NOT CMAKE_C_COMPILER_WORKS)
|
|||||||
ENDIF(NOT CMAKE_C_COMPILER_WORKS)
|
ENDIF(NOT CMAKE_C_COMPILER_WORKS)
|
||||||
|
|
||||||
IF(NOT CMAKE_C_COMPILER_WORKS)
|
IF(NOT CMAKE_C_COMPILER_WORKS)
|
||||||
MESSAGE(STATUS "Check for working C compiler: ${CMAKE_C_COMPILER} -- broken")
|
PrintTestCompilerStatus("C" " -- broken")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
"Determining if the C compiler works failed with "
|
"Determining if the C compiler works failed with "
|
||||||
"the following output:\n${OUTPUT}\n\n")
|
"the following output:\n${OUTPUT}\n\n")
|
||||||
@ -53,7 +55,7 @@ IF(NOT CMAKE_C_COMPILER_WORKS)
|
|||||||
"CMake will not be able to correctly generate this project.")
|
"CMake will not be able to correctly generate this project.")
|
||||||
ELSE(NOT CMAKE_C_COMPILER_WORKS)
|
ELSE(NOT CMAKE_C_COMPILER_WORKS)
|
||||||
IF(C_TEST_WAS_RUN)
|
IF(C_TEST_WAS_RUN)
|
||||||
MESSAGE(STATUS "Check for working C compiler: ${CMAKE_C_COMPILER} -- works")
|
PrintTestCompilerStatus("C" " -- works")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||||
"Determining if the C compiler works passed with "
|
"Determining if the C compiler works passed with "
|
||||||
"the following output:\n${OUTPUT}\n\n")
|
"the following output:\n${OUTPUT}\n\n")
|
||||||
|
@ -12,13 +12,15 @@
|
|||||||
# (To distributed this file outside of CMake, substitute the full
|
# (To distributed this file outside of CMake, substitute the full
|
||||||
# License text for the above reference.)
|
# License text for the above reference.)
|
||||||
|
|
||||||
|
INCLUDE(CMakeTestCompilerCommon)
|
||||||
|
|
||||||
# This file is used by EnableLanguage in cmGlobalGenerator to
|
# This file is used by EnableLanguage in cmGlobalGenerator to
|
||||||
# determine that that selected C++ compiler can actually compile
|
# determine that that selected C++ compiler can actually compile
|
||||||
# and link the most basic of programs. If not, a fatal error
|
# and link the most basic of programs. If not, a fatal error
|
||||||
# is set and cmake stops processing commands and will not generate
|
# is set and cmake stops processing commands and will not generate
|
||||||
# any makefiles or projects.
|
# any makefiles or projects.
|
||||||
IF(NOT CMAKE_CXX_COMPILER_WORKS)
|
IF(NOT CMAKE_CXX_COMPILER_WORKS)
|
||||||
MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER}")
|
PrintTestCompilerStatus("CXX" "")
|
||||||
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx
|
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx
|
||||||
"#ifndef __cplusplus\n"
|
"#ifndef __cplusplus\n"
|
||||||
"# error \"The CMAKE_CXX_COMPILER is set to a C compiler\"\n"
|
"# error \"The CMAKE_CXX_COMPILER is set to a C compiler\"\n"
|
||||||
@ -31,7 +33,7 @@ IF(NOT CMAKE_CXX_COMPILER_WORKS)
|
|||||||
ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)
|
ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)
|
||||||
|
|
||||||
IF(NOT CMAKE_CXX_COMPILER_WORKS)
|
IF(NOT CMAKE_CXX_COMPILER_WORKS)
|
||||||
MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER} -- broken")
|
PrintTestCompilerStatus("CXX" " -- broken")
|
||||||
# if the compiler is broken make sure to remove the platform file
|
# if the compiler is broken make sure to remove the platform file
|
||||||
# since Windows-cl configures both c/cxx files both need to be removed
|
# since Windows-cl configures both c/cxx files both need to be removed
|
||||||
# when c or c++ fails
|
# when c or c++ fails
|
||||||
@ -46,7 +48,7 @@ IF(NOT CMAKE_CXX_COMPILER_WORKS)
|
|||||||
"CMake will not be able to correctly generate this project.")
|
"CMake will not be able to correctly generate this project.")
|
||||||
ELSE(NOT CMAKE_CXX_COMPILER_WORKS)
|
ELSE(NOT CMAKE_CXX_COMPILER_WORKS)
|
||||||
IF(CXX_TEST_WAS_RUN)
|
IF(CXX_TEST_WAS_RUN)
|
||||||
MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER} -- works")
|
PrintTestCompilerStatus("CXX" " -- works")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||||
"Determining if the CXX compiler works passed with "
|
"Determining if the CXX compiler works passed with "
|
||||||
"the following output:\n${OUTPUT}\n\n")
|
"the following output:\n${OUTPUT}\n\n")
|
||||||
|
21
Modules/CMakeTestCompilerCommon.cmake
Normal file
21
Modules/CMakeTestCompilerCommon.cmake
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Copyright 2010 Kitware, Inc.
|
||||||
|
#
|
||||||
|
# Distributed under the OSI-approved BSD License (the "License");
|
||||||
|
# see accompanying file Copyright.txt for details.
|
||||||
|
#
|
||||||
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||||
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
# See the License for more information.
|
||||||
|
#=============================================================================
|
||||||
|
# (To distributed this file outside of CMake, substitute the full
|
||||||
|
# License text for the above reference.)
|
||||||
|
|
||||||
|
function(PrintTestCompilerStatus LANG MSG)
|
||||||
|
IF(CMAKE_GENERATOR MATCHES Make)
|
||||||
|
MESSAGE(STATUS "Check for working ${LANG} compiler: ${CMAKE_${LANG}_COMPILER}${MSG}")
|
||||||
|
ELSE()
|
||||||
|
MESSAGE(STATUS "Check for working ${LANG} compiler using: ${CMAKE_GENERATOR}${MSG}")
|
||||||
|
ENDIF()
|
||||||
|
endfunction()
|
@ -12,13 +12,15 @@
|
|||||||
# (To distributed this file outside of CMake, substitute the full
|
# (To distributed this file outside of CMake, substitute the full
|
||||||
# License text for the above reference.)
|
# License text for the above reference.)
|
||||||
|
|
||||||
|
INCLUDE(CMakeTestCompilerCommon)
|
||||||
|
|
||||||
# This file is used by EnableLanguage in cmGlobalGenerator to
|
# This file is used by EnableLanguage in cmGlobalGenerator to
|
||||||
# determine that that selected Fortran compiler can actually compile
|
# determine that that selected Fortran compiler can actually compile
|
||||||
# and link the most basic of programs. If not, a fatal error
|
# and link the most basic of programs. If not, a fatal error
|
||||||
# is set and cmake stops processing commands and will not generate
|
# is set and cmake stops processing commands and will not generate
|
||||||
# any makefiles or projects.
|
# any makefiles or projects.
|
||||||
IF(NOT CMAKE_Fortran_COMPILER_WORKS)
|
IF(NOT CMAKE_Fortran_COMPILER_WORKS)
|
||||||
MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_Fortran_COMPILER}")
|
PrintTestCompilerStatus("Fortran" "")
|
||||||
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f "
|
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f "
|
||||||
PROGRAM TESTFortran
|
PROGRAM TESTFortran
|
||||||
PRINT *, 'Hello'
|
PRINT *, 'Hello'
|
||||||
@ -31,7 +33,7 @@ IF(NOT CMAKE_Fortran_COMPILER_WORKS)
|
|||||||
ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS)
|
ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS)
|
||||||
|
|
||||||
IF(NOT CMAKE_Fortran_COMPILER_WORKS)
|
IF(NOT CMAKE_Fortran_COMPILER_WORKS)
|
||||||
MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_Fortran_COMPILER} -- broken")
|
PrintTestCompilerStatus("Fortran" " -- broken")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
"Determining if the Fortran compiler works failed with "
|
"Determining if the Fortran compiler works failed with "
|
||||||
"the following output:\n${OUTPUT}\n\n")
|
"the following output:\n${OUTPUT}\n\n")
|
||||||
@ -41,7 +43,7 @@ IF(NOT CMAKE_Fortran_COMPILER_WORKS)
|
|||||||
"CMake will not be able to correctly generate this project.")
|
"CMake will not be able to correctly generate this project.")
|
||||||
ELSE(NOT CMAKE_Fortran_COMPILER_WORKS)
|
ELSE(NOT CMAKE_Fortran_COMPILER_WORKS)
|
||||||
IF(FORTRAN_TEST_WAS_RUN)
|
IF(FORTRAN_TEST_WAS_RUN)
|
||||||
MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_Fortran_COMPILER} -- works")
|
PrintTestCompilerStatus("Fortran" " -- works")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||||
"Determining if the Fortran compiler works passed with "
|
"Determining if the Fortran compiler works passed with "
|
||||||
"the following output:\n${OUTPUT}\n\n")
|
"the following output:\n${OUTPUT}\n\n")
|
||||||
|
@ -43,9 +43,9 @@ void cmExtraEclipseCDT4Generator
|
|||||||
entry.Name = this->GetName();
|
entry.Name = this->GetName();
|
||||||
entry.Brief = "Generates Eclipse CDT 4.0 project files.";
|
entry.Brief = "Generates Eclipse CDT 4.0 project files.";
|
||||||
entry.Full =
|
entry.Full =
|
||||||
"Project files for Eclipse will be created in the top directory "
|
"Project files for Eclipse will be created in the top directory. "
|
||||||
"and will have a linked resource to every subdirectory which "
|
"In out of source builds, a linked resource to the top level source "
|
||||||
"features a CMakeLists.txt file containing a PROJECT() call."
|
"directory will be created."
|
||||||
"Additionally a hierarchy of makefiles is generated into the "
|
"Additionally a hierarchy of makefiles is generated into the "
|
||||||
"build tree. The appropriate make program can build the project through "
|
"build tree. The appropriate make program can build the project through "
|
||||||
"the default make target. A \"make install\" target is also provided.";
|
"the default make target. A \"make install\" target is also provided.";
|
||||||
@ -392,24 +392,24 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
|
|||||||
if (this->IsOutOfSourceBuild)
|
if (this->IsOutOfSourceBuild)
|
||||||
{
|
{
|
||||||
fout << "\t<linkedResources>\n";
|
fout << "\t<linkedResources>\n";
|
||||||
// for each sub project create a linked resource to the source dir
|
// create a linked resource to CMAKE_SOURCE_DIR
|
||||||
// - only if it is an out-of-source build
|
// (this is not done anymore for each project because of
|
||||||
for (std::map<cmStdString, std::vector<cmLocalGenerator*> >::const_iterator
|
// http://public.kitware.com/Bug/view.php?id=9978 and because I found it
|
||||||
it = this->GlobalGenerator->GetProjectMap().begin();
|
// actually quite confusing in bigger projects with many directories and
|
||||||
it != this->GlobalGenerator->GetProjectMap().end();
|
// projects, Alex
|
||||||
++it)
|
|
||||||
{
|
std::string sourceLinkedResourceName = "[Source directory]";
|
||||||
std::string linkSourceDirectory = this->GetEclipsePath(
|
std::string linkSourceDirectory = this->GetEclipsePath(
|
||||||
it->second[0]->GetMakefile()->GetStartDirectory());
|
mf->GetStartDirectory());
|
||||||
// .project dir can't be subdir of a linked resource dir
|
// .project dir can't be subdir of a linked resource dir
|
||||||
if (!cmSystemTools::IsSubDirectory(this->HomeOutputDirectory.c_str(),
|
if (!cmSystemTools::IsSubDirectory(this->HomeOutputDirectory.c_str(),
|
||||||
linkSourceDirectory.c_str()))
|
linkSourceDirectory.c_str()))
|
||||||
{
|
{
|
||||||
this->AppendLinkedResource(fout, it->first,
|
this->AppendLinkedResource(fout, sourceLinkedResourceName,
|
||||||
this->GetEclipsePath(linkSourceDirectory));
|
this->GetEclipsePath(linkSourceDirectory));
|
||||||
this->SrcLinkedResources.push_back(it->first);
|
this->SrcLinkedResources.push_back(sourceLinkedResourceName);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// for EXECUTABLE_OUTPUT_PATH when not in binary dir
|
// for EXECUTABLE_OUTPUT_PATH when not in binary dir
|
||||||
this->AppendOutLinkedResource(fout,
|
this->AppendOutLinkedResource(fout,
|
||||||
mf->GetSafeDefinition("CMAKE_RUNTIME_OUTPUT_DIRECTORY"),
|
mf->GetSafeDefinition("CMAKE_RUNTIME_OUTPUT_DIRECTORY"),
|
||||||
|
@ -2758,6 +2758,22 @@ void cmGlobalXCodeGenerator
|
|||||||
this->CreateString(deploymentTarget));
|
this->CreateString(deploymentTarget));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Put this last so it can override existing settings
|
||||||
|
// Convert "CMAKE_XCODE_ATTRIBUTE_*" variables directly.
|
||||||
|
{
|
||||||
|
std::vector<std::string> vars = this->CurrentMakefile->GetDefinitions();
|
||||||
|
for(std::vector<std::string>::const_iterator i = vars.begin();
|
||||||
|
i != vars.end(); ++i)
|
||||||
|
{
|
||||||
|
if(i->find("CMAKE_XCODE_ATTRIBUTE_") == 0)
|
||||||
|
{
|
||||||
|
buildSettings->AddAttribute(i->substr(22).c_str(),
|
||||||
|
this->CreateString(
|
||||||
|
this->CurrentMakefile->GetDefinition(i->c_str())));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::string symroot = root->GetMakefile()->GetCurrentOutputDirectory();
|
std::string symroot = root->GetMakefile()->GetCurrentOutputDirectory();
|
||||||
symroot += "/build";
|
symroot += "/build";
|
||||||
buildSettings->AddAttribute("SYMROOT", this->CreateString(symroot.c_str()));
|
buildSettings->AddAttribute("SYMROOT", this->CreateString(symroot.c_str()));
|
||||||
|
@ -177,7 +177,7 @@ MACRO(KWSYS_PLATFORM_INFO_TEST lang var description)
|
|||||||
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/${var}.bin)
|
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/${var}.bin)
|
||||||
|
|
||||||
# Compile the test binary.
|
# Compile the test binary.
|
||||||
IF(NOT DEFINED ${var}_COMPILED)
|
IF(NOT EXISTS ${KWSYS_PLATFORM_INFO_FILE})
|
||||||
MESSAGE(STATUS "${description}")
|
MESSAGE(STATUS "${description}")
|
||||||
TRY_COMPILE(${var}_COMPILED
|
TRY_COMPILE(${var}_COMPILED
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user