summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CMakeDetermineVSServicePack.cmake140
-rw-r--r--Modules/FindArmadillo.cmake9
-rw-r--r--Modules/FindBoost.cmake9
-rw-r--r--Modules/FindJNI.cmake1
-rw-r--r--Modules/FindSWIG.cmake2
-rw-r--r--Source/cmComputeLinkDepends.cxx2
-rw-r--r--Source/cmFindLibraryCommand.cxx5
-rw-r--r--Source/cmTarget.cxx2
-rw-r--r--Source/kwsys/Terminal.c1
-rw-r--r--Source/kwsys/kwsysDateStamp.cmake2
10 files changed, 131 insertions, 42 deletions
diff --git a/Modules/CMakeDetermineVSServicePack.cmake b/Modules/CMakeDetermineVSServicePack.cmake
index a877e6e..33f0141 100644
--- a/Modules/CMakeDetermineVSServicePack.cmake
+++ b/Modules/CMakeDetermineVSServicePack.cmake
@@ -7,6 +7,8 @@
# vc80sp1
# vc90
# vc90sp1
+# vc100
+# vc100sp1
#
# Usage:
# ===========================
@@ -23,8 +25,9 @@
# ===========================
#=============================================================================
-# Copyright 2009-2010 Kitware, Inc.
+# Copyright 2009-2011 Kitware, Inc.
# Copyright 2009-2010 Philip Lowman <philip@yhbt.com>
+# Copyright 2010-2011 Aaron C. meadows <cmake@shadowguarddev.com>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -49,43 +52,130 @@ function(_DetermineVSServicePackFromCompiler _OUT_VAR _cl_version)
set(_version "vc90sp1")
elseif(${_cl_version} VERSION_EQUAL "16.00.30319.01")
set(_version "vc100")
+ elseif(${_cl_version} VERSION_EQUAL "16.00.40219.01")
+ set(_version "vc100sp1")
else()
set(_version "")
endif()
set(${_OUT_VAR} ${_version} PARENT_SCOPE)
endfunction()
+
+############################################################
+# [INTERNAL]
+# Please do not call this function directly
+function(_DetermineVSServicePack_FastCheckVersionWithCompiler _SUCCESS_VAR _VERSION_VAR)
+ if(EXISTS ${CMAKE_CXX_COMPILER})
+ execute_process(
+ COMMAND ${CMAKE_CXX_COMPILER} /?
+ ERROR_VARIABLE _output
+ OUTPUT_QUIET
+ )
+
+ string(REGEX MATCH "Compiler Version [0-9]+.[0-9]+.[0-9]+.[0-9]+"
+ _cl_version "${_output}")
+
+ if(_cl_version)
+ string(REGEX MATCHALL "[0-9]+"
+ _cl_version_list "${_cl_version}")
+ list(GET _cl_version_list 0 _major)
+ list(GET _cl_version_list 1 _minor)
+ list(GET _cl_version_list 2 _patch)
+ list(GET _cl_version_list 3 _tweak)
+
+ if("${_major}${_minor}" STREQUAL "${MSVC_VERSION}")
+ set(_cl_version ${_major}.${_minor}.${_patch}.${_tweak})
+ else()
+ unset(_cl_version)
+ endif()
+ endif()
+
+ if(_cl_version)
+ set(${_SUCCESS_VAR} true PARENT_SCOPE)
+ set(${_VERSION_VAR} ${_cl_version} PARENT_SCOPE)
+ endif()
+ endif()
+endfunction()
+
+############################################################
+# [INTERNAL]
+# Please do not call this function directly
+function(_DetermineVSServicePack_CheckVersionWithTryCompile _SUCCESS_VAR _VERSION_VAR)
+ file(WRITE "${CMAKE_BINARY_DIR}/return0.cc"
+ "int main() { return 0; }\n")
+
+ try_compile(
+ _CompileResult
+ "${CMAKE_BINARY_DIR}"
+ "${CMAKE_BINARY_DIR}/return0.cc"
+ OUTPUT_VARIABLE _output
+ COPY_FILE "${CMAKE_BINARY_DIR}/return0.cc")
+
+ file(REMOVE "${CMAKE_BINARY_DIR}/return0.cc")
+
+ string(REGEX MATCH "Compiler Version [0-9]+.[0-9]+.[0-9]+.[0-9]+"
+ _cl_version "${_output}")
+
+ if(_cl_version)
+ string(REGEX MATCHALL "[0-9]+"
+ _cl_version_list "${_cl_version}")
+
+ list(GET _cl_version_list 0 _major)
+ list(GET _cl_version_list 1 _minor)
+ list(GET _cl_version_list 2 _patch)
+ list(GET _cl_version_list 3 _tweak)
+
+ set(${_SUCCESS_VAR} true PARENT_SCOPE)
+ set(${_VERSION_VAR} ${_major}.${_minor}.${_patch}.${_tweak} PARENT_SCOPE)
+ endif()
+endfunction()
+
+############################################################
+# [INTERNAL]
+# Please do not call this function directly
+function(_DetermineVSServicePack_CheckVersionWithTryRun _SUCCESS_VAR _VERSION_VAR)
+ file(WRITE "${CMAKE_BINARY_DIR}/return0.cc"
+ "#include <stdio.h>\n\nconst unsigned int CompilerVersion=_MSC_FULL_VER;\n\nint main(int argc, char* argv[])\n{\n int M( CompilerVersion/10000000);\n int m((CompilerVersion%10000000)/100000);\n int b(CompilerVersion%100000);\n\n printf(\"%d.%02d.%05d.01\",M,m,b);\n return 0;\n}\n")
+
+ try_run(
+ _RunResult
+ _CompileResult
+ "${CMAKE_BINARY_DIR}"
+ "${CMAKE_BINARY_DIR}/return0.cc"
+ RUN_OUTPUT_VARIABLE _runoutput
+ )
+
+ file(REMOVE "${CMAKE_BINARY_DIR}/return0.cc")
+
+ string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+.[0-9]+"
+ _cl_version "${_runoutput}")
+
+ if(_cl_version)
+ set(${_SUCCESS_VAR} true PARENT_SCOPE)
+ set(${_VERSION_VAR} ${_cl_version} PARENT_SCOPE)
+ endif()
+endfunction()
+
+
#
# A function to call to determine the Visual Studio service pack
# in use. See documentation above.
function(DetermineVSServicePack _pack)
if(NOT DETERMINED_VS_SERVICE_PACK OR NOT ${_pack})
- file(WRITE "${CMAKE_BINARY_DIR}/return0.cc"
- "int main() { return 0; }\n")
-
- try_compile(DETERMINED_VS_SERVICE_PACK
- "${CMAKE_BINARY_DIR}"
- "${CMAKE_BINARY_DIR}/return0.cc"
- OUTPUT_VARIABLE _output
- COPY_FILE "${CMAKE_BINARY_DIR}/return0.cc")
-
- file(REMOVE "${CMAKE_BINARY_DIR}/return0.cc")
-
- if(DETERMINED_VS_SERVICE_PACK AND _output)
- string(REGEX MATCH "Compiler Version [0-9]+.[0-9]+.[0-9]+.[0-9]+"
- _cl_version "${_output}")
+
+ _DetermineVSServicePack_FastCheckVersionWithCompiler(DETERMINED_VS_SERVICE_PACK _cl_version)
+ if(NOT DETERMINED_VS_SERVICE_PACK)
+ _DetermineVSServicePack_CheckVersionWithTryCompile(DETERMINED_VS_SERVICE_PACK _cl_version)
+ if(NOT DETERMINED_VS_SERVICE_PACK)
+ _DetermineVSServicePack_CheckVersionWithTryRun(DETERMINED_VS_SERVICE_PACK _cl_version)
+ endif()
+ endif()
+
+ if(DETERMINED_VS_SERVICE_PACK)
+
if(_cl_version)
- string(REGEX MATCHALL "[0-9]+"
- _cl_version_list "${_cl_version}")
- list(GET _cl_version_list 0 _major)
- list(GET _cl_version_list 1 _minor)
- list(GET _cl_version_list 2 _patch)
- list(GET _cl_version_list 3 _tweak)
-
- set(_cl_version_string ${_major}.${_minor}.${_patch}.${_tweak})
-
# Call helper function to determine VS version
- _DetermineVSServicePackFromCompiler(_sp "${_cl_version_string}")
+ _DetermineVSServicePackFromCompiler(_sp "${_cl_version}")
if(_sp)
set(${_pack} ${_sp} CACHE INTERNAL
"The Visual Studio Release with Service Pack")
diff --git a/Modules/FindArmadillo.cmake b/Modules/FindArmadillo.cmake
index 6df2473..50eb787 100644
--- a/Modules/FindArmadillo.cmake
+++ b/Modules/FindArmadillo.cmake
@@ -1,15 +1,11 @@
# - Find Armadillo
# Find the Armadillo C++ library
#
-#
-# == Using Armadillo: ==
-# find_package(Armadillo RECQUIRED)
+# Using Armadillo:
+# find_package(Armadillo REQUIRED)
# include_directories(${ARMADILLO_INCLUDE_DIRS})
# add_executable(foo foo.cc)
# target_link_libraries(foo ${ARMADILLO_LIBRARIES})
-#
-#=============================================================================
-#
# This module sets the following variables:
# ARMADILLO_FOUND - set to true if the library is found
# ARMADILLO_INCLUDE_DIRS - list of required include directories
@@ -19,7 +15,6 @@
# ARMADILLO_VERSION_PATCH - patch version number
# ARMADILLO_VERSION_STRING - version number as a string (ex: "1.0.4")
# ARMADILLO_VERSION_NAME - name of the version (ex: "Antipodean Antileech")
-#
#=============================================================================
# Copyright 2011 Clement Creusot <creusot@cs.york.ac.uk>
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index f17e599..c3ac424 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -65,7 +65,7 @@
# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1,
# 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0, 1.39, 1.39.0,
# 1.40, 1.40.0, 1.41, 1.41.0, 1.42, 1.42.0, 1.43, 1.43.0, 1.44, 1.44.0,
-# 1.45, 1.45.0, 1.46, 1.46.0
+# 1.45, 1.45.0, 1.46, 1.46.0, 1.46.1
#
# NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should
# add both 1.x and 1.x.0 as shown above. Official Boost include directories
@@ -281,6 +281,12 @@ macro(_Boost_ADJUST_LIB_VARS basename)
set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_DEBUG})
set(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_DEBUG})
endif()
+
+ # If the debug & release library ends up being the same, omit the keywords
+ if(${Boost_${basename}_LIBRARY_RELEASE} STREQUAL ${Boost_${basename}_LIBRARY_DEBUG})
+ set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} )
+ set(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE} )
+ endif()
if(Boost_${basename}_LIBRARY)
set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library")
@@ -386,6 +392,7 @@ else(Boost_FIND_VERSION_EXACT)
# The user has not requested an exact version. Among known
# versions, find those that are acceptable to the user request.
set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
+ "1.46.1"
"1.46.0" "1.46" "1.45.0" "1.45" "1.44.0" "1.44" "1.43.0" "1.43" "1.42.0" "1.42"
"1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37"
"1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0"
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
index 5921101..d49b44a 100644
--- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake
@@ -105,6 +105,7 @@ JAVA_APPEND_LIBRARY_DIRECTORIES(JAVA_AWT_LIBRARY_DIRECTORIES
/usr/local/lib
/usr/lib/jvm/java/lib
/usr/lib/java/jre/lib/{libarch}
+ /usr/lib/jvm/jre/lib/{libarch}
/usr/local/lib/java/jre/lib/{libarch}
/usr/local/share/java/jre/lib/{libarch}
/usr/lib/j2sdk1.4-sun/jre/lib/{libarch}
diff --git a/Modules/FindSWIG.cmake b/Modules/FindSWIG.cmake
index 8c60bcb..2e34eb1 100644
--- a/Modules/FindSWIG.cmake
+++ b/Modules/FindSWIG.cmake
@@ -27,7 +27,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PROGRAM(SWIG_EXECUTABLE swig2.0 swig)
+FIND_PROGRAM(SWIG_EXECUTABLE NAMES swig2.0 swig)
IF(SWIG_EXECUTABLE)
EXECUTE_PROCESS(COMMAND ${SWIG_EXECUTABLE} -swiglib
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index 342c217..1021bf2 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -69,7 +69,7 @@ We can also infer the edge
because *every* time A appears B is seen on its right. We do not know
whether A really needs symbols from B to link, but it *might* so we
must preserve their order. This is the case also for the following
-explict lists:
+explicit lists:
X: A B Y
Y: A B
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx
index 6355a85..2fa2cca 100644
--- a/Source/cmFindLibraryCommand.cxx
+++ b/Source/cmFindLibraryCommand.cxx
@@ -164,11 +164,6 @@ void cmFindLibraryCommand::AddArchitecturePaths(const char* suffix)
void cmFindLibraryCommand::AddLib64Paths()
{
- if(!this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
- GetLanguageEnabled("C"))
- {
- return;
- }
std::string voidsize =
this->Makefile->GetSafeDefinition("CMAKE_SIZEOF_VOID_P");
int size = atoi(voidsize.c_str());
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 7bd5372..52b9072 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -590,7 +590,7 @@ void cmTarget::DefineProperties(cmake *cm)
"For an executable with exports (see the ENABLE_EXPORTS property) "
"no default transitive link dependencies are used. "
"This property replaces the default transitive link dependencies with "
- "an explict list. "
+ "an explicit list. "
"When the target is linked into another target the libraries "
"listed (and recursively their link interface libraries) will be "
"provided to the other target also. "
diff --git a/Source/kwsys/Terminal.c b/Source/kwsys/Terminal.c
index 7a3266f..25832c2 100644
--- a/Source/kwsys/Terminal.c
+++ b/Source/kwsys/Terminal.c
@@ -163,6 +163,7 @@ static const char* kwsysTerminalVT100Names[] =
"rxvt-unicode-256color",
"screen",
"screen-256color",
+ "screen-256color-bce",
"screen-bce",
"screen-w",
"screen.linux",
diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake
index beca75b..06fe745 100644
--- a/Source/kwsys/kwsysDateStamp.cmake
+++ b/Source/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2011)
SET(KWSYS_DATE_STAMP_MONTH 06)
# KWSys version date day component. Format is DD.
-SET(KWSYS_DATE_STAMP_DAY 16)
+SET(KWSYS_DATE_STAMP_DAY 20)