summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/BundleUtilities.cmake42
-rw-r--r--Modules/CMakeASM_NASMInformation.cmake46
-rw-r--r--Modules/CMakeCCompilerId.c.in11
-rw-r--r--Modules/CMakeCInformation.cmake26
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in11
-rw-r--r--Modules/CMakeCXXInformation.cmake26
-rw-r--r--Modules/CMakeDetermineASMCompiler.cmake11
-rw-r--r--Modules/CMakeDetermineASM_NASMCompiler.cmake27
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake35
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake29
-rw-r--r--Modules/CMakeDetermineCompilerABI.cmake21
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake4
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake7
-rw-r--r--Modules/CMakeDetermineRCCompiler.cmake6
-rw-r--r--Modules/CMakeFindEclipseCDT4.cmake6
-rw-r--r--Modules/CMakeFortranCompiler.cmake.in1
-rw-r--r--Modules/CMakeFortranCompilerId.F.in11
-rw-r--r--Modules/CMakeFortranInformation.cmake68
-rw-r--r--Modules/CMakeJavaInformation.cmake18
-rw-r--r--Modules/CMakeParseImplicitLinkInfo.cmake7
-rw-r--r--Modules/CMakePlatformId.h.in6
-rw-r--r--Modules/CMakeRCCompiler.cmake.in2
-rw-r--r--Modules/CMakeTestASM-ATTCompiler.cmake8
-rw-r--r--Modules/CMakeTestASMCompiler.cmake9
-rw-r--r--Modules/CMakeTestASM_MASMCompiler.cmake8
-rw-r--r--Modules/CMakeTestASM_NASMCompiler.cmake23
-rwxr-xr-xModules/CPack.STGZ_Header.sh.in2
-rw-r--r--Modules/CPack.cmake18
-rw-r--r--Modules/CPackRPM.cmake42
-rw-r--r--Modules/CTest.cmake21
-rw-r--r--Modules/CheckCCompilerFlag.cmake5
-rw-r--r--Modules/CheckCSourceCompiles.cmake4
-rw-r--r--Modules/CheckCXXCompilerFlag.cmake3
-rw-r--r--Modules/CheckCXXSourceCompiles.cmake4
-rw-r--r--Modules/CheckFunctionExists.cmake14
-rw-r--r--Modules/CheckSymbolExists.cmake19
-rw-r--r--Modules/Compiler/Cray-C.cmake1
-rw-r--r--Modules/Compiler/Cray-CXX.cmake1
-rw-r--r--Modules/Compiler/Cray-Fortran.cmake4
-rw-r--r--Modules/Compiler/NAG-Fortran.cmake32
-rw-r--r--Modules/Compiler/SCO-C.cmake2
-rw-r--r--Modules/Compiler/SCO-CXX.cmake2
-rw-r--r--Modules/Compiler/SCO.cmake25
-rw-r--r--Modules/ExternalProject.cmake91
-rw-r--r--Modules/FindALSA.cmake2
-rw-r--r--Modules/FindASPELL.cmake2
-rw-r--r--Modules/FindAVIFile.cmake2
-rw-r--r--Modules/FindBISON.cmake17
-rw-r--r--Modules/FindBLAS.cmake48
-rw-r--r--Modules/FindBZip2.cmake2
-rw-r--r--Modules/FindBoost.cmake412
-rw-r--r--Modules/FindBullet.cmake7
-rw-r--r--Modules/FindCUDA.cmake2
-rw-r--r--Modules/FindCURL.cmake2
-rw-r--r--Modules/FindCVS.cmake2
-rw-r--r--Modules/FindCoin3D.cmake2
-rw-r--r--Modules/FindCurses.cmake2
-rw-r--r--Modules/FindCxxTest.cmake9
-rw-r--r--Modules/FindDCMTK.cmake2
-rw-r--r--Modules/FindDart.cmake2
-rw-r--r--Modules/FindDevIL.cmake2
-rw-r--r--Modules/FindDoxygen.cmake2
-rw-r--r--Modules/FindEXPAT.cmake2
-rw-r--r--Modules/FindFLEX.cmake6
-rw-r--r--Modules/FindFLTK.cmake2
-rw-r--r--Modules/FindFreetype.cmake2
-rw-r--r--Modules/FindGDAL.cmake2
-rw-r--r--Modules/FindGIF.cmake2
-rw-r--r--Modules/FindGLUT.cmake2
-rw-r--r--Modules/FindGTK2.cmake15
-rw-r--r--Modules/FindGTest.cmake2
-rw-r--r--Modules/FindGit.cmake3
-rw-r--r--Modules/FindGnuTLS.cmake2
-rw-r--r--Modules/FindGnuplot.cmake2
-rw-r--r--Modules/FindHDF5.cmake2
-rw-r--r--Modules/FindHSPELL.cmake2
-rw-r--r--Modules/FindITK.cmake78
-rw-r--r--Modules/FindImageMagick.cmake2
-rw-r--r--Modules/FindJNI.cmake2
-rw-r--r--Modules/FindJPEG.cmake2
-rw-r--r--Modules/FindJasper.cmake2
-rw-r--r--Modules/FindJava.cmake2
-rw-r--r--Modules/FindLAPACK.cmake34
-rw-r--r--Modules/FindLibArchive.cmake5
-rw-r--r--Modules/FindLibXml2.cmake2
-rw-r--r--Modules/FindLibXslt.cmake2
-rw-r--r--Modules/FindLua50.cmake2
-rw-r--r--Modules/FindLua51.cmake2
-rw-r--r--Modules/FindMPEG.cmake2
-rw-r--r--Modules/FindMPEG2.cmake2
-rw-r--r--Modules/FindMPI.cmake2
-rw-r--r--Modules/FindMotif.cmake2
-rw-r--r--Modules/FindOpenAL.cmake2
-rw-r--r--Modules/FindOpenGL.cmake9
-rw-r--r--Modules/FindOpenMP.cmake2
-rw-r--r--Modules/FindOpenSSL.cmake2
-rw-r--r--Modules/FindOpenSceneGraph.cmake2
-rw-r--r--Modules/FindOpenThreads.cmake2
-rw-r--r--Modules/FindPHP4.cmake2
-rw-r--r--Modules/FindPNG.cmake4
-rw-r--r--Modules/FindPerl.cmake2
-rw-r--r--Modules/FindPerlLibs.cmake31
-rw-r--r--Modules/FindPhysFS.cmake2
-rw-r--r--Modules/FindProducer.cmake2
-rw-r--r--Modules/FindProtobuf.cmake2
-rw-r--r--Modules/FindPythonInterp.cmake46
-rw-r--r--Modules/FindPythonLibs.cmake37
-rw-r--r--Modules/FindQt3.cmake6
-rw-r--r--Modules/FindQt4.cmake101
-rw-r--r--Modules/FindQuickTime.cmake2
-rw-r--r--Modules/FindRTI.cmake2
-rw-r--r--Modules/FindRuby.cmake2
-rw-r--r--Modules/FindSWIG.cmake2
-rw-r--r--Modules/FindSubversion.cmake2
-rw-r--r--Modules/FindTCL.cmake6
-rw-r--r--Modules/FindTIFF.cmake2
-rw-r--r--Modules/FindTclsh.cmake2
-rw-r--r--Modules/FindThreads.cmake2
-rw-r--r--Modules/FindWget.cmake2
-rw-r--r--Modules/FindZLIB.cmake4
-rw-r--r--Modules/Findosg.cmake2
-rw-r--r--Modules/FindosgAnimation.cmake2
-rw-r--r--Modules/FindosgDB.cmake2
-rw-r--r--Modules/FindosgFX.cmake2
-rw-r--r--Modules/FindosgGA.cmake2
-rw-r--r--Modules/FindosgIntrospection.cmake2
-rw-r--r--Modules/FindosgManipulator.cmake2
-rw-r--r--Modules/FindosgParticle.cmake2
-rw-r--r--Modules/FindosgProducer.cmake2
-rw-r--r--Modules/FindosgShadow.cmake2
-rw-r--r--Modules/FindosgSim.cmake2
-rw-r--r--Modules/FindosgTerrain.cmake2
-rw-r--r--Modules/FindosgText.cmake2
-rw-r--r--Modules/FindosgUtil.cmake2
-rw-r--r--Modules/FindosgViewer.cmake2
-rw-r--r--Modules/FindosgVolume.cmake2
-rw-r--r--Modules/FindosgWidget.cmake2
-rw-r--r--Modules/FindwxWidgets.cmake2
-rw-r--r--Modules/FortranCInterface/CMakeLists.txt2
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake192
-rw-r--r--Modules/NSIS.template.in7
-rw-r--r--Modules/Platform/CYGWIN-GNU.cmake3
-rw-r--r--Modules/Platform/CYGWIN-windres.cmake1
-rw-r--r--Modules/Platform/CYGWIN.cmake48
-rw-r--r--Modules/Platform/Darwin-GNU.cmake4
-rw-r--r--Modules/Platform/Darwin-NAG-Fortran.cmake5
-rw-r--r--Modules/Platform/Darwin-icc.cmake8
-rw-r--r--Modules/Platform/Darwin.cmake8
-rw-r--r--Modules/Platform/Linux-NAG-Fortran.cmake10
-rw-r--r--Modules/Platform/SCO_SV.cmake3
-rw-r--r--Modules/Platform/Windows-GNU.cmake2
-rw-r--r--Modules/Platform/Windows-Intel-C.cmake2
-rw-r--r--Modules/Platform/Windows-Intel-CXX.cmake4
-rw-r--r--Modules/Platform/Windows-Intel-Fortran.cmake11
-rw-r--r--Modules/Platform/Windows-Intel.cmake91
-rw-r--r--Modules/Platform/Windows-cl.cmake2
-rw-r--r--Modules/Platform/Windows-g++.cmake1
-rw-r--r--Modules/Platform/Windows-icl.cmake109
-rw-r--r--Modules/Platform/Windows-ifort.cmake80
-rw-r--r--Modules/Platform/Windows-windres.cmake1
-rw-r--r--Modules/Qt4ConfigDependentSettings.cmake23
-rw-r--r--Modules/Qt4Macros.cmake25
-rw-r--r--Modules/SystemInformation.cmake3
163 files changed, 1513 insertions, 917 deletions
diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake
index c7ead5b..44f2c20 100644
--- a/Modules/BundleUtilities.cmake
+++ b/Modules/BundleUtilities.cmake
@@ -27,6 +27,11 @@
# drag-n-drop copied to another machine and run on that machine as long as all
# of the system libraries are compatible.
#
+# If you pass plugins to fixup_bundle as the libs parameter, you should install
+# them or copy them into the bundle before calling fixup_bundle. The "libs"
+# parameter is a list of libraries that must be fixed up, but that cannot be
+# determined by otool output analysis. (i.e., plugins)
+#
# Gather all the keys for all the executables and libraries in a bundle, and
# then, for each key, copy each prerequisite into the bundle. Then fix each one
# up according to its own list of prerequisites.
@@ -112,6 +117,13 @@
# _EMBEDDED_ITEM keyed variable for that prerequisite. (Most likely changing to
# an "@executable_path" style reference.)
#
+# This function requires that the resolved_embedded_item be "inside" the bundle
+# already. In other words, if you pass plugins to fixup_bundle as the libs
+# parameter, you should install them or copy them into the bundle before
+# calling fixup_bundle. The "libs" parameter is a list of libraries that must
+# be fixed up, but that cannot be determined by otool output analysis. (i.e.,
+# plugins)
+#
# Also, change the id of the item being fixed up to its own _EMBEDDED_ITEM
# value.
#
@@ -472,11 +484,11 @@ function(copy_resolved_item_into_bundle resolved_item resolved_embedded_item)
else()
#message(STATUS "copying COMMAND ${CMAKE_COMMAND} -E copy ${resolved_item} ${resolved_embedded_item}")
execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${resolved_item}" "${resolved_embedded_item}")
+ if(UNIX AND NOT APPLE)
+ file(RPATH_REMOVE FILE "${resolved_embedded_item}")
+ endif(UNIX AND NOT APPLE)
endif()
- if(UNIX AND NOT APPLE)
- file(RPATH_REMOVE FILE "${resolved_embedded_item}")
- endif(UNIX AND NOT APPLE)
endfunction(copy_resolved_item_into_bundle)
@@ -514,11 +526,11 @@ function(copy_resolved_framework_into_bundle resolved_item resolved_embedded_ite
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "${resolved_resources}" "${resolved_embedded_resources}")
endif()
endif()
+ if(UNIX AND NOT APPLE)
+ file(RPATH_REMOVE FILE "${resolved_embedded_item}")
+ endif(UNIX AND NOT APPLE)
endif()
- if(UNIX AND NOT APPLE)
- file(RPATH_REMOVE FILE "${resolved_embedded_item}")
- endif(UNIX AND NOT APPLE)
endfunction(copy_resolved_framework_into_bundle)
@@ -527,6 +539,24 @@ function(fixup_bundle_item resolved_embedded_item exepath dirs)
#
get_item_key("${resolved_embedded_item}" ikey)
+ # Ensure the item is "inside the .app bundle" -- it should not be fixed up if
+ # it is not in the .app bundle... Otherwise, we'll modify files in the build
+ # tree, or in other varied locations around the file system, with our call to
+ # install_name_tool. Make sure that doesn't happen here:
+ #
+ get_dotapp_dir("${exepath}" exe_dotapp_dir)
+ string(LENGTH "${exe_dotapp_dir}/" exe_dotapp_dir_length)
+ string(SUBSTRING "${resolved_embedded_item}" 0 ${exe_dotapp_dir_length} item_substring)
+ if(NOT "${exe_dotapp_dir}/" STREQUAL "${item_substring}")
+ message(" exe_dotapp_dir/='${exe_dotapp_dir}/'")
+ message(" item_substring='${item_substring}'")
+ message(" resolved_embedded_item='${resolved_embedded_item}'")
+ message("")
+ message("Install or copy the item into the bundle before calling fixup_bundle")
+ message("")
+ message(FATAL_ERROR "cannot fixup an item that is not in the bundle...")
+ endif()
+
set(prereqs "")
get_prerequisites("${resolved_embedded_item}" prereqs 1 0 "${exepath}" "${dirs}")
diff --git a/Modules/CMakeASM_NASMInformation.cmake b/Modules/CMakeASM_NASMInformation.cmake
new file mode 100644
index 0000000..9da7d30
--- /dev/null
+++ b/Modules/CMakeASM_NASMInformation.cmake
@@ -0,0 +1,46 @@
+
+#=============================================================================
+# 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 distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# support for the nasm assembler
+
+set(CMAKE_ASM_NASM_SOURCE_FILE_EXTENSIONS nasm asm)
+
+if(NOT CMAKE_ASM_NASM_OBJECT_FORMAT)
+ if(WIN32)
+ if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
+ SET(CMAKE_ASM_NASM_OBJECT_FORMAT win64)
+ else()
+ SET(CMAKE_ASM_NASM_OBJECT_FORMAT win32)
+ endif()
+ elseif(APPLE)
+ if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
+ SET(CMAKE_ASM_NASM_OBJECT_FORMAT macho64)
+ else()
+ SET(CMAKE_ASM_NASM_OBJECT_FORMAT macho)
+ endif()
+ else()
+ if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
+ SET(CMAKE_ASM_NASM_OBJECT_FORMAT elf64)
+ else()
+ SET(CMAKE_ASM_NASM_OBJECT_FORMAT elf)
+ endif()
+ endif()
+endif()
+
+set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> <FLAGS> -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} -o <OBJECT> <SOURCE>")
+
+# Load the generic ASMInformation file:
+set(ASM_DIALECT "_NASM")
+include(CMakeASMInformation)
+set(ASM_DIALECT)
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index accda32..c91553a 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -42,6 +42,15 @@
#elif defined(__PATHSCALE__)
# define COMPILER_ID "PathScale"
+#elif defined(_CRAYC)
+# define COMPILER_ID "Cray"
+
+#elif defined(__TI_COMPILER_VERSION__)
+# define COMPILER_ID "TI_DSP"
+
+#elif defined(__SCO_VERSION__)
+# define COMPILER_ID "SCO"
+
#elif defined(__GNUC__)
# define COMPILER_ID "GNU"
@@ -85,7 +94,7 @@
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
-char* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
+char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
@CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake
index 86a824a..9285fef 100644
--- a/Modules/CMakeCInformation.cmake
+++ b/Modules/CMakeCInformation.cmake
@@ -1,6 +1,6 @@
#=============================================================================
-# Copyright 2004-2009 Kitware, Inc.
+# Copyright 2004-2011 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -76,12 +76,16 @@ ENDIF (NOT _INCLUDED_FILE)
# be made to those values.
IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
- INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
-ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
+ # Save the full path of the file so try_compile can use it.
+ INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override)
+ SET(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}")
+ENDIF()
IF(CMAKE_USER_MAKE_RULES_OVERRIDE_C)
- INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_C})
-ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_C)
+ # Save the full path of the file so try_compile can use it.
+ INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_C} RESULT_VARIABLE _override)
+ SET(CMAKE_USER_MAKE_RULES_OVERRIDE_C "${_override}")
+ENDIF()
# for most systems a module is the same as a shared library
@@ -164,9 +168,15 @@ ENDIF(NOT CMAKE_C_CREATE_SHARED_MODULE)
# Create a static archive incrementally for large object file counts.
# If CMAKE_C_CREATE_STATIC_LIBRARY is set it will override these.
-SET(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
-SET(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
-SET(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
+IF(NOT DEFINED CMAKE_C_ARCHIVE_CREATE)
+ SET(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
+ENDIF()
+IF(NOT DEFINED CMAKE_C_ARCHIVE_APPEND)
+ SET(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
+ENDIF()
+IF(NOT DEFINED CMAKE_C_ARCHIVE_FINISH)
+ SET(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
+ENDIF()
# compile a C file into an object file
IF(NOT CMAKE_C_COMPILE_OBJECT)
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index 4a32823..4c8f497 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -44,6 +44,15 @@
#elif defined(__PATHSCALE__)
# define COMPILER_ID "PathScale"
+#elif defined(_CRAYC)
+# define COMPILER_ID "Cray"
+
+#elif defined(__TI_COMPILER_VERSION__)
+# define COMPILER_ID "TI_DSP"
+
+#elif defined(__SCO_VERSION__)
+# define COMPILER_ID "SCO"
+
#elif defined(__GNUC__)
# define COMPILER_ID "GNU"
@@ -76,7 +85,7 @@
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
-char* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
+char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
@CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake
index 680f8fd..620de63 100644
--- a/Modules/CMakeCXXInformation.cmake
+++ b/Modules/CMakeCXXInformation.cmake
@@ -1,6 +1,6 @@
#=============================================================================
-# Copyright 2004-2009 Kitware, Inc.
+# Copyright 2004-2011 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -75,12 +75,16 @@ ENDIF (NOT _INCLUDED_FILE)
# be made to those values.
IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
- INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
-ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
+ # Save the full path of the file so try_compile can use it.
+ INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override)
+ SET(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}")
+ENDIF()
IF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX)
- INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_CXX})
-ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX)
+ # Save the full path of the file so try_compile can use it.
+ INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_CXX} RESULT_VARIABLE _override)
+ SET(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX "${_override}")
+ENDIF()
# for most systems a module is the same as a shared library
@@ -241,9 +245,15 @@ ENDIF(NOT CMAKE_CXX_CREATE_SHARED_MODULE)
# Create a static archive incrementally for large object file counts.
# If CMAKE_CXX_CREATE_STATIC_LIBRARY is set it will override these.
-SET(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
-SET(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
-SET(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
+IF(NOT DEFINED CMAKE_CXX_ARCHIVE_CREATE)
+ SET(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
+ENDIF()
+IF(NOT DEFINED CMAKE_CXX_ARCHIVE_APPEND)
+ SET(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
+ENDIF()
+IF(NOT DEFINED CMAKE_CXX_ARCHIVE_FINISH)
+ SET(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
+ENDIF()
# compile a C++ file into an object file
IF(NOT CMAKE_CXX_COMPILE_OBJECT)
diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake
index 06dd6b8..d6350bf 100644
--- a/Modules/CMakeDetermineASMCompiler.cmake
+++ b/Modules/CMakeDetermineASMCompiler.cmake
@@ -64,7 +64,11 @@ IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS GNU )
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_GNU "--version")
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_GNU "GNU assembler")
+ LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS TI_DSP )
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_TI_DSP "-h")
+ SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_TI_DSP "Texas Instruments")
+ INCLUDE(CMakeDetermineCompilerId)
CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT})
IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
@@ -77,16 +81,17 @@ ENDIF()
# If we have a gas/as cross compiler, they have usually some prefix, like
-# e.g. powerpc-linux-gas, arm-elf-gas or i586-mingw32msvc-gas .
+# e.g. powerpc-linux-gas, arm-elf-gas or i586-mingw32msvc-gas , optionally
+# with a 3-component version number at the end
# The other tools of the toolchain usually have the same prefix
# NAME_WE cannot be used since then this test will fail for names lile
# "arm-unknown-nto-qnx6.3.0-gas.exe", where BASENAME would be
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME)
- IF (COMPILER_BASENAME MATCHES "^(.+-)g?as(\\.exe)?$")
+ IF (COMPILER_BASENAME MATCHES "^(.+-)g?as(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
STRING(REGEX REPLACE "^(.+-)g?as(\\.exe)?$" "\\1" _CMAKE_TOOLCHAIN_PREFIX "${COMPILER_BASENAME}")
- ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?as(\\.exe)?$")
+ ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?as(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
INCLUDE(CMakeFindBinUtils)
diff --git a/Modules/CMakeDetermineASM_NASMCompiler.cmake b/Modules/CMakeDetermineASM_NASMCompiler.cmake
new file mode 100644
index 0000000..d184c0a
--- /dev/null
+++ b/Modules/CMakeDetermineASM_NASMCompiler.cmake
@@ -0,0 +1,27 @@
+
+#=============================================================================
+# 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 distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# Find the nasm assembler. yasm (http://www.tortall.net/projects/yasm/) is nasm compatible
+
+SET(CMAKE_ASM_NASM_COMPILER_INIT nasm yasm)
+
+IF(NOT CMAKE_ASM_NASM_COMPILER)
+ FIND_PROGRAM(CMAKE_ASM_NASM_COMPILER nasm
+ "$ENV{ProgramFiles}/NASM")
+ENDIF(NOT CMAKE_ASM_NASM_COMPILER)
+
+# Load the generic DetermineASM compiler file with the DIALECT set properly:
+SET(ASM_DIALECT "_NASM")
+INCLUDE(CMakeDetermineASMCompiler)
+SET(ASM_DIALECT)
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 639b426..06664c1 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -15,14 +15,14 @@
# determine the compiler to use for C programs
# NOTE, a generator may set CMAKE_C_COMPILER before
# loading this file to force a compiler.
-# use environment variable CC first if defined by user, next use
+# use environment variable CC first if defined by user, next use
# the cmake variable CMAKE_GENERATOR_CC which can be defined by a generator
# as a default compiler
-# If the internal cmake variable _CMAKE_TOOLCHAIN_PREFIX is set, this is used
+# If the internal cmake variable _CMAKE_TOOLCHAIN_PREFIX is set, this is used
# as prefix for the tools (e.g. arm-elf-gcc, arm-elf-ar etc.). This works
# currently with the GNU crosscompilers.
#
-# Sets the following variables:
+# Sets the following variables:
# CMAKE_C_COMPILER
# CMAKE_AR
# CMAKE_RANLIB
@@ -41,12 +41,12 @@ IF(NOT CMAKE_C_COMPILER)
SET(CMAKE_C_COMPILER_ARG1 "${CMAKE_C_FLAGS_ENV_INIT}" CACHE STRING "First argument to C compiler")
ENDIF(CMAKE_C_FLAGS_ENV_INIT)
IF(NOT EXISTS ${CMAKE_C_COMPILER_INIT})
- MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable CC:\n$ENV{CC}.")
+ MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable CC:\n$ENV{CC}.")
ENDIF(NOT EXISTS ${CMAKE_C_COMPILER_INIT})
ENDIF($ENV{CC} MATCHES ".+")
# next try prefer the compiler specified by the generator
- IF(CMAKE_GENERATOR_CC)
+ IF(CMAKE_GENERATOR_CC)
IF(NOT CMAKE_C_COMPILER_INIT)
SET(CMAKE_C_COMPILER_INIT ${CMAKE_GENERATOR_CC})
ENDIF(NOT CMAKE_C_COMPILER_INIT)
@@ -64,7 +64,7 @@ IF(NOT CMAKE_C_COMPILER)
FIND_PROGRAM(CMAKE_C_COMPILER NAMES ${CMAKE_C_COMPILER_LIST} PATHS ${_CMAKE_USER_CXX_COMPILER_PATH} DOC "C compiler" NO_DEFAULT_PATH)
ENDIF (_CMAKE_USER_CXX_COMPILER_PATH)
FIND_PROGRAM(CMAKE_C_COMPILER NAMES ${CMAKE_C_COMPILER_LIST} DOC "C compiler")
-
+
IF(CMAKE_C_COMPILER_INIT AND NOT CMAKE_C_COMPILER)
SET(CMAKE_C_COMPILER "${CMAKE_C_COMPILER_INIT}" CACHE FILEPATH "C compiler" FORCE)
ENDIF(CMAKE_C_COMPILER_INIT AND NOT CMAKE_C_COMPILER)
@@ -72,7 +72,7 @@ ELSE(NOT CMAKE_C_COMPILER)
# we only get here if CMAKE_C_COMPILER was specified using -D or a pre-made CMakeCache.txt
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
- # if CMAKE_C_COMPILER is a list of length 2, use the first item as
+ # if CMAKE_C_COMPILER is a list of length 2, use the first item as
# CMAKE_C_COMPILER and the 2nd one as CMAKE_C_COMPILER_ARG1
LIST(LENGTH CMAKE_C_COMPILER _CMAKE_C_COMPILER_LIST_LENGTH)
@@ -81,9 +81,9 @@ ELSE(NOT CMAKE_C_COMPILER)
LIST(GET CMAKE_C_COMPILER 0 CMAKE_C_COMPILER)
ENDIF("${_CMAKE_C_COMPILER_LIST_LENGTH}" EQUAL 2)
- # if a compiler was specified by the user but without path,
+ # if a compiler was specified by the user but without path,
# now try to find it with the full path
- # if it is found, force it into the cache,
+ # if it is found, force it into the cache,
# if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
# if the C compiler already had a path, reuse it for searching the CXX compiler
GET_FILENAME_COMPONENT(_CMAKE_USER_C_COMPILER_PATH "${CMAKE_C_COMPILER}" PATH)
@@ -143,19 +143,20 @@ IF(NOT CMAKE_C_COMPILER_ID_RUN)
ENDIF("${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW")
ENDIF(NOT CMAKE_C_COMPILER_ID_RUN)
-# If we have a gcc cross compiler, they have usually some prefix, like
-# e.g. powerpc-linux-gcc, arm-elf-gcc or i586-mingw32msvc-gcc .
+# If we have a gcc cross compiler, they have usually some prefix, like
+# e.g. powerpc-linux-gcc, arm-elf-gcc or i586-mingw32msvc-gcc, optionally
+# with a 3-component version number at the end (e.g. arm-eabi-gcc-4.5.2).
# The other tools of the toolchain usually have the same prefix
# NAME_WE cannot be used since then this test will fail for names lile
-# "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be
+# "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
-IF (CMAKE_CROSSCOMPILING
+IF (CMAKE_CROSSCOMPILING
AND "${CMAKE_C_COMPILER_ID}" MATCHES "GNU"
AND NOT _CMAKE_TOOLCHAIN_PREFIX)
GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME)
- IF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(\\.exe)?$")
+ IF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
- ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(\\.exe)?$")
+ ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
# if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils
# but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.)
@@ -163,7 +164,7 @@ IF (CMAKE_CROSSCOMPILING
SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
ENDIF ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
-ENDIF (CMAKE_CROSSCOMPILING
+ENDIF (CMAKE_CROSSCOMPILING
AND "${CMAKE_C_COMPILER_ID}" MATCHES "GNU"
AND NOT _CMAKE_TOOLCHAIN_PREFIX)
@@ -179,5 +180,5 @@ ENDIF(MSVC_C_ARCHITECTURE_ID)
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
"${CMAKE_PLATFORM_ROOT_BIN}/CMakeCCompiler.cmake"
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
- )
+ )
SET(CMAKE_C_COMPILER_ENV_VAR "CC")
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 555d20e..e77672d 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -15,10 +15,10 @@
# determine the compiler to use for C++ programs
# NOTE, a generator may set CMAKE_CXX_COMPILER before
# loading this file to force a compiler.
-# use environment variable CXX first if defined by user, next use
+# use environment variable CXX first if defined by user, next use
# the cmake variable CMAKE_GENERATOR_CXX which can be defined by a generator
# as a default compiler
-# If the internal cmake variable _CMAKE_TOOLCHAIN_PREFIX is set, this is used
+# If the internal cmake variable _CMAKE_TOOLCHAIN_PREFIX is set, this is used
# as prefix for the tools (e.g. arm-elf-g++, arm-elf-ar etc.)
#
# Sets the following variables:
@@ -63,7 +63,7 @@ IF(NOT CMAKE_CXX_COMPILER)
FIND_PROGRAM(CMAKE_CXX_COMPILER NAMES ${CMAKE_CXX_COMPILER_LIST} PATHS ${_CMAKE_USER_C_COMPILER_PATH} DOC "C++ compiler" NO_DEFAULT_PATH)
ENDIF (_CMAKE_USER_C_COMPILER_PATH)
FIND_PROGRAM(CMAKE_CXX_COMPILER NAMES ${CMAKE_CXX_COMPILER_LIST} DOC "C++ compiler")
-
+
IF(CMAKE_CXX_COMPILER_INIT AND NOT CMAKE_CXX_COMPILER)
SET(CMAKE_CXX_COMPILER "${CMAKE_CXX_COMPILER_INIT}" CACHE FILEPATH "C++ compiler" FORCE)
ENDIF(CMAKE_CXX_COMPILER_INIT AND NOT CMAKE_CXX_COMPILER)
@@ -72,7 +72,7 @@ ELSE(NOT CMAKE_CXX_COMPILER)
# we only get here if CMAKE_CXX_COMPILER was specified using -D or a pre-made CMakeCache.txt
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
#
-# if CMAKE_CXX_COMPILER is a list of length 2, use the first item as
+# if CMAKE_CXX_COMPILER is a list of length 2, use the first item as
# CMAKE_CXX_COMPILER and the 2nd one as CMAKE_CXX_COMPILER_ARG1
LIST(LENGTH CMAKE_CXX_COMPILER _CMAKE_CXX_COMPILER_LIST_LENGTH)
@@ -81,9 +81,9 @@ ELSE(NOT CMAKE_CXX_COMPILER)
LIST(GET CMAKE_CXX_COMPILER 0 CMAKE_CXX_COMPILER)
ENDIF("${_CMAKE_CXX_COMPILER_LIST_LENGTH}" EQUAL 2)
-# if a compiler was specified by the user but without path,
+# if a compiler was specified by the user but without path,
# now try to find it with the full path
-# if it is found, force it into the cache,
+# if it is found, force it into the cache,
# if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
# if the CXX compiler already had a path, reuse it for searching the C compiler
GET_FILENAME_COMPONENT(_CMAKE_USER_CXX_COMPILER_PATH "${CMAKE_CXX_COMPILER}" PATH)
@@ -151,19 +151,20 @@ IF(NOT CMAKE_CXX_COMPILER_ID_RUN)
ENDIF("${CMAKE_CXX_PLATFORM_ID}" MATCHES "MinGW")
ENDIF(NOT CMAKE_CXX_COMPILER_ID_RUN)
-# if we have a g++ cross compiler, they have usually some prefix, like
-# e.g. powerpc-linux-g++, arm-elf-g++ or i586-mingw32msvc-g++
-# the other tools of the toolchain usually have the same prefix
+# if we have a g++ cross compiler, they have usually some prefix, like
+# e.g. powerpc-linux-g++, arm-elf-g++ or i586-mingw32msvc-g++ , optionally
+# with a 3-component version number at the end (e.g. arm-eabi-gcc-4.5.2).
+# The other tools of the toolchain usually have the same prefix
# NAME_WE cannot be used since then this test will fail for names lile
-# "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be
+# "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
-IF (CMAKE_CROSSCOMPILING
+IF (CMAKE_CROSSCOMPILING
AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU"
AND NOT _CMAKE_TOOLCHAIN_PREFIX)
GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME)
- IF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(\\.exe)?$")
+ IF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
- ENDIF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(\\.exe)?$")
+ ENDIF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
# if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils
# but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.)
@@ -171,7 +172,7 @@ IF (CMAKE_CROSSCOMPILING
SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
ENDIF ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
-ENDIF (CMAKE_CROSSCOMPILING
+ENDIF (CMAKE_CROSSCOMPILING
AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU"
AND NOT _CMAKE_TOOLCHAIN_PREFIX)
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index d6df305..7f918e6 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -24,10 +24,18 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src)
# Compile the ABI identification source.
SET(BIN "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeDetermineCompilerABI_${lang}.bin")
+ SET(CMAKE_FLAGS )
+ IF(DEFINED CMAKE_${lang}_VERBOSE_FLAG)
+ SET(CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_${lang}_VERBOSE_FLAG}")
+ ENDIF()
TRY_COMPILE(CMAKE_DETERMINE_${lang}_ABI_COMPILED
${CMAKE_BINARY_DIR} ${src}
- CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_${lang}_VERBOSE_FLAG}"
+ CMAKE_FLAGS "${CMAKE_FLAGS}"
"-DCMAKE_${lang}_STANDARD_LIBRARIES="
+ # We need ignore these warnings because some platforms need
+ # CMAKE_${lang}_STANDARD_LIBRARIES to link properly and we
+ # don't care when we are just determining the ABI.
+ "--no-warn-unused-cli"
OUTPUT_VARIABLE OUTPUT
COPY_FILE "${BIN}"
)
@@ -58,13 +66,20 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src)
# Parse implicit linker information for this language, if available.
SET(implicit_dirs "")
SET(implicit_libs "")
+ SET(MULTI_ARCH FALSE)
+ IF(DEFINED CMAKE_OSX_ARCHITECTURES)
+ IF( "${CMAKE_OSX_ARCHITECTURES}" MATCHES ";" )
+ SET(MULTI_ARCH TRUE)
+ ENDIF()
+ ENDIF()
IF(CMAKE_${lang}_VERBOSE_FLAG
# Implicit link information cannot be used explicitly for
# multiple OS X architectures, so we skip it.
- AND NOT "${CMAKE_OSX_ARCHITECTURES}" MATCHES ";"
+ AND NOT MULTI_ARCH
# Skip this with Xcode for now.
AND NOT "${CMAKE_GENERATOR}" MATCHES Xcode)
- CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs log)
+ CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs log
+ "${CMAKE_${lang}_IMPLICIT_OBJECT_REGEX}")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Parsed ${lang} implicit link information from above output:\n${log}\n\n")
ENDIF()
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index bf78a5b..9a3884a 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -243,7 +243,9 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
# ENDIF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "feedface")
ENDIF(NOT CMAKE_EXECUTABLE_FORMAT)
-
+ IF(NOT DEFINED CMAKE_EXECUTABLE_FORMAT)
+ SET(CMAKE_EXECUTABLE_FORMAT)
+ ENDIF()
# Return the information extracted.
SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 03ddd78..5355886 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -169,6 +169,9 @@ IF(NOT CMAKE_Fortran_COMPILER_ID_RUN)
LIST(APPEND CMAKE_Fortran_COMPILER_ID_VENDORS Compaq)
SET(CMAKE_Fortran_COMPILER_ID_VENDOR_FLAGS_Compaq "-what")
SET(CMAKE_Fortran_COMPILER_ID_VENDOR_REGEX_Compaq "Compaq Visual Fortran")
+ LIST(APPEND CMAKE_Fortran_COMPILER_ID_VENDORS NAG) # Numerical Algorithms Group
+ SET(CMAKE_Fortran_COMPILER_ID_VENDOR_FLAGS_NAG "-V")
+ SET(CMAKE_Fortran_COMPILER_ID_VENDOR_REGEX_NAG "NAG Fortran Compiler")
# Try to identify the compiler.
SET(CMAKE_Fortran_COMPILER_ID)
@@ -215,6 +218,10 @@ ENDIF(NOT CMAKE_Fortran_COMPILER_ID_RUN)
INCLUDE(CMakeFindBinUtils)
+IF(MSVC_Fortran_ARCHITECTURE_ID)
+ SET(SET_MSVC_Fortran_ARCHITECTURE_ID
+ "SET(MSVC_Fortran_ARCHITECTURE_ID ${MSVC_Fortran_ARCHITECTURE_ID})")
+ENDIF()
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeFortranCompiler.cmake
diff --git a/Modules/CMakeDetermineRCCompiler.cmake b/Modules/CMakeDetermineRCCompiler.cmake
index 094b893..8e085af 100644
--- a/Modules/CMakeDetermineRCCompiler.cmake
+++ b/Modules/CMakeDetermineRCCompiler.cmake
@@ -54,6 +54,12 @@ ENDIF(NOT CMAKE_RC_COMPILER)
MARK_AS_ADVANCED(CMAKE_RC_COMPILER)
+GET_FILENAME_COMPONENT(_CMAKE_RC_COMPILER_NAME_WE ${CMAKE_RC_COMPILER} NAME_WE)
+IF(_CMAKE_RC_COMPILER_NAME_WE STREQUAL "windres")
+ SET(CMAKE_RC_OUTPUT_EXTENSION .obj)
+ELSE()
+ SET(CMAKE_RC_OUTPUT_EXTENSION .res)
+ENDIF()
# configure variables set in this file for fast reload later on
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeRCCompiler.cmake.in
diff --git a/Modules/CMakeFindEclipseCDT4.cmake b/Modules/CMakeFindEclipseCDT4.cmake
index 836e4c9..fbcdc98 100644
--- a/Modules/CMakeFindEclipseCDT4.cmake
+++ b/Modules/CMakeFindEclipseCDT4.cmake
@@ -17,6 +17,12 @@
FIND_PROGRAM(CMAKE_ECLIPSE_EXECUTABLE NAMES eclipse DOC "The Eclipse executable")
+# This variable is used by the Eclipse generator and appended to the make invocation commands.
+SET(CMAKE_ECLIPSE_MAKE_ARGUMENTS "" CACHE STRING "Additional command line arguments when Eclipse invokes make. Enter e.g. -j<some_number> to get parallel builds")
+
+# This variable is used by the Eclipse generator in out-of-source builds only.
+SET(ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT FALSE CACHE BOOL "If enabled, CMake will generate a source project for Eclipse in CMAKE_SOURCE_DIR")
+MARK_AS_ADVANCED(ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT)
# The Eclipse generator needs to know the standard include path
# so that Eclipse ca find the headers at runtime and parsing etc. works better
diff --git a/Modules/CMakeFortranCompiler.cmake.in b/Modules/CMakeFortranCompiler.cmake.in
index 5558651..146a6f2 100644
--- a/Modules/CMakeFortranCompiler.cmake.in
+++ b/Modules/CMakeFortranCompiler.cmake.in
@@ -2,6 +2,7 @@ SET(CMAKE_Fortran_COMPILER "@CMAKE_Fortran_COMPILER@")
SET(CMAKE_Fortran_COMPILER_ARG1 "@CMAKE_Fortran_COMPILER_ARG1@")
SET(CMAKE_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@")
SET(CMAKE_Fortran_PLATFORM_ID "@CMAKE_Fortran_PLATFORM_ID@")
+@SET_MSVC_Fortran_ARCHITECTURE_ID@
SET(CMAKE_AR "@CMAKE_AR@")
SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
SET(CMAKE_COMPILER_IS_GNUG77 @CMAKE_COMPILER_IS_GNUG77@)
diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in
index 107470c..8584731 100644
--- a/Modules/CMakeFortranCompilerId.F.in
+++ b/Modules/CMakeFortranCompilerId.F.in
@@ -6,6 +6,8 @@
PRINT *, 'INFO:compiler[Intel]'
#elif defined(__SUNPRO_F90) || defined(__SUNPRO_F95)
PRINT *, 'INFO:compiler[SunPro]'
+#elif defined(_CRAYFTN)
+ PRINT *, 'INFO:compiler[Cray]'
#elif defined(__G95__)
PRINT *, 'INFO:compiler[G95]'
#elif defined(__PATHSCALE__)
@@ -107,4 +109,13 @@
# endif
PRINT *, 'INFO:platform[]'
#endif
+#if defined(_WIN32) && (defined(__INTEL_COMPILER) || defined(__ICC))
+# if defined(_M_IA64)
+ PRINT *, 'INFO:arch[IA64]'
+# elif defined(_M_X64) || defined(_M_AMD64)
+ PRINT *, 'INFO:arch[x64]'
+# elif defined(_M_IX86)
+ PRINT *, 'INFO:arch[X86]'
+# endif
+#endif
END
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
index 80f5e46..dc15e55 100644
--- a/Modules/CMakeFortranInformation.cmake
+++ b/Modules/CMakeFortranInformation.cmake
@@ -1,6 +1,6 @@
#=============================================================================
-# Copyright 2004-2009 Kitware, Inc.
+# Copyright 2004-2011 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -52,12 +52,16 @@ ENDIF (NOT _INCLUDED_FILE)
# be made to those values.
IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
- INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
-ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
+ # Save the full path of the file so try_compile can use it.
+ INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override)
+ SET(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}")
+ENDIF()
IF(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran)
- INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran})
-ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran)
+ # Save the full path of the file so try_compile can use it.
+ INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran} RESULT_VARIABLE _override)
+ SET(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran "${_override}")
+ENDIF()
# Fortran needs cmake to do a requires step during its build process to
@@ -67,29 +71,29 @@ SET(CMAKE_NEEDS_REQUIRES_STEP_Fortran_FLAG 1)
# Create a set of shared library variable specific to Fortran
# For 90% of the systems, these are the same flags as the C versions
# so if these are not set just copy the flags from the c version
-IF(NOT CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS)
+IF(NOT DEFINED CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS)
SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS)
+ENDIF()
-IF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
+IF(NOT DEFINED CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
+ENDIF()
IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
-ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
+ENDIF()
-IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
+IF(NOT DEFINED CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
+ENDIF()
-IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP)
+IF(NOT DEFINED CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP)
+ENDIF()
-IF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG)
+IF(NOT DEFINED CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG)
SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG)
+ENDIF()
IF(NOT DEFINED CMAKE_EXE_EXPORTS_Fortran_FLAG)
SET(CMAKE_EXE_EXPORTS_Fortran_FLAG ${CMAKE_EXE_EXPORTS_C_FLAG})
@@ -100,25 +104,25 @@ IF(NOT DEFINED CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG)
ENDIF()
# repeat for modules
-IF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
+IF(NOT DEFINED CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
SET(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
+ENDIF()
-IF(NOT CMAKE_SHARED_MODULE_Fortran_FLAGS)
+IF(NOT DEFINED CMAKE_SHARED_MODULE_Fortran_FLAGS)
SET(CMAKE_SHARED_MODULE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_MODULE_Fortran_FLAGS)
+ENDIF()
-IF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG)
+IF(NOT DEFINED CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG)
SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG})
-ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG)
+ENDIF()
-IF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP)
+IF(NOT DEFINED CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP)
SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP})
-ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP)
+ENDIF()
-IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG)
+IF(NOT DEFINED CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG)
SET(CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG})
-ENDIF(NOT CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG)
+ENDIF()
IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH)
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH})
@@ -163,9 +167,15 @@ ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
# Create a static archive incrementally for large object file counts.
# If CMAKE_Fortran_CREATE_STATIC_LIBRARY is set it will override these.
-SET(CMAKE_Fortran_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
-SET(CMAKE_Fortran_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
-SET(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
+IF(NOT DEFINED CMAKE_Fortran_ARCHIVE_CREATE)
+ SET(CMAKE_Fortran_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
+ENDIF()
+IF(NOT DEFINED CMAKE_Fortran_ARCHIVE_APPEND)
+ SET(CMAKE_Fortran_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
+ENDIF()
+IF(NOT DEFINED CMAKE_Fortran_ARCHIVE_FINISH)
+ SET(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
+ENDIF()
# compile a Fortran file into an object file
# (put -o after -c to workaround bug in at least one mpif77 wrapper)
diff --git a/Modules/CMakeJavaInformation.cmake b/Modules/CMakeJavaInformation.cmake
index e9bc9be..e192db1 100644
--- a/Modules/CMakeJavaInformation.cmake
+++ b/Modules/CMakeJavaInformation.cmake
@@ -1,6 +1,6 @@
#=============================================================================
-# Copyright 2004-2009 Kitware, Inc.
+# Copyright 2004-2011 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -19,12 +19,16 @@
# be made to those values.
IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
- INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
-ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)
-
-IF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX)
- INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_CXX})
-ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX)
+ # Save the full path of the file so try_compile can use it.
+ INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override)
+ SET(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}")
+ENDIF()
+
+IF(CMAKE_USER_MAKE_RULES_OVERRIDE_Java)
+ # Save the full path of the file so try_compile can use it.
+ INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_Java} RESULT_VARIABLE _override)
+ SET(CMAKE_USER_MAKE_RULES_OVERRIDE_Java "${_override}")
+ENDIF()
# this is a place holder if java needed flags for javac they would go here.
IF(NOT CMAKE_Java_CREATE_STATIC_LIBRARY)
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake
index defdb47..5405bda 100644
--- a/Modules/CMakeParseImplicitLinkInfo.cmake
+++ b/Modules/CMakeParseImplicitLinkInfo.cmake
@@ -16,7 +16,7 @@
# This is used internally by CMake and should not be included by user
# code.
-function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var)
+function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var obj_regex)
set(implicit_libs_tmp "")
set(implicit_dirs_tmp)
set(log "")
@@ -59,6 +59,11 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var)
# Unix library full path.
list(APPEND implicit_libs_tmp ${arg})
set(log "${log} arg [${arg}] ==> lib [${arg}]\n")
+ elseif("${arg}" MATCHES "^(.:)?[/\\].*\\.o$"
+ AND obj_regex AND "${arg}" MATCHES "${obj_regex}")
+ # Object file full path.
+ list(APPEND implicit_libs_tmp ${arg})
+ set(log "${log} arg [${arg}] ==> obj [${arg}]\n")
elseif("${arg}" MATCHES "^-Y(P,)?")
# Sun search path.
string(REGEX REPLACE "^-Y(P,)?" "" dirs "${arg}")
diff --git a/Modules/CMakePlatformId.h.in b/Modules/CMakePlatformId.h.in
index e20348a..cb3f40a 100644
--- a/Modules/CMakePlatformId.h.in
+++ b/Modules/CMakePlatformId.h.in
@@ -83,7 +83,7 @@
#endif
/* For windows compilers MSVC and Intel we can determine
- the architecture of the compiler being used. This is becase
+ the architecture of the compiler being used. This is because
the compilers do not have flags that can change the architecture,
but rather depend on which compiler is being used
*/
@@ -109,6 +109,6 @@
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
-char* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
-char* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
+char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
+char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
diff --git a/Modules/CMakeRCCompiler.cmake.in b/Modules/CMakeRCCompiler.cmake.in
index 93bc850..83428e2 100644
--- a/Modules/CMakeRCCompiler.cmake.in
+++ b/Modules/CMakeRCCompiler.cmake.in
@@ -2,5 +2,5 @@ SET(CMAKE_RC_COMPILER "@CMAKE_RC_COMPILER@")
SET(CMAKE_RC_COMPILER_ARG1 "@CMAKE_RC_COMPILER_ARG1@")
SET(CMAKE_RC_COMPILER_LOADED 1)
SET(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc)
-SET(CMAKE_RC_OUTPUT_EXTENSION .res)
+SET(CMAKE_RC_OUTPUT_EXTENSION @CMAKE_RC_OUTPUT_EXTENSION@)
SET(CMAKE_RC_COMPILER_ENV_VAR "RC")
diff --git a/Modules/CMakeTestASM-ATTCompiler.cmake b/Modules/CMakeTestASM-ATTCompiler.cmake
index 3b7a74f..581ad0c 100644
--- a/Modules/CMakeTestASM-ATTCompiler.cmake
+++ b/Modules/CMakeTestASM-ATTCompiler.cmake
@@ -13,10 +13,10 @@
# License text for the above reference.)
# This file is used by EnableLanguage in cmGlobalGenerator to
-# determine that that selected ASM-ATT compiler can actually compile
-# and link the most basic of programs. If not, a fatal error
-# is set and cmake stops processing commands and will not generate
-# any makefiles or projects.
+# determine that the selected ASM-ATT "compiler" works.
+# For assembler this can only check whether the compiler has been found,
+# because otherwise there would have to be a separate assembler source file
+# for each assembler on every architecture.
SET(ASM_DIALECT "-ATT")
INCLUDE(CMakeTestASMCompiler)
diff --git a/Modules/CMakeTestASMCompiler.cmake b/Modules/CMakeTestASMCompiler.cmake
index 54def81..56cf332 100644
--- a/Modules/CMakeTestASMCompiler.cmake
+++ b/Modules/CMakeTestASMCompiler.cmake
@@ -13,10 +13,11 @@
# License text for the above reference.)
# This file is used by EnableLanguage in cmGlobalGenerator to
-# determine that that selected ASM compiler can actually compile
-# and link the most basic of programs. If not, a fatal error
-# is set and cmake stops processing commands and will not generate
-# any makefiles or projects.
+# determine that the selected ASM compiler works.
+# For assembler this can only check whether the compiler has been found,
+# because otherwise there would have to be a separate assembler source file
+# for each assembler on every architecture.
+
IF(CMAKE_ASM${ASM_DIALECT}_COMPILER)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS 1 CACHE INTERNAL "")
ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER)
diff --git a/Modules/CMakeTestASM_MASMCompiler.cmake b/Modules/CMakeTestASM_MASMCompiler.cmake
index 84ca98f..8369b94 100644
--- a/Modules/CMakeTestASM_MASMCompiler.cmake
+++ b/Modules/CMakeTestASM_MASMCompiler.cmake
@@ -13,10 +13,10 @@
# License text for the above reference.)
# This file is used by EnableLanguage in cmGlobalGenerator to
-# determine that the selected ASM_MASM "compiler" (should be masm or masm64)
-# can actually "compile" and link the most basic of programs. If not, a
-# fatal error is set and cmake stops processing commands and will not generate
-# any makefiles or projects.
+# determine that the selected ASM_MASM "compiler" (should be masm or masm64)
+# works. For assembler this can only check whether the compiler has been found,
+# because otherwise there would have to be a separate assembler source file
+# for each assembler on every architecture.
SET(ASM_DIALECT "_MASM")
INCLUDE(CMakeTestASMCompiler)
diff --git a/Modules/CMakeTestASM_NASMCompiler.cmake b/Modules/CMakeTestASM_NASMCompiler.cmake
new file mode 100644
index 0000000..a5e2bea
--- /dev/null
+++ b/Modules/CMakeTestASM_NASMCompiler.cmake
@@ -0,0 +1,23 @@
+
+#=============================================================================
+# 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 distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# This file is used by EnableLanguage in cmGlobalGenerator to
+# determine that the selected ASM_NASM "compiler" works.
+# For assembler this can only check whether the compiler has been found,
+# because otherwise there would have to be a separate assembler source file
+# for each assembler on every architecture.
+
+SET(ASM_DIALECT "_NASM")
+INCLUDE(CMakeTestASMCompiler)
+SET(ASM_DIALECT)
diff --git a/Modules/CPack.STGZ_Header.sh.in b/Modules/CPack.STGZ_Header.sh.in
index 3b50e74..dee576f 100755
--- a/Modules/CPack.STGZ_Header.sh.in
+++ b/Modules/CPack.STGZ_Header.sh.in
@@ -80,7 +80,7 @@ then
if [ "x${cpack_skip_license}x" != "xTRUEx" ]
then
- more << ____cpack__here_doc____
+ more << '____cpack__here_doc____'
@CPACK_RESOURCE_FILE_LICENSE_CONTENT@
____cpack__here_doc____
echo
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 7033e31..797ee57 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -210,6 +210,11 @@
# CPACK_PACKAGE_INSTALL_REGISTRY_KEY - Registry key used when
# installing this project.
#
+# CPACK_NSIS_INSTALL_ROOT - The default installation directory presented
+# to the end user by the NSIS installer is under this root dir. The full
+# directory presented to the end user is:
+# ${CPACK_NSIS_INSTALL_ROOT}/${CPACK_PACKAGE_INSTALL_DIRECTORY}
+#
# CPACK_NSIS_MUI_ICON - The icon file (.ico) for the generated
# install program.
#
@@ -257,6 +262,14 @@
# CPACK_NSIS_DELETE_ICONS_EXTRA -Additional NSIS commands to
# uninstall start menu shortcuts.
#
+# CPACK_NSIS_EXECUTABLES_DIRECTORY - Creating NSIS start menu links
+# assumes that they are in 'bin' unless this variable is set.
+# For example, you would set this to 'exec' if your executables are
+# in an exec directory.
+#
+# CPACK_NSIS_MUI_FINISHPAGE_RUN - Specify an executable to add an option
+# to run on the finish page of the NSIS installer.
+#
# The following variable is specific to installers build on Mac OS X
# using PackageMaker:
#
@@ -777,6 +790,11 @@ IF(${__cpack_system_name} MATCHES Windows)
ENDIF(${__cpack_system_name} MATCHES Windows)
cpack_set_if_not_set(CPACK_SYSTEM_NAME "${__cpack_system_name}")
+# Root dir: default value should be the string literal "$PROGRAMFILES"
+# for backwards compatibility. Projects may set this value to anything.
+set(__cpack_root_default "$PROGRAMFILES")
+cpack_set_if_not_set(CPACK_NSIS_INSTALL_ROOT "${__cpack_root_default}")
+
# <project>-<major>.<minor>.<patch>-<release>-<platform>.<pkgtype>
cpack_set_if_not_set(CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}")
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index e2d78802..026c45a 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -331,7 +331,7 @@ ELSE(CPACK_RPM_COMPRESSION_TYPE)
ENDIF(CPACK_RPM_COMPRESSION_TYPE)
if(CPACK_PACKAGE_RELOCATABLE)
- set(CPACK_RPM_PACKAGE_RELOCATABLE TRUE)
+ set(CPACK_RPM_PACKAGE_RELOCATABLE TRUE)
endif(CPACK_PACKAGE_RELOCATABLE)
if(CPACK_RPM_PACKAGE_RELOCATABLE)
if(CPACK_RPM_PACKAGE_DEBUG)
@@ -453,6 +453,17 @@ SET(CPACK_RPM_FILE_NAME "${CPACK_OUTPUT_FILE_NAME}")
#STRING(REGEX REPLACE " " "\\\\ " CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
+
+# Are we packaging components ?
+IF(CPACK_RPM_PACKAGE_COMPONENT)
+ SET(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}")
+ SET(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "/${CPACK_RPM_PACKAGE_COMPONENT}")
+ SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_RPM_PACKAGE_COMPONENT}")
+ELSE(CPACK_RPM_PACKAGE_COMPONENT)
+ SET(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "")
+ SET(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "")
+ SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
+ENDIF(CPACK_RPM_PACKAGE_COMPONENT)
# Use files tree to construct files command (spec file)
# We should not forget to include symlinks (thus -o -type l)
# We must remove the './' due to the local search and escape the
@@ -460,10 +471,10 @@ SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
# Then we must authorize any man pages extension (adding * at the end)
# because rpmbuild may automatically compress those files
EXECUTE_PROCESS(COMMAND find -type f -o -type l
- COMMAND sed {s:.*/man.*/.*:&*:}
- COMMAND sed {s/\\.\\\(.*\\\)/\"\\1\"/}
- WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}"
- OUTPUT_VARIABLE CPACK_RPM_INSTALL_FILES)
+ COMMAND sed {s:.*/man.*/.*:&*:}
+ COMMAND sed {s/\\.\\\(.*\\\)/\"\\1\"/}
+ WORKING_DIRECTORY "${WDIR}"
+ OUTPUT_VARIABLE CPACK_RPM_INSTALL_FILES)
if (CPACK_ABSOLUTE_DESTINATION_FILES)
IF(CPACK_RPM_PACKAGE_DEBUG)
@@ -494,7 +505,7 @@ if (CPACK_ABSOLUTE_DESTINATION_FILES)
endif(CPACK_ABSOLUTE_DESTINATION_FILES)
# The name of the final spec file to be used by rpmbuild
-SET(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}.spec")
+SET(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.spec")
# Print out some debug information if we were asked for that
IF(CPACK_RPM_PACKAGE_DEBUG)
@@ -517,7 +528,7 @@ ENDIF(CPACK_RPM_PACKAGE_DEBUG)
IF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE)
FILE(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in
"# -*- rpm-spec -*-
-BuildRoot: \@CPACK_RPM_DIRECTORY\@/\@CPACK_PACKAGE_FILE_NAME\@
+BuildRoot: \@CPACK_RPM_DIRECTORY\@/\@CPACK_PACKAGE_FILE_NAME\@\@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH\@
Summary: \@CPACK_RPM_PACKAGE_SUMMARY\@
Name: \@CPACK_RPM_PACKAGE_NAME\@
Version: \@CPACK_RPM_PACKAGE_VERSION\@
@@ -555,10 +566,9 @@ mv $RPM_BUILD_ROOT \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\"
%install
if [ -e $RPM_BUILD_ROOT ];
then
- mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot/*\" $RPM_BUILD_ROOT
-else
- mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\" $RPM_BUILD_ROOT
+ rm -rf $RPM_BUILD_ROOT
fi
+mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\" $RPM_BUILD_ROOT
%clean
@@ -608,15 +618,15 @@ IF(RPMBUILD_EXECUTABLE)
# Now call rpmbuild using the SPECFILE
EXECUTE_PROCESS(
COMMAND "${RPMBUILD_EXECUTABLE}" -bb
- --buildroot "${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}"
+ --buildroot "${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}"
"${CPACK_RPM_BINARY_SPECFILE}"
- WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}"
- ERROR_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild.err"
- OUTPUT_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild.out")
+ WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}"
+ ERROR_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err"
+ OUTPUT_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out")
IF(CPACK_RPM_PACKAGE_DEBUG)
MESSAGE("CPackRPM:Debug: You may consult rpmbuild logs in: ")
- MESSAGE("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild.err")
- MESSAGE("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild.out")
+ MESSAGE("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err")
+ MESSAGE("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out")
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
ELSE(RPMBUILD_EXECUTABLE)
IF(ALIEN_EXECUTABLE)
diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake
index bb76ddd..c261eb3 100644
--- a/Modules/CTest.cmake
+++ b/Modules/CTest.cmake
@@ -63,7 +63,8 @@ OPTION(BUILD_TESTING "Build the testing tree." ON)
# function to turn generator name into a version string
# like vs7 vs71 vs8 vs9
FUNCTION(GET_VS_VERSION_STRING generator var)
- STRING(REGEX REPLACE "Visual Studio ([0-9][0-9]?)($|.*)" "\\1" NUMBER "${generator}")
+ STRING(REGEX REPLACE "Visual Studio ([0-9][0-9]?)($|.*)" "\\1"
+ NUMBER "${generator}")
IF("${generator}" MATCHES "Visual Studio 7 .NET 2003")
SET(ver_string "vs71")
ELSE("${generator}" MATCHES "Visual Studio 7 .NET 2003")
@@ -253,15 +254,16 @@ IF(BUILD_TESTING)
ENDIF(CTEST_USE_LAUNCHERS)
MARK_AS_ADVANCED(
+ BZRCOMMAND
+ BZR_UPDATE_OPTIONS
COVERAGE_COMMAND
+ CTEST_SUBMIT_RETRY_DELAY
+ CTEST_SUBMIT_RETRY_COUNT
CVSCOMMAND
- SVNCOMMAND
- BZRCOMMAND
- HGCOMMAND
- GITCOMMAND
CVS_UPDATE_OPTIONS
- SVN_UPDATE_OPTIONS
- BZR_UPDATE_OPTIONS
+ DART_TESTING_TIMEOUT
+ GITCOMMAND
+ HGCOMMAND
MAKECOMMAND
MEMORYCHECK_COMMAND
MEMORYCHECK_SUPPRESSIONS_FILE
@@ -270,10 +272,9 @@ IF(BUILD_TESTING)
SLURM_SBATCH_COMMAND
SLURM_SRUN_COMMAND
SITE
- CTEST_SUBMIT_RETRY_DELAY
- CTEST_SUBMIT_RETRY_COUNT
+ SVNCOMMAND
+ SVN_UPDATE_OPTIONS
)
- # BUILDNAME
IF(NOT RUN_FROM_DART)
SET(RUN_FROM_CTEST_OR_DART 1)
INCLUDE(CTestTargets)
diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake
index 0068617..a03b64d 100644
--- a/Modules/CheckCCompilerFlag.cmake
+++ b/Modules/CheckCCompilerFlag.cmake
@@ -7,7 +7,7 @@
# that can modify the build.
#=============================================================================
-# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006-2010 Kitware, Inc.
# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
#
# Distributed under the OSI-approved BSD License (the "License");
@@ -25,10 +25,11 @@ INCLUDE(CheckCSourceCompiles)
MACRO (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
SET(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
SET(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
- CHECK_C_SOURCE_COMPILES("int main() { return 0;}" ${_RESULT}
+ CHECK_C_SOURCE_COMPILES("int main(void) { return 0; }" ${_RESULT}
# Some compilers do not fail with a bad flag
FAIL_REGEX "unrecognized .*option" # GNU
FAIL_REGEX "ignoring unknown option" # MSVC
+ FAIL_REGEX "warning D9002" # MSVC, any lang
FAIL_REGEX "[Uu]nknown option" # HP
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
FAIL_REGEX "command option .* is not recognized" # XL
diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake
index e8bfc0c..d59fe55 100644
--- a/Modules/CheckCSourceCompiles.cmake
+++ b/Modules/CheckCSourceCompiles.cmake
@@ -1,6 +1,6 @@
-# - Check if the given C source code compiles.
+# - Check if given C source compiles and links into an executable
# CHECK_C_SOURCE_COMPILES(<code> <var> [FAIL_REGEX <fail-regex>])
-# <code> - source code to try to compile
+# <code> - source code to try to compile, must define 'main'
# <var> - variable to store whether the source code compiled
# <fail-regex> - fail if test output matches this regex
# The following variables may be set before calling this macro to
diff --git a/Modules/CheckCXXCompilerFlag.cmake b/Modules/CheckCXXCompilerFlag.cmake
index d8e4715..788bf35 100644
--- a/Modules/CheckCXXCompilerFlag.cmake
+++ b/Modules/CheckCXXCompilerFlag.cmake
@@ -7,7 +7,7 @@
# modify the build.
#=============================================================================
-# Copyright 2006-2009 Kitware, Inc.
+# Copyright 2006-2010 Kitware, Inc.
# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
#
# Distributed under the OSI-approved BSD License (the "License");
@@ -29,6 +29,7 @@ MACRO (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
# Some compilers do not fail with a bad flag
FAIL_REGEX "unrecognized .*option" # GNU
FAIL_REGEX "ignoring unknown option" # MSVC
+ FAIL_REGEX "warning D9002" # MSVC, any lang
FAIL_REGEX "[Uu]nknown option" # HP
FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro
FAIL_REGEX "command option .* is not recognized" # XL
diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake
index 4502c6b..0491b37 100644
--- a/Modules/CheckCXXSourceCompiles.cmake
+++ b/Modules/CheckCXXSourceCompiles.cmake
@@ -1,6 +1,6 @@
-# - Check if the given C++ source code compiles.
+# - Check if given C++ source compiles and links into an executable
# CHECK_CXX_SOURCE_COMPILES(<code> <var> [FAIL_REGEX <fail-regex>])
-# <code> - source code to try to compile
+# <code> - source code to try to compile, must define 'main'
# <var> - variable to store whether the source code compiled
# <fail-regex> - fail if test output matches this regex
# The following variables may be set before calling this macro to
diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake
index e1a1777..0ba36d9 100644
--- a/Modules/CheckFunctionExists.cmake
+++ b/Modules/CheckFunctionExists.cmake
@@ -1,8 +1,10 @@
-# - Check if the function exists.
-# CHECK_FUNCTION_EXISTS(FUNCTION VARIABLE)
-# - macro which checks if the function exists
-# FUNCTION - the name of the function
-# VARIABLE - variable to store the result
+# - Check if a C function can be linked
+# CHECK_FUNCTION_EXISTS(<function> <variable>)
+#
+# Check that the <function> is provided by libraries on the system and
+# store the result in a <variable>. This does not verify that any
+# system header file declares the function, only that it can be found
+# at link time (considure using CheckSymbolExists).
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
@@ -13,7 +15,7 @@
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
#=============================================================================
-# Copyright 2002-2009 Kitware, Inc.
+# Copyright 2002-2011 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake
index 40910f2..e86604b 100644
--- a/Modules/CheckSymbolExists.cmake
+++ b/Modules/CheckSymbolExists.cmake
@@ -1,9 +1,16 @@
-# - Check if the symbol exists in include files
-# CHECK_SYMBOL_EXISTS(SYMBOL FILES VARIABLE)
+# - Check if a symbol exists as a function, variable, or macro
+# CHECK_SYMBOL_EXISTS(<symbol> <files> <variable>)
#
-# SYMBOL - symbol
-# FILES - include files to check
-# VARIABLE - variable to return result
+# Check that the <symbol> is available after including given header
+# <files> and store the result in a <variable>. Specify the list
+# of files in one argument as a semicolon-separated list.
+#
+# If the header files define the symbol as a macro it is considered
+# available and assumed to work. If the header files declare the
+# symbol as a function or variable then the symbol must also be
+# available for linking. If the symbol is a type or enum value
+# it will not be recognized (consider using CheckTypeSize or
+# CheckCSourceCompiles).
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
@@ -14,7 +21,7 @@
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
#=============================================================================
-# Copyright 2003-2009 Kitware, Inc.
+# Copyright 2003-2011 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
diff --git a/Modules/Compiler/Cray-C.cmake b/Modules/Compiler/Cray-C.cmake
new file mode 100644
index 0000000..675560c
--- /dev/null
+++ b/Modules/Compiler/Cray-C.cmake
@@ -0,0 +1 @@
+set(CMAKE_C_VERBOSE_FLAG "-v")
diff --git a/Modules/Compiler/Cray-CXX.cmake b/Modules/Compiler/Cray-CXX.cmake
new file mode 100644
index 0000000..9fb191c
--- /dev/null
+++ b/Modules/Compiler/Cray-CXX.cmake
@@ -0,0 +1 @@
+set(CMAKE_CXX_VERBOSE_FLAG "-v")
diff --git a/Modules/Compiler/Cray-Fortran.cmake b/Modules/Compiler/Cray-Fortran.cmake
new file mode 100644
index 0000000..4f45176
--- /dev/null
+++ b/Modules/Compiler/Cray-Fortran.cmake
@@ -0,0 +1,4 @@
+set(CMAKE_Fortran_VERBOSE_FLAG "-v")
+set(CMAKE_Fortran_MODOUT_FLAG -em)
+set(CMAKE_Fortran_MODDIR_FLAG -J)
+set(CMAKE_Fortran_MODDIR_DEFAULT .)
diff --git a/Modules/Compiler/NAG-Fortran.cmake b/Modules/Compiler/NAG-Fortran.cmake
new file mode 100644
index 0000000..b68c479
--- /dev/null
+++ b/Modules/Compiler/NAG-Fortran.cmake
@@ -0,0 +1,32 @@
+# Help CMAKE_PARSE_IMPLICIT_LINK_INFO detect NAG Fortran object files.
+if(NOT CMAKE_Fortran_COMPILER_WORKS AND NOT CMAKE_Fortran_COMPILER_FORCED)
+ message(STATUS "Detecting NAG Fortran directory")
+ # Run with -dryrun to see sample "link" line.
+ execute_process(
+ COMMAND ${CMAKE_Fortran_COMPILER} dummy.o -dryrun
+ OUTPUT_VARIABLE _dryrun
+ ERROR_VARIABLE _dryrun
+ )
+ # Match an object file.
+ string(REGEX MATCH "/[^ ]*/[^ /][^ /]*\\.o" _nag_obj "${_dryrun}")
+ if(_nag_obj)
+ # Parse object directory and convert to a regex.
+ string(REGEX REPLACE "/[^/]*$" "" _nag_dir "${_nag_obj}")
+ string(REGEX REPLACE "([][+.*()^])" "\\\\\\1" _nag_regex "${_nag_dir}")
+ set(CMAKE_Fortran_IMPLICIT_OBJECT_REGEX "^${_nag_regex}/")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Detecting NAG Fortran directory with -dryrun found\n"
+ " object: ${_nag_obj}\n"
+ " directory: ${_nag_dir}\n"
+ " regex: ${CMAKE_Fortran_IMPLICIT_OBJECT_REGEX}\n"
+ "from output:\n${_dryrun}\n\n")
+ message(STATUS "Detecting NAG Fortran directory - ${_nag_dir}")
+ else()
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Detecting NAG Fortran directory with -dryrun failed:\n${_dryrun}\n\n")
+ message(STATUS "Detecting NAG Fortran directory - failed")
+ endif()
+endif()
+
+set(CMAKE_Fortran_MODDIR_FLAG "-mdir ")
+set(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-PIC")
diff --git a/Modules/Compiler/SCO-C.cmake b/Modules/Compiler/SCO-C.cmake
new file mode 100644
index 0000000..6e762cc
--- /dev/null
+++ b/Modules/Compiler/SCO-C.cmake
@@ -0,0 +1,2 @@
+include(Compiler/SCO)
+__compiler_sco(C)
diff --git a/Modules/Compiler/SCO-CXX.cmake b/Modules/Compiler/SCO-CXX.cmake
new file mode 100644
index 0000000..5b713a0
--- /dev/null
+++ b/Modules/Compiler/SCO-CXX.cmake
@@ -0,0 +1,2 @@
+include(Compiler/SCO)
+__compiler_sco(CXX)
diff --git a/Modules/Compiler/SCO.cmake b/Modules/Compiler/SCO.cmake
new file mode 100644
index 0000000..d3deeb1
--- /dev/null
+++ b/Modules/Compiler/SCO.cmake
@@ -0,0 +1,25 @@
+
+#=============================================================================
+# Copyright 2002-2011 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 distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# This module is shared by multiple languages; use include blocker.
+if(__COMPILER_SCO)
+ return()
+endif()
+set(__COMPILER_SCO 1)
+
+macro(__compiler_sco lang)
+ # Feature flags.
+ set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-Kpic -belf")
+ set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-belf -Wl,-Bexport")
+endmacro()
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 997164a..3de6b7e 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -32,6 +32,7 @@
# [CMAKE_COMMAND /.../cmake] # Specify alternative cmake executable
# [CMAKE_GENERATOR gen] # Specify generator for native build
# [CMAKE_ARGS args...] # Arguments to CMake command line
+# [CMAKE_CACHE_ARGS args...] # Initial cache arguments, of the form -Dvar:string=on
# #--Build step-----------------
# [BINARY_DIR dir] # Specify build dir location
# [BUILD_COMMAND cmd...] # Command to drive the native build
@@ -550,6 +551,66 @@ function(_ep_set_directories name)
endfunction(_ep_set_directories)
+# IMPORTANT: this MUST be a macro and not a function because of the
+# in-place replacements that occur in each ${var}
+#
+macro(_ep_replace_location_tags target_name)
+ set(vars ${ARGN})
+ foreach(var ${vars})
+ if(${var})
+ foreach(dir SOURCE_DIR BINARY_DIR INSTALL_DIR TMP_DIR)
+ get_property(val TARGET ${target_name} PROPERTY _EP_${dir})
+ string(REPLACE "<${dir}>" "${val}" ${var} "${${var}}")
+ endforeach()
+ endif()
+ endforeach()
+endmacro()
+
+
+function(_ep_write_initial_cache target_name script_filename args)
+ # Write out values into an initial cache, that will be passed to CMake with -C
+ set(script_initial_cache "")
+ set(regex "^([^:]+):([^=]+)=(.*)$")
+ set(setArg "")
+ foreach(line ${args})
+ if("${line}" MATCHES "^-D")
+ if(setArg)
+ # This is required to build up lists in variables, or complete an entry
+ set(setArg "${setArg}${accumulator}\" CACHE ${type} \"Initial cache\" FORCE)")
+ set(script_initial_cache "${script_initial_cache}\n${setArg}")
+ set(accumulator "")
+ set(setArg "")
+ endif()
+ string(REGEX REPLACE "^-D" "" line ${line})
+ if("${line}" MATCHES "${regex}")
+ string(REGEX MATCH "${regex}" match "${line}")
+ set(name "${CMAKE_MATCH_1}")
+ set(type "${CMAKE_MATCH_2}")
+ set(value "${CMAKE_MATCH_3}")
+ set(setArg "set(${name} \"${value}")
+ else()
+ message(WARNING "Line '${line}' does not match regex. Ignoring.")
+ endif()
+ else()
+ # Assume this is a list to append to the last var
+ set(accumulator "${accumulator};${line}")
+ endif()
+ endforeach()
+ # Catch the final line of the args
+ if(setArg)
+ set(setArg "${setArg}${accumulator}\" CACHE ${type} \"Initial cache\" FORCE)")
+ set(script_initial_cache "${script_initial_cache}\n${setArg}")
+ endif()
+ # Replace location tags.
+ _ep_replace_location_tags(${target_name} script_initial_cache)
+ # Write out the initial cache file to the location specified.
+ if(NOT EXISTS "${script_filename}.in")
+ file(WRITE "${script_filename}.in" "\@script_initial_cache\@\n")
+ endif()
+ configure_file("${script_filename}.in" "${script_filename}")
+endfunction(_ep_write_initial_cache)
+
+
function(ExternalProject_Get_Property name)
foreach(var ${ARGN})
string(TOUPPER "${var}" VAR)
@@ -711,7 +772,7 @@ endif()
set(sep ";")
endif()
endforeach()
- set(code "${code}set(command \"${cmd}\")${code_execute_process}")
+ set(code "set(ENV{VS_UNICODE_OUTPUT} \"\")\n${code}set(command \"${cmd}\")${code_execute_process}")
file(WRITE ${stamp_dir}/${name}-${step}-impl.cmake "${code}")
set(command ${CMAKE_COMMAND} "-Dmake=\${make}" "-Dconfig=\${config}" -P ${stamp_dir}/${name}-${step}-impl.cmake)
endif()
@@ -721,6 +782,7 @@ endif()
set(logbase ${stamp_dir}/${name}-${step})
file(WRITE ${script} "
${code_cygpath_make}
+set(ENV{VS_UNICODE_OUTPUT} \"\")
set(command \"${command}\")
execute_process(
COMMAND \${command}
@@ -821,14 +883,7 @@ function(ExternalProject_Add_Step name step)
endif()
# Replace location tags.
- foreach(var comment command work_dir)
- if(${var})
- foreach(dir SOURCE_DIR BINARY_DIR INSTALL_DIR TMP_DIR)
- get_property(val TARGET ${name} PROPERTY _EP_${dir})
- string(REPLACE "<${dir}>" "${val}" ${var} "${${var}}")
- endforeach()
- endif()
- endforeach()
+ _ep_replace_location_tags(${name} comment command work_dir)
# Custom comment?
get_property(comment_set TARGET ${name} PROPERTY _EP_${step}_COMMENT SET)
@@ -1224,11 +1279,24 @@ function(_ep_add_configure_command name)
get_property(cmake_args TARGET ${name} PROPERTY _EP_CMAKE_ARGS)
list(APPEND cmd ${cmake_args})
+ # If there are any CMAKE_CACHE_ARGS, write an initial cache and use it
+ get_property(cmake_cache_args TARGET ${name} PROPERTY _EP_CMAKE_CACHE_ARGS)
+ if(cmake_cache_args)
+ set(_ep_cache_args_script "${tmp_dir}/${name}-cache.cmake")
+ _ep_write_initial_cache(${name} "${_ep_cache_args_script}" "${cmake_cache_args}")
+ list(APPEND cmd "-C${_ep_cache_args_script}")
+ endif()
+
get_target_property(cmake_generator ${name} _EP_CMAKE_GENERATOR)
if(cmake_generator)
list(APPEND cmd "-G${cmake_generator}" "${source_dir}")
else()
- list(APPEND cmd "-G${CMAKE_GENERATOR}" "${source_dir}")
+ if(CMAKE_EXTRA_GENERATOR)
+ list(APPEND cmd "-G${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}"
+ "${source_dir}")
+ else()
+ list(APPEND cmd "-G${CMAKE_GENERATOR}" "${source_dir}")
+ endif()
endif()
endif()
@@ -1237,10 +1305,11 @@ function(_ep_add_configure_command name)
# Fixes issue http://public.kitware.com/Bug/view.php?id=10258
#
if(NOT EXISTS ${tmp_dir}/${name}-cfgcmd.txt.in)
- file(WRITE ${tmp_dir}/${name}-cfgcmd.txt.in "cmd='@cmd@'\n")
+ file(WRITE ${tmp_dir}/${name}-cfgcmd.txt.in "cmd='\@cmd\@'\n")
endif()
configure_file(${tmp_dir}/${name}-cfgcmd.txt.in ${tmp_dir}/${name}-cfgcmd.txt)
list(APPEND file_deps ${tmp_dir}/${name}-cfgcmd.txt)
+ list(APPEND file_deps ${_ep_cache_args_script})
get_property(log TARGET ${name} PROPERTY _EP_LOG_CONFIGURE)
if(log)
diff --git a/Modules/FindALSA.cmake b/Modules/FindALSA.cmake
index 0ad7643..af84f8c 100644
--- a/Modules/FindALSA.cmake
+++ b/Modules/FindALSA.cmake
@@ -35,7 +35,7 @@ find_library(ALSA_LIBRARY NAMES asound
# handle the QUIETLY and REQUIRED arguments and set ALSA_FOUND to TRUE if
# all listed variables are TRUE
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALSA DEFAULT_MSG ALSA_LIBRARY ALSA_INCLUDE_DIR)
if(ALSA_FOUND)
diff --git a/Modules/FindASPELL.cmake b/Modules/FindASPELL.cmake
index 3319caa..d19fab4 100644
--- a/Modules/FindASPELL.cmake
+++ b/Modules/FindASPELL.cmake
@@ -26,7 +26,7 @@ FIND_LIBRARY(ASPELL_LIBRARIES NAMES aspell aspell-15 libaspell-15 libaspell)
# handle the QUIETLY and REQUIRED arguments and set ASPELL_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASPELL DEFAULT_MSG ASPELL_LIBRARIES ASPELL_INCLUDE_DIR)
MARK_AS_ADVANCED(ASPELL_INCLUDE_DIR ASPELL_LIBRARIES)
diff --git a/Modules/FindAVIFile.cmake b/Modules/FindAVIFile.cmake
index afd3800..8b5b05a 100644
--- a/Modules/FindAVIFile.cmake
+++ b/Modules/FindAVIFile.cmake
@@ -37,7 +37,7 @@ ENDIF (UNIX)
# handle the QUIETLY and REQUIRED arguments and set AVIFILE_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(AVIFile DEFAULT_MSG AVIFILE_INCLUDE_DIR AVIFILE_AVIPLAY_LIBRARY)
IF (AVIFILE_FOUND)
diff --git a/Modules/FindBISON.cmake b/Modules/FindBISON.cmake
index 1120fc1..e855a27 100644
--- a/Modules/FindBISON.cmake
+++ b/Modules/FindBISON.cmake
@@ -51,12 +51,19 @@ FIND_PROGRAM(BISON_EXECUTABLE bison DOC "path to the bison executable")
MARK_AS_ADVANCED(BISON_EXECUTABLE)
IF(BISON_EXECUTABLE)
+ # the bison commands should be executed with the C locale, otherwise
+ # the message (which are parsed) may be translated
+ SET(_Bison_SAVED_LC_ALL "$ENV{LC_ALL}")
+ SET(ENV{LC_ALL} C)
EXECUTE_PROCESS(COMMAND ${BISON_EXECUTABLE} --version
OUTPUT_VARIABLE BISON_version_output
ERROR_VARIABLE BISON_version_error
RESULT_VARIABLE BISON_version_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ SET(ENV{LC_ALL} ${_Bison_SAVED_LC_ALL})
+
IF(NOT ${BISON_version_result} EQUAL 0)
MESSAGE(SEND_ERROR "Command \"${BISON_EXECUTABLE} --version\" failed with output:\n${BISON_version_error}")
ELSE()
@@ -115,7 +122,7 @@ IF(BISON_EXECUTABLE)
IF("${ARGV5}" STREQUAL "VERBOSE")
BISON_TARGET_option_verbose(${Name} ${BisonOutput} "${ARGV6}")
ENDIF()
-
+
IF("${ARGV5}" STREQUAL "COMPILE_FLAGS")
BISON_TARGET_option_extraopts("${ARGV6}")
ENDIF()
@@ -125,10 +132,10 @@ IF(BISON_EXECUTABLE)
LIST(APPEND BISON_TARGET_cmdopt "-d")
STRING(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\2" _fileext "${ARGV2}")
STRING(REPLACE "c" "h" _fileext ${_fileext})
- STRING(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\1${_fileext}"
+ STRING(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\1${_fileext}"
BISON_${Name}_OUTPUT_HEADER "${ARGV2}")
LIST(APPEND BISON_TARGET_outputs "${BISON_${Name}_OUTPUT_HEADER}")
-
+
ADD_CUSTOM_COMMAND(OUTPUT ${BISON_TARGET_outputs}
${BISON_TARGET_extraoutputs}
COMMAND ${BISON_EXECUTABLE}
@@ -136,7 +143,7 @@ IF(BISON_EXECUTABLE)
DEPENDS ${ARGV1}
COMMENT "[BISON][${Name}] Building parser with bison ${BISON_VERSION}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-
+
# define target variables
SET(BISON_${Name}_DEFINED TRUE)
SET(BISON_${Name}_INPUT ${ARGV1})
@@ -151,7 +158,7 @@ IF(BISON_EXECUTABLE)
ENDIF(BISON_EXECUTABLE)
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON REQUIRED_VARS BISON_EXECUTABLE
VERSION_VAR BISON_VERSION)
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 94bbed5..d57513c 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -40,16 +40,11 @@
# License text for the above reference.)
get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
-if(NOT _LANGUAGES_ MATCHES Fortran)
- if(BLAS_FIND_REQUIRED)
- message(FATAL_ERROR "FindBLAS is Fortran-only so Fortran must be enabled.")
- else(BLAS_FIND_REQUIRED)
- message(STATUS "Looking for BLAS... - NOT found (Fortran not enabled)") #
- return()
- endif(BLAS_FIND_REQUIRED)
-endif(NOT _LANGUAGES_ MATCHES Fortran)
-
+if (NOT _LANGUAGES_ MATCHES Fortran)
+include(CheckFunctionExists)
+else ()
include(CheckFortranFunctionExists)
+endif()
macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _threads)
# This macro checks for the existence of the combination of fortran libraries
@@ -107,7 +102,11 @@ if(_libraries_work)
# Test this combination of libraries.
set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_threads})
# message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}")
- check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS)
+ if (_LANGUAGES_ MATCHES Fortran)
+ check_fortran_function_exists("${_name}" ${_prefix}${_combined_name}_WORKS)
+ else()
+ check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS)
+ endif()
set(CMAKE_REQUIRED_LIBRARIES)
mark_as_advanced(${_prefix}${_combined_name}_WORKS)
set(_libraries_work ${${_prefix}${_combined_name}_WORKS})
@@ -246,13 +245,24 @@ endif (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
#BLAS in acml library?
if (BLA_VENDOR STREQUAL "ACML" OR BLA_VENDOR STREQUAL "All")
+ # Either acml or acml_mp should be in LD_LIBRARY_PATH but not both
if(NOT BLAS_LIBRARIES)
check_fortran_libraries(
BLAS_LIBRARIES
BLAS
sgemm
""
- "acml"
+ "acml;acml_mv"
+ ""
+ )
+ endif(NOT BLAS_LIBRARIES)
+ if(NOT BLAS_LIBRARIES)
+ check_fortran_libraries(
+ BLAS_LIBRARIES
+ BLAS
+ sgemm
+ ""
+ "acml_mp;acml_mv"
""
)
endif(NOT BLAS_LIBRARIES)
@@ -300,6 +310,9 @@ endif (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All")
#BLAS in intel mkl 10 library? (em64t 64bit)
if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
+ if (NOT WIN32)
+ set(LM "-lm")
+ endif ()
if (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
if(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED)
find_package(Threads)
@@ -340,7 +353,7 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
sgemm
""
"mkl_blas95;mkl_intel;mkl_intel_thread;mkl_core;guide"
- "${CMAKE_THREAD_LIBS_INIT}"
+ "${CMAKE_THREAD_LIBS_INIT};${LM}"
)
endif(NOT BLAS95_LIBRARIES)
else(BLA_F95)
@@ -352,6 +365,7 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
""
"mkl_intel;mkl_intel_thread;mkl_core;guide"
"${CMAKE_THREAD_LIBS_INIT}"
+ "${LM}"
)
endif(NOT BLAS_LIBRARIES)
endif(BLA_F95)
@@ -365,7 +379,7 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
sgemm
""
"mkl_blas95;mkl_intel_lp64;mkl_intel_thread;mkl_core;guide"
- "${CMAKE_THREAD_LIBS_INIT}"
+ "${CMAKE_THREAD_LIBS_INIT};${LM}"
)
endif(NOT BLAS95_LIBRARIES)
else(BLA_F95)
@@ -376,7 +390,7 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
sgemm
""
"mkl_intel_lp64;mkl_intel_thread;mkl_core;guide"
- "${CMAKE_THREAD_LIBS_INIT}"
+ "${CMAKE_THREAD_LIBS_INIT};${LM}"
)
endif(NOT BLAS_LIBRARIES)
endif(BLA_F95)
@@ -391,7 +405,7 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
sgemm
""
"mkl;guide"
- "${CMAKE_THREAD_LIBS_INIT}"
+ "${CMAKE_THREAD_LIBS_INIT};${LM}"
)
endif(NOT BLAS_LIBRARIES)
#BLAS in intel mkl library? (static, 32bit)
@@ -402,7 +416,7 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
sgemm
""
"mkl_ia32;guide"
- "${CMAKE_THREAD_LIBS_INIT}"
+ "${CMAKE_THREAD_LIBS_INIT};${LM}"
)
endif(NOT BLAS_LIBRARIES)
#BLAS in intel mkl library? (static, em64t 64bit)
@@ -413,7 +427,7 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
sgemm
""
"mkl_em64t;guide"
- "${CMAKE_THREAD_LIBS_INIT}"
+ "${CMAKE_THREAD_LIBS_INIT};${LM}"
)
endif(NOT BLAS_LIBRARIES)
endif (_LANGUAGES_ MATCHES C OR _LANGUAGES_ MATCHES CXX)
diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake
index 0ef87fa..679c129 100644
--- a/Modules/FindBZip2.cmake
+++ b/Modules/FindBZip2.cmake
@@ -26,7 +26,7 @@ FIND_LIBRARY(BZIP2_LIBRARIES NAMES bz2 bzip2 )
# handle the QUIETLY and REQUIRED arguments and set BZip2_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BZip2 DEFAULT_MSG BZIP2_LIBRARIES BZIP2_INCLUDE_DIR)
IF (BZIP2_FOUND)
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 3ae4e14..f17e599 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -64,14 +64,15 @@
# Currently this module searches for the following version numbers:
# 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.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
#
# 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
# omit the 3rd version number from include paths if it is 0 although not all
# binary Boost releases do so.
#
-# SET(Boost_ADDITIONAL_VERSIONS "1.78" "1.78.0" "1.79" "1.79.0")
+# set(Boost_ADDITIONAL_VERSIONS "1.78" "1.78.0" "1.79" "1.79.0")
#
# ===================================== ============= ========================
#
@@ -163,6 +164,7 @@
#
# These last three variables are available also as environment variables:
+# Also, note they are completely UPPERCASE.
#
# BOOST_ROOT or BOOSTROOT The preferred installation prefix for searching for
# Boost. Set this if the module has problems finding
@@ -250,59 +252,59 @@
# And ELSE/ENDIF pairs were removed for readability.
#########################################################################
-MACRO (_Boost_ADJUST_LIB_VARS basename)
- IF (Boost_INCLUDE_DIR )
- IF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE)
+macro(_Boost_ADJUST_LIB_VARS basename)
+ if(Boost_INCLUDE_DIR )
+ if(Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE)
# if the generator supports configuration types then set
# optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
- IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- SET(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
- ELSE()
+ if(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
+ set(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
+ else()
# if there are no configuration types and CMAKE_BUILD_TYPE has no value
# then just use the release libraries
- SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} )
- ENDIF()
+ set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} )
+ endif()
# FIXME: This probably should be set for both cases
- SET(Boost_${basename}_LIBRARIES optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
- ENDIF()
+ set(Boost_${basename}_LIBRARIES optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
+ endif()
# if only the release version was found, set the debug variable also to the release version
- IF (Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG)
- SET(Boost_${basename}_LIBRARY_DEBUG ${Boost_${basename}_LIBRARY_RELEASE})
- SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE})
- SET(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE})
- ENDIF()
+ if(Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG)
+ set(Boost_${basename}_LIBRARY_DEBUG ${Boost_${basename}_LIBRARY_RELEASE})
+ set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE})
+ set(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE})
+ endif()
# if only the debug version was found, set the release variable also to the debug version
- IF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE)
- SET(Boost_${basename}_LIBRARY_RELEASE ${Boost_${basename}_LIBRARY_DEBUG})
- SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_DEBUG})
- SET(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_DEBUG})
- ENDIF()
+ if(Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE)
+ set(Boost_${basename}_LIBRARY_RELEASE ${Boost_${basename}_LIBRARY_DEBUG})
+ set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_DEBUG})
+ set(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_DEBUG})
+ endif()
- IF (Boost_${basename}_LIBRARY)
+ if(Boost_${basename}_LIBRARY)
set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library")
# Remove superfluous "debug" / "optimized" keywords from
# Boost_LIBRARY_DIRS
- FOREACH(_boost_my_lib ${Boost_${basename}_LIBRARY})
- GET_FILENAME_COMPONENT(_boost_my_lib_path "${_boost_my_lib}" PATH)
- LIST(APPEND Boost_LIBRARY_DIRS ${_boost_my_lib_path})
- ENDFOREACH()
- LIST(REMOVE_DUPLICATES Boost_LIBRARY_DIRS)
+ foreach(_boost_my_lib ${Boost_${basename}_LIBRARY})
+ get_filename_component(_boost_my_lib_path "${_boost_my_lib}" PATH)
+ list(APPEND Boost_LIBRARY_DIRS ${_boost_my_lib_path})
+ endforeach()
+ list(REMOVE_DUPLICATES Boost_LIBRARY_DIRS)
set(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory")
- SET(Boost_${basename}_FOUND ON CACHE INTERNAL "Whether the Boost ${basename} library found")
- ENDIF(Boost_${basename}_LIBRARY)
+ set(Boost_${basename}_FOUND ON CACHE INTERNAL "Whether the Boost ${basename} library found")
+ endif(Boost_${basename}_LIBRARY)
- ENDIF (Boost_INCLUDE_DIR )
+ endif(Boost_INCLUDE_DIR )
# Make variables changeble to the advanced user
- MARK_AS_ADVANCED(
+ mark_as_advanced(
Boost_${basename}_LIBRARY
Boost_${basename}_LIBRARY_RELEASE
Boost_${basename}_LIBRARY_DEBUG
)
-ENDMACRO (_Boost_ADJUST_LIB_VARS)
+endmacro(_Boost_ADJUST_LIB_VARS)
#-------------------------------------------------------------------------------
@@ -310,17 +312,17 @@ ENDMACRO (_Boost_ADJUST_LIB_VARS)
# Runs compiler with "-dumpversion" and parses major/minor
# version with a regex.
#
-FUNCTION(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION)
+function(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION)
- EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
+ exec_program(${CMAKE_CXX_COMPILER}
ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
OUTPUT_VARIABLE _boost_COMPILER_VERSION
)
- STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
+ string(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
_boost_COMPILER_VERSION ${_boost_COMPILER_VERSION})
- SET(${_OUTPUT_VERSION} ${_boost_COMPILER_VERSION} PARENT_SCOPE)
-ENDFUNCTION()
+ set(${_OUTPUT_VERSION} ${_boost_COMPILER_VERSION} PARENT_SCOPE)
+endfunction()
#
# A convenience function for marking desired components
@@ -355,6 +357,13 @@ function(_Boost_SWAP_WITH_REALPATH _library _docstring)
endif()
endfunction()
+function(_Boost_CHECK_SPELLING _var)
+ if(${_var})
+ string(TOUPPER ${_var} _var_UC)
+ message(FATAL_ERROR "ERROR: ${_var} is not the correct spelling. The proper spelling is ${_var_UC}.")
+ endif()
+endfunction()
+
#
# End functions/macros
#
@@ -363,9 +372,9 @@ endfunction()
-IF(NOT DEFINED Boost_USE_MULTITHREADED)
- SET(Boost_USE_MULTITHREADED TRUE)
-ENDIF()
+if(NOT DEFINED Boost_USE_MULTITHREADED)
+ set(Boost_USE_MULTITHREADED TRUE)
+endif()
if(Boost_FIND_VERSION_EXACT)
# The version may appear in a directory with or without the patch
@@ -377,7 +386,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.44.0" "1.44" "1.43.0" "1.43" "1.42.0" "1.42"
+ "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"
"1.34" "1.33.1" "1.33.0" "1.33")
@@ -406,49 +415,47 @@ endif(Boost_FIND_VERSION_EXACT)
# Boost.
set(Boost_ERROR_REASON)
-SET( _boost_IN_CACHE TRUE)
-IF(Boost_INCLUDE_DIR)
+set( _boost_IN_CACHE TRUE)
+if(Boost_INCLUDE_DIR)
# On versions < 1.35, remove the System library from the considered list
# since it wasn't added until 1.35.
if(Boost_VERSION AND Boost_FIND_COMPONENTS)
- math(EXPR _boost_maj "${Boost_VERSION} / 100000")
- math(EXPR _boost_min "${Boost_VERSION} / 100 % 1000")
- if(${_boost_maj}.${_boost_min} VERSION_LESS 1.35)
+ if(Boost_VERSION LESS 103500)
list(REMOVE_ITEM Boost_FIND_COMPONENTS system)
endif()
endif()
- FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
- STRING(TOUPPER ${COMPONENT} COMPONENT)
- IF(NOT Boost_${COMPONENT}_FOUND)
- SET( _boost_IN_CACHE FALSE)
- ENDIF(NOT Boost_${COMPONENT}_FOUND)
- ENDFOREACH(COMPONENT)
-ELSE(Boost_INCLUDE_DIR)
- SET( _boost_IN_CACHE FALSE)
-ENDIF(Boost_INCLUDE_DIR)
-
-IF (_boost_IN_CACHE)
+ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
+ string(TOUPPER ${COMPONENT} COMPONENT)
+ if(NOT Boost_${COMPONENT}_FOUND)
+ set( _boost_IN_CACHE FALSE)
+ endif(NOT Boost_${COMPONENT}_FOUND)
+ endforeach(COMPONENT)
+else(Boost_INCLUDE_DIR)
+ set( _boost_IN_CACHE FALSE)
+endif(Boost_INCLUDE_DIR)
+
+if(_boost_IN_CACHE)
# in cache already
- SET(Boost_FOUND TRUE)
- FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
- STRING(TOUPPER ${COMPONENT} COMPONENT)
+ set(Boost_FOUND TRUE)
+ foreach(COMPONENT ${Boost_FIND_COMPONENTS})
+ string(TOUPPER ${COMPONENT} COMPONENT)
_Boost_ADJUST_LIB_VARS( ${COMPONENT} )
- SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${COMPONENT}_LIBRARY})
- ENDFOREACH(COMPONENT)
- SET(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR})
- IF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
- MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000")
- MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000")
- MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100")
- ENDIF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
+ set(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${COMPONENT}_LIBRARY})
+ endforeach(COMPONENT)
+ set(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR})
+ if(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
+ math(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000")
+ math(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000")
+ math(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100")
+ endif(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"boost ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} "
"is already in the cache. To view debugging messages, please clear the cache.")
endif()
-ELSE (_boost_IN_CACHE)
+else(_boost_IN_CACHE)
# Need to search for boost
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
@@ -468,7 +475,7 @@ ELSE (_boost_IN_CACHE)
"Boost_NO_SYSTEM_PATHS = ${Boost_NO_SYSTEM_PATHS}")
endif()
- IF(WIN32)
+ if(WIN32)
# In windows, automatic linking is performed, so you do not have
# to specify the libraries. If you are linking to a dynamic
# runtime, then you can choose to link to either a static or a
@@ -477,18 +484,18 @@ ELSE (_boost_IN_CACHE)
# BOOST_WHATEVER_DYN_LINK to force Boost library "whatever" to be
# linked dynamically. Alternatively you can force all Boost
# libraries to dynamic link by defining BOOST_ALL_DYN_LINK.
-
+
# This feature can be disabled for Boost library "whatever" by
# defining BOOST_WHATEVER_NO_LIB, or for all of Boost by defining
# BOOST_ALL_NO_LIB.
-
+
# If you want to observe which libraries are being linked against
# then defining BOOST_LIB_DIAGNOSTIC will cause the auto-linking
# code to emit a #pragma message each time a library is selected
# for linking.
- SET(Boost_LIB_DIAGNOSTIC_DEFINITIONS
+ set(Boost_LIB_DIAGNOSTIC_DEFINITIONS
"-DBOOST_LIB_DIAGNOSTIC" CACHE STRING "Boost diagnostic define")
- ENDIF(WIN32)
+ endif(WIN32)
set(_boost_INCLUDE_SEARCH_DIRS_SYSTEM
C:/boost/include
@@ -498,36 +505,33 @@ ELSE (_boost_IN_CACHE)
/sw/local/include
)
- # If Boost_ROOT was defined, gently correct the user
- if(Boost_ROOT)
- message("WARNING: Boost_ROOT was set which is incorrect and is being ignored. "
- "You need to use BOOST_ROOT instead. "
- "Also, we suggest setting Boost_NO_SYSTEM_PATHS.")
- endif()
+ _Boost_CHECK_SPELLING(Boost_ROOT)
+ _Boost_CHECK_SPELLING(Boost_LIBRARYDIR)
+ _Boost_CHECK_SPELLING(Boost_INCLUDEDIR)
# If BOOST_ROOT was defined in the environment, use it.
if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "")
set(BOOST_ROOT $ENV{BOOST_ROOT})
- endif(NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "")
+ endif()
# If BOOSTROOT was defined in the environment, use it.
if (NOT BOOST_ROOT AND NOT $ENV{BOOSTROOT} STREQUAL "")
set(BOOST_ROOT $ENV{BOOSTROOT})
- endif(NOT BOOST_ROOT AND NOT $ENV{BOOSTROOT} STREQUAL "")
+ endif()
# If BOOST_INCLUDEDIR was defined in the environment, use it.
- IF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" )
+ if( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" )
set(BOOST_INCLUDEDIR $ENV{BOOST_INCLUDEDIR})
- ENDIF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" )
-
+ endif()
+
# If BOOST_LIBRARYDIR was defined in the environment, use it.
- IF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" )
+ if( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" )
set(BOOST_LIBRARYDIR $ENV{BOOST_LIBRARYDIR})
- ENDIF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" )
-
- IF( BOOST_ROOT )
+ endif()
+
+ if( BOOST_ROOT )
file(TO_CMAKE_PATH ${BOOST_ROOT} BOOST_ROOT)
- ENDIF( BOOST_ROOT )
+ endif()
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
@@ -563,33 +567,33 @@ ELSE (_boost_IN_CACHE)
endif( BOOST_INCLUDEDIR )
# ------------------------------------------------------------------------
- # Search for Boost include DIR
+ # Search for Boost include DIR
# ------------------------------------------------------------------------
# Try to find Boost by stepping backwards through the Boost versions
# we know about.
- IF( NOT Boost_INCLUDE_DIR )
+ if( NOT Boost_INCLUDE_DIR )
# Build a list of path suffixes for each version.
- SET(_boost_PATH_SUFFIXES)
- FOREACH(_boost_VER ${_boost_TEST_VERSIONS})
+ set(_boost_PATH_SUFFIXES)
+ foreach(_boost_VER ${_boost_TEST_VERSIONS})
# Add in a path suffix, based on the required version, ideally
# we could read this from version.hpp, but for that to work we'd
# need to know the include dir already
set(_boost_BOOSTIFIED_VERSION)
# Transform 1.35 => 1_35 and 1.36.0 => 1_36_0
- IF(_boost_VER MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
- STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3"
+ if(_boost_VER MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
+ string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3"
_boost_BOOSTIFIED_VERSION ${_boost_VER})
- ELSEIF(_boost_VER MATCHES "[0-9]+\\.[0-9]+")
- STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2"
+ elseif(_boost_VER MATCHES "[0-9]+\\.[0-9]+")
+ string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2"
_boost_BOOSTIFIED_VERSION ${_boost_VER})
- ENDIF()
-
+ endif()
+
list(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}")
list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}")
- ENDFOREACH(_boost_VER)
-
+ endforeach(_boost_VER)
+
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"Include debugging info:")
@@ -600,62 +604,62 @@ ELSE (_boost_IN_CACHE)
endif()
# Look for a standard boost header file.
- FIND_PATH(Boost_INCLUDE_DIR
+ find_path(Boost_INCLUDE_DIR
NAMES boost/config.hpp
HINTS ${_boost_INCLUDE_SEARCH_DIRS}
PATH_SUFFIXES ${_boost_PATH_SUFFIXES}
${_boost_FIND_OPTIONS}
)
- ENDIF( NOT Boost_INCLUDE_DIR )
-
+ endif( NOT Boost_INCLUDE_DIR )
+
# ------------------------------------------------------------------------
# Extract version information from version.hpp
# ------------------------------------------------------------------------
- IF(Boost_INCLUDE_DIR)
+ if(Boost_INCLUDE_DIR)
# Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp
# Read the whole file:
#
- SET(BOOST_VERSION 0)
- SET(BOOST_LIB_VERSION "")
- FILE(READ "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS)
+ set(BOOST_VERSION 0)
+ set(BOOST_LIB_VERSION "")
+ file(READ "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS)
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"location of version.hpp: ${Boost_INCLUDE_DIR}/boost/version.hpp")
endif()
-
- STRING(REGEX REPLACE ".*#define BOOST_VERSION ([0-9]+).*" "\\1" Boost_VERSION "${_boost_VERSION_HPP_CONTENTS}")
- STRING(REGEX REPLACE ".*#define BOOST_LIB_VERSION \"([0-9_]+)\".*" "\\1" Boost_LIB_VERSION "${_boost_VERSION_HPP_CONTENTS}")
-
- SET(Boost_LIB_VERSION ${Boost_LIB_VERSION} CACHE INTERNAL "The library version string for boost libraries")
- SET(Boost_VERSION ${Boost_VERSION} CACHE INTERNAL "The version number for boost libraries")
-
- IF(NOT "${Boost_VERSION}" STREQUAL "0")
- MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000")
- MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000")
- MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100")
+
+ string(REGEX REPLACE ".*#define BOOST_VERSION ([0-9]+).*" "\\1" Boost_VERSION "${_boost_VERSION_HPP_CONTENTS}")
+ string(REGEX REPLACE ".*#define BOOST_LIB_VERSION \"([0-9_]+)\".*" "\\1" Boost_LIB_VERSION "${_boost_VERSION_HPP_CONTENTS}")
+
+ set(Boost_LIB_VERSION ${Boost_LIB_VERSION} CACHE INTERNAL "The library version string for boost libraries")
+ set(Boost_VERSION ${Boost_VERSION} CACHE INTERNAL "The version number for boost libraries")
+
+ if(NOT "${Boost_VERSION}" STREQUAL "0")
+ math(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000")
+ math(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000")
+ math(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100")
set(Boost_ERROR_REASON
"${Boost_ERROR_REASON}Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}")
- ENDIF(NOT "${Boost_VERSION}" STREQUAL "0")
+ endif(NOT "${Boost_VERSION}" STREQUAL "0")
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"version.hpp reveals boost "
"${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
endif()
- ELSE(Boost_INCLUDE_DIR)
+ else(Boost_INCLUDE_DIR)
set(Boost_ERROR_REASON
"${Boost_ERROR_REASON}Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.")
- ENDIF(Boost_INCLUDE_DIR)
-
+ endif(Boost_INCLUDE_DIR)
+
# ------------------------------------------------------------------------
# Suffix initialization and compiler suffix detection.
# ------------------------------------------------------------------------
# Setting some more suffixes for the library
- SET (Boost_LIB_PREFIX "")
+ set(Boost_LIB_PREFIX "")
if ( WIN32 AND Boost_USE_STATIC_LIBS AND NOT CYGWIN)
- SET (Boost_LIB_PREFIX "lib")
+ set(Boost_LIB_PREFIX "lib")
endif()
if (Boost_COMPILER)
@@ -670,7 +674,7 @@ ELSE (_boost_IN_CACHE)
# please report them and use the Boost_COMPILER variable
# to work around the problems.
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"
- OR "${CMAKE_CXX_COMPILER}" MATCHES "icl"
+ OR "${CMAKE_CXX_COMPILER}" MATCHES "icl"
OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
if(WIN32)
set (_boost_COMPILER "-iw")
@@ -678,54 +682,54 @@ ELSE (_boost_IN_CACHE)
set (_boost_COMPILER "-il")
endif()
elseif (MSVC90)
- SET (_boost_COMPILER "-vc90")
+ set(_boost_COMPILER "-vc90")
elseif (MSVC10)
- SET (_boost_COMPILER "-vc100")
+ set(_boost_COMPILER "-vc100")
elseif (MSVC80)
- SET (_boost_COMPILER "-vc80")
+ set(_boost_COMPILER "-vc80")
elseif (MSVC71)
- SET (_boost_COMPILER "-vc71")
+ set(_boost_COMPILER "-vc71")
elseif (MSVC70) # Good luck!
- SET (_boost_COMPILER "-vc7") # yes, this is correct
+ set(_boost_COMPILER "-vc7") # yes, this is correct
elseif (MSVC60) # Good luck!
- SET (_boost_COMPILER "-vc6") # yes, this is correct
+ set(_boost_COMPILER "-vc6") # yes, this is correct
elseif (BORLAND)
- SET (_boost_COMPILER "-bcb")
+ set(_boost_COMPILER "-bcb")
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "SunPro")
set(_boost_COMPILER "-sw")
elseif (MINGW)
if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34)
- SET(_boost_COMPILER "-mgw") # no GCC version encoding prior to 1.34
+ set(_boost_COMPILER "-mgw") # no GCC version encoding prior to 1.34
else()
_Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION)
- SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}")
+ set(_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}")
endif()
elseif (UNIX)
if (CMAKE_COMPILER_IS_GNUCXX)
if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34)
- SET(_boost_COMPILER "-gcc") # no GCC version encoding prior to 1.34
+ set(_boost_COMPILER "-gcc") # no GCC version encoding prior to 1.34
else()
_Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION)
# Determine which version of GCC we have.
- IF(APPLE)
- IF(Boost_MINOR_VERSION)
- IF(${Boost_MINOR_VERSION} GREATER 35)
+ if(APPLE)
+ if(Boost_MINOR_VERSION)
+ if(${Boost_MINOR_VERSION} GREATER 35)
# In Boost 1.36.0 and newer, the mangled compiler name used
# on Mac OS X/Darwin is "xgcc".
- SET(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}")
- ELSE(${Boost_MINOR_VERSION} GREATER 35)
+ set(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}")
+ else(${Boost_MINOR_VERSION} GREATER 35)
# In Boost <= 1.35.0, there is no mangled compiler name for
# the Mac OS X/Darwin version of GCC.
- SET(_boost_COMPILER "")
- ENDIF(${Boost_MINOR_VERSION} GREATER 35)
- ELSE(Boost_MINOR_VERSION)
+ set(_boost_COMPILER "")
+ endif(${Boost_MINOR_VERSION} GREATER 35)
+ else(Boost_MINOR_VERSION)
# We don't know the Boost version, so assume it's
# pre-1.36.0.
- SET(_boost_COMPILER "")
- ENDIF(Boost_MINOR_VERSION)
- ELSE()
- SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}")
- ENDIF()
+ set(_boost_COMPILER "")
+ endif(Boost_MINOR_VERSION)
+ else()
+ set(_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}")
+ endif()
endif()
endif (CMAKE_COMPILER_IS_GNUCXX)
endif()
@@ -916,6 +920,7 @@ ELSE (_boost_IN_CACHE)
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
${Boost_LIB_PREFIX}boost_${COMPONENT} )
if(_boost_STATIC_RUNTIME_WORKAROUND)
@@ -957,13 +962,13 @@ ELSE (_boost_IN_CACHE)
# End finding boost libraries
# ------------------------------------------------------------------------
- SET(Boost_INCLUDE_DIRS
+ set(Boost_INCLUDE_DIRS
${Boost_INCLUDE_DIR}
)
- SET(Boost_FOUND FALSE)
- IF(Boost_INCLUDE_DIR)
- SET( Boost_FOUND TRUE )
+ set(Boost_FOUND FALSE)
+ if(Boost_INCLUDE_DIR)
+ set( Boost_FOUND TRUE )
# Check the version of Boost against the requested version.
if (Boost_FIND_VERSION AND NOT Boost_FIND_VERSION_MINOR)
@@ -998,7 +1003,7 @@ ELSE (_boost_IN_CACHE)
if (NOT Boost_FIND_VERSION_PATCH)
set(Boost_FIND_VERSION_PATCH 0)
endif (NOT Boost_FIND_VERSION_PATCH)
-
+
# We'll set Boost_FOUND true again if we have an exact version match.
set(Boost_FOUND FALSE)
_Boost_MARK_COMPONENTS_FOUND(OFF)
@@ -1017,7 +1022,7 @@ ELSE (_boost_IN_CACHE)
set(Boost_ERROR_REASON
"${Boost_ERROR_REASON}\nDetected version of Boost is too ${_Boost_VERSION_AGE}. Requested version was ${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
if (Boost_FIND_VERSION_PATCH)
- set(Boost_ERROR_REASON
+ set(Boost_ERROR_REASON
"${Boost_ERROR_REASON}.${Boost_FIND_VERSION_PATCH}")
endif (Boost_FIND_VERSION_PATCH)
if (NOT Boost_FIND_VERSION_EXACT)
@@ -1036,7 +1041,7 @@ ELSE (_boost_IN_CACHE)
string(TOLOWER ${COMPONENT} COMPONENT)
list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT})
set( Boost_FOUND FALSE)
- endif(NOT Boost_${COMPONENT}_FOUND)
+ endif()
endforeach(COMPONENT)
if(Boost_DEBUG)
@@ -1057,67 +1062,67 @@ ELSE (_boost_IN_CACHE)
list(LENGTH _Boost_MISSING_COMPONENTS Boost_NUM_MISSING_COMPONENTS)
if (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS})
set(Boost_ERROR_REASON
- "${Boost_ERROR_REASON}No Boost libraries were found. You may need to set Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.")
+ "${Boost_ERROR_REASON}No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.")
else (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS})
set(Boost_ERROR_REASON
- "${Boost_ERROR_REASON}Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.")
+ "${Boost_ERROR_REASON}Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.")
endif (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS})
endif (_Boost_MISSING_COMPONENTS)
- IF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT )
+ if( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT )
# Compatibility Code for backwards compatibility with CMake
# 2.4's FindBoost module.
# Look for the boost library path.
# Note that the user may not have installed any libraries
# so it is quite possible the Boost_LIBRARY_PATH may not exist.
- SET(_boost_LIB_DIR ${Boost_INCLUDE_DIR})
-
- IF("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+")
- GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH)
- ENDIF ("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+")
-
- IF("${_boost_LIB_DIR}" MATCHES "/include$")
+ set(_boost_LIB_DIR ${Boost_INCLUDE_DIR})
+
+ if("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+")
+ get_filename_component(_boost_LIB_DIR ${_boost_LIB_DIR} PATH)
+ endif()
+
+ if("${_boost_LIB_DIR}" MATCHES "/include$")
# Strip off the trailing "/include" in the path.
- GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH)
- ENDIF("${_boost_LIB_DIR}" MATCHES "/include$")
-
- IF(EXISTS "${_boost_LIB_DIR}/lib")
- SET (_boost_LIB_DIR ${_boost_LIB_DIR}/lib)
- ELSE(EXISTS "${_boost_LIB_DIR}/lib")
- IF(EXISTS "${_boost_LIB_DIR}/stage/lib")
- SET(_boost_LIB_DIR ${_boost_LIB_DIR}/stage/lib)
- ELSE(EXISTS "${_boost_LIB_DIR}/stage/lib")
- SET(_boost_LIB_DIR "")
- ENDIF(EXISTS "${_boost_LIB_DIR}/stage/lib")
- ENDIF(EXISTS "${_boost_LIB_DIR}/lib")
-
- IF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}")
- SET(Boost_LIBRARY_DIRS ${_boost_LIB_DIR} CACHE FILEPATH "Boost library directory")
- ENDIF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}")
+ get_filename_component(_boost_LIB_DIR ${_boost_LIB_DIR} PATH)
+ endif()
+
+ if(EXISTS "${_boost_LIB_DIR}/lib")
+ set(_boost_LIB_DIR ${_boost_LIB_DIR}/lib)
+ else()
+ if(EXISTS "${_boost_LIB_DIR}/stage/lib")
+ set(_boost_LIB_DIR ${_boost_LIB_DIR}/stage/lib)
+ else()
+ set(_boost_LIB_DIR "")
+ endif()
+ endif()
+
+ if(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}")
+ set(Boost_LIBRARY_DIRS ${_boost_LIB_DIR} CACHE FILEPATH "Boost library directory")
+ endif()
- ENDIF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT )
+ endif( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT )
- ELSE(Boost_INCLUDE_DIR)
- SET( Boost_FOUND FALSE)
- ENDIF(Boost_INCLUDE_DIR)
+ else(Boost_INCLUDE_DIR)
+ set( Boost_FOUND FALSE)
+ endif(Boost_INCLUDE_DIR)
- IF (Boost_FOUND)
- IF (NOT Boost_FIND_QUIETLY)
- MESSAGE(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
+ if(Boost_FOUND)
+ if(NOT Boost_FIND_QUIETLY)
+ message(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
if(Boost_FIND_COMPONENTS)
message(STATUS "Found the following Boost libraries:")
endif()
- ENDIF(NOT Boost_FIND_QUIETLY)
- FOREACH ( COMPONENT ${Boost_FIND_COMPONENTS} )
- STRING( TOUPPER ${COMPONENT} UPPERCOMPONENT )
- IF ( Boost_${UPPERCOMPONENT}_FOUND )
- IF (NOT Boost_FIND_QUIETLY)
- MESSAGE (STATUS " ${COMPONENT}")
- ENDIF(NOT Boost_FIND_QUIETLY)
- SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${UPPERCOMPONENT}_LIBRARY})
- ENDIF ( Boost_${UPPERCOMPONENT}_FOUND )
- ENDFOREACH(COMPONENT)
+ endif(NOT Boost_FIND_QUIETLY)
+ foreach( COMPONENT ${Boost_FIND_COMPONENTS} )
+ string( TOUPPER ${COMPONENT} UPPERCOMPONENT )
+ if( Boost_${UPPERCOMPONENT}_FOUND )
+ if(NOT Boost_FIND_QUIETLY)
+ message (STATUS " ${COMPONENT}")
+ endif(NOT Boost_FIND_QUIETLY)
+ set(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${UPPERCOMPONENT}_LIBRARY})
+ endif( Boost_${UPPERCOMPONENT}_FOUND )
+ endforeach(COMPONENT)
else()
if(Boost_FIND_REQUIRED)
message(SEND_ERROR "Unable to find the requested Boost libraries.\n${Boost_ERROR_REASON}")
@@ -1137,9 +1142,8 @@ ELSE (_boost_IN_CACHE)
endif()
# show the Boost_INCLUDE_DIRS AND Boost_LIBRARIES variables only in the advanced view
- MARK_AS_ADVANCED(Boost_INCLUDE_DIR
+ mark_as_advanced(Boost_INCLUDE_DIR
Boost_INCLUDE_DIRS
Boost_LIBRARY_DIRS
)
-ENDIF(_boost_IN_CACHE)
-
+endif(_boost_IN_CACHE)
diff --git a/Modules/FindBullet.cmake b/Modules/FindBullet.cmake
index 50c8527..cebb828 100644
--- a/Modules/FindBullet.cmake
+++ b/Modules/FindBullet.cmake
@@ -31,7 +31,7 @@ macro(_FIND_BULLET_LIBRARY _var)
find_library(${_var}
NAMES
${ARGN}
- PATHS
+ HINTS
${BULLET_ROOT}
${BULLET_ROOT}/out/release8/libs
${BULLET_ROOT}/out/debug8/libs
@@ -50,9 +50,10 @@ macro(_BULLET_APPEND_LIBRARIES _list _release)
endmacro()
find_path(BULLET_INCLUDE_DIR NAMES btBulletCollisionCommon.h
- PATHS
+ HINTS
${BULLET_ROOT}/include
${BULLET_ROOT}/src
+ PATH_SUFFIXES bullet
)
# Find the libraries
@@ -69,7 +70,7 @@ _FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY_DEBUG BulletSoftBody_d)
# handle the QUIETLY and REQUIRED arguments and set BULLET_FOUND to TRUE if
# all listed variables are TRUE
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Bullet DEFAULT_MSG
BULLET_DYNAMICS_LIBRARY BULLET_COLLISION_LIBRARY BULLET_MATH_LIBRARY
BULLET_SOFTBODY_LIBRARY BULLET_INCLUDE_DIR)
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 91215d5..d5ef430 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -684,7 +684,7 @@ set(CUDA_TOOLKIT_ROOT_DIR_INTERNAL "${CUDA_TOOLKIT_ROOT_DIR}" CACHE INTERNAL
set(CUDA_SDK_ROOT_DIR_INTERNAL "${CUDA_SDK_ROOT_DIR}" CACHE INTERNAL
"This is the value of the last time CUDA_SDK_ROOT_DIR was set successfully." FORCE)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(CUDA
REQUIRED_VARS
CUDA_TOOLKIT_ROOT_DIR
diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake
index 68aca2d..36f3841 100644
--- a/Modules/FindCURL.cmake
+++ b/Modules/FindCURL.cmake
@@ -34,7 +34,7 @@ MARK_AS_ADVANCED(CURL_LIBRARY)
# handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL DEFAULT_MSG CURL_LIBRARY CURL_INCLUDE_DIR)
IF(CURL_FOUND)
diff --git a/Modules/FindCVS.cmake b/Modules/FindCVS.cmake
index 844a485..57680bd 100644
--- a/Modules/FindCVS.cmake
+++ b/Modules/FindCVS.cmake
@@ -65,5 +65,5 @@ mark_as_advanced(CVS_EXECUTABLE)
# Handle the QUIETLY and REQUIRED arguments and set CVS_FOUND to TRUE if
# all listed variables are TRUE
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(CVS DEFAULT_MSG CVS_EXECUTABLE)
diff --git a/Modules/FindCoin3D.cmake b/Modules/FindCoin3D.cmake
index d8b103a..8bfe97a 100644
--- a/Modules/FindCoin3D.cmake
+++ b/Modules/FindCoin3D.cmake
@@ -76,7 +76,7 @@ ENDIF (WIN32)
# handle the QUIETLY and REQUIRED arguments and set COIN3D_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Coin3D DEFAULT_MSG COIN3D_LIBRARIES COIN3D_INCLUDE_DIRS)
MARK_AS_ADVANCED(COIN3D_INCLUDE_DIRS COIN3D_LIBRARIES )
diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake
index 4fb6c36..d1e1311 100644
--- a/Modules/FindCurses.cmake
+++ b/Modules/FindCurses.cmake
@@ -155,7 +155,7 @@ SET(CURSES_INCLUDE_DIR ${CURSES_INCLUDE_PATH})
# handle the QUIETLY and REQUIRED arguments and set CURSES_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Curses DEFAULT_MSG
CURSES_LIBRARY CURSES_INCLUDE_PATH)
diff --git a/Modules/FindCxxTest.cmake b/Modules/FindCxxTest.cmake
index 4ff6eba..4ff310c 100644
--- a/Modules/FindCxxTest.cmake
+++ b/Modules/FindCxxTest.cmake
@@ -97,6 +97,11 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
+# Version 1.4 (11/18/10) (CMake 2.8.4)
+# Issue 11384: Added support to the CXX_ADD_TEST macro so header
+# files (containing the tests themselves) show up in
+# Visual Studio and other IDEs.
+#
# Version 1.3 (8/19/10) (CMake 2.8.3)
# Included patch by Simone Rossetto to check if either Python or Perl
# are present in the system. Whichever intepreter that is detected
@@ -131,7 +136,7 @@ macro(CXXTEST_ADD_TEST _cxxtest_testname _cxxtest_outfname)
)
set_source_files_properties(${_cxxtest_real_outfname} PROPERTIES GENERATED true)
- add_executable(${_cxxtest_testname} ${_cxxtest_real_outfname})
+ add_executable(${_cxxtest_testname} ${_cxxtest_real_outfname} ${ARGN})
if(CMAKE_RUNTIME_OUTPUT_DIRECTORY)
add_test(${_cxxtest_testname} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_cxxtest_testname})
@@ -160,7 +165,7 @@ find_program(CXXTEST_PERL_TESTGEN_EXECUTABLE cxxtestgen.pl
PATHS ${CXXTEST_INCLUDE_DIR})
if(PYTHONINTERP_FOUND OR PERL_FOUND)
- include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+ include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
if(PYTHONINTERP_FOUND AND (CXXTEST_USE_PYTHON OR NOT PERL_FOUND))
set(CXXTEST_TESTGEN_EXECUTABLE ${CXXTEST_PYTHON_TESTGEN_EXECUTABLE})
diff --git a/Modules/FindDCMTK.cmake b/Modules/FindDCMTK.cmake
index 0bd8481..0ac22f8 100644
--- a/Modules/FindDCMTK.cmake
+++ b/Modules/FindDCMTK.cmake
@@ -132,7 +132,7 @@ if(DCMTK_ofstd_INCLUDE_DIR)
mark_as_advanced(DCMTK_dcmtk_INCLUDE_DIR)
endif()
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(DCMTK DEFAULT_MSG
DCMTK_config_INCLUDE_DIR
DCMTK_ofstd_INCLUDE_DIR
diff --git a/Modules/FindDart.cmake b/Modules/FindDart.cmake
index afe5cf1..f7c54df 100644
--- a/Modules/FindDart.cmake
+++ b/Modules/FindDart.cmake
@@ -30,7 +30,7 @@ FIND_PATH(DART_ROOT README.INSTALL
# handle the QUIETLY and REQUIRED arguments and set DART_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Dart DEFAULT_MSG DART_ROOT)
MARK_AS_ADVANCED(DART_ROOT)
diff --git a/Modules/FindDevIL.cmake b/Modules/FindDevIL.cmake
index 72d70d5..0e21284 100644
--- a/Modules/FindDevIL.cmake
+++ b/Modules/FindDevIL.cmake
@@ -25,7 +25,7 @@
# TODO: Add version support.
# Tested under Linux and Windows (MSVC)
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PATH(IL_INCLUDE_DIR il.h
PATH_SUFFIXES include IL
diff --git a/Modules/FindDoxygen.cmake b/Modules/FindDoxygen.cmake
index cc69d60..e5428ae 100644
--- a/Modules/FindDoxygen.cmake
+++ b/Modules/FindDoxygen.cmake
@@ -76,7 +76,7 @@ FIND_PROGRAM(DOXYGEN_EXECUTABLE
DOC "Doxygen documentation generation tool (http://www.doxygen.org)"
)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Doxygen DEFAULT_MSG DOXYGEN_EXECUTABLE)
#
diff --git a/Modules/FindEXPAT.cmake b/Modules/FindEXPAT.cmake
index e97c31e..8551fd6 100644
--- a/Modules/FindEXPAT.cmake
+++ b/Modules/FindEXPAT.cmake
@@ -26,7 +26,7 @@ FIND_LIBRARY(EXPAT_LIBRARY NAMES expat libexpat)
# handle the QUIETLY and REQUIRED arguments and set EXPAT_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EXPAT DEFAULT_MSG EXPAT_LIBRARY EXPAT_INCLUDE_DIR)
# Copy the results to the output variables.
diff --git a/Modules/FindFLEX.cmake b/Modules/FindFLEX.cmake
index 272cdc7..3cc3da5 100644
--- a/Modules/FindFLEX.cmake
+++ b/Modules/FindFLEX.cmake
@@ -36,8 +36,8 @@
# find_package(BISON)
# find_package(FLEX)
#
-# BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp
-# FLEX_TARGET(MyScanner lexer.l ${CMAKE_CURRENT_BIANRY_DIR}/lexer.cpp)
+# BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
+# FLEX_TARGET(MyScanner lexer.l ${CMAKE_CURRENT_BINARY_DIR}/lexer.cpp)
# ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser)
#
# include_directories(${CMAKE_CURRENT_BINARY_DIR})
@@ -143,7 +143,7 @@ IF(FLEX_EXECUTABLE)
ENDIF(FLEX_EXECUTABLE)
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FLEX REQUIRED_VARS FLEX_EXECUTABLE
VERSION_VAR FLEX_VERSION)
diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake
index eb5db81..bb18a2e 100644
--- a/Modules/FindFLTK.cmake
+++ b/Modules/FindFLTK.cmake
@@ -292,7 +292,7 @@ ENDIF(NOT FLTK_DIR)
ENDIF()
LIST(APPEND FLTK_LIBRARIES ${FLTK_BASE_LIBRARY})
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
IF(FLTK_SKIP_FLUID)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FLTK DEFAULT_MSG FLTK_LIBRARIES FLTK_INCLUDE_DIR)
ELSE()
diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake
index 0adfdc2..8957b64 100644
--- a/Modules/FindFreetype.cmake
+++ b/Modules/FindFreetype.cmake
@@ -88,7 +88,7 @@ SET(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}")
# handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype DEFAULT_MSG FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS)
diff --git a/Modules/FindGDAL.cmake b/Modules/FindGDAL.cmake
index 4bc1580..c31bef5 100644
--- a/Modules/FindGDAL.cmake
+++ b/Modules/FindGDAL.cmake
@@ -100,7 +100,7 @@ FIND_LIBRARY(GDAL_LIBRARY
/usr/freeware
)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDAL DEFAULT_MSG GDAL_LIBRARY GDAL_INCLUDE_DIR)
set(GDAL_LIBRARIES ${GDAL_LIBRARY})
diff --git a/Modules/FindGIF.cmake b/Modules/FindGIF.cmake
index 784b4ec..1fad07d 100644
--- a/Modules/FindGIF.cmake
+++ b/Modules/FindGIF.cmake
@@ -60,7 +60,7 @@ SET(GIF_LIBRARIES ${GIF_LIBRARY})
# handle the QUIETLY and REQUIRED arguments and set GIF_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GIF DEFAULT_MSG GIF_LIBRARY GIF_INCLUDE_DIR)
MARK_AS_ADVANCED(GIF_INCLUDE_DIR GIF_LIBRARY)
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake
index 45df79e..af88997 100644
--- a/Modules/FindGLUT.cmake
+++ b/Modules/FindGLUT.cmake
@@ -23,7 +23,7 @@
IF (WIN32)
FIND_PATH( GLUT_INCLUDE_DIR NAMES GL/glut.h
PATHS ${GLUT_ROOT_PATH}/include )
- FIND_LIBRARY( GLUT_glut_LIBRARY NAMES glut glut32
+ FIND_LIBRARY( GLUT_glut_LIBRARY NAMES glut glut32 freeglut
PATHS
${OPENGL_LIBRARY_DIR}
${GLUT_ROOT_PATH}/Release
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index d8b4f63..a03c023 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -66,6 +66,10 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
+# Version 1.3 (11/9/2010) (CMake 2.8.4)
+# * 11429: Add support for detecting GTK2 built with Visual Studio 10.
+# Thanks to Vincent Levesque for the patch.
+
# Version 1.2 (8/30/2010) (CMake 2.8.3)
# * Merge patch for detecting gdk-pixbuf library (split off
# from core GTK in 2.21). Thanks to Vincent Untz for the patch
@@ -237,15 +241,16 @@ function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version)
set(_library ${_lib})
- if(_expand_vc)
- # Add vc80/vc90 midfixes
+ if(_expand_vc AND MSVC)
+ # Add vc80/vc90/vc100 midfixes
if(MSVC80)
set(_library ${_library}-vc80)
- set(_library_d ${_library}-d)
elseif(MSVC90)
set(_library ${_library}-vc90)
- set(_library_d ${_library}-d)
+ elseif(MSVC10)
+ set(_library ${_library}-vc100)
endif()
+ set(_library_d ${_library}-d)
endif()
if(GTK2_DEBUG)
@@ -516,7 +521,7 @@ endif()
set(_GTK2_did_we_find_everything true) # This gets set to GTK2_FOUND
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
string(TOUPPER ${_GTK2_component} _COMPONENT_UPPER)
diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake
index 720591a..6cffb5c 100644
--- a/Modules/FindGTest.cmake
+++ b/Modules/FindGTest.cmake
@@ -146,7 +146,7 @@ else()
_gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_maind)
endif()
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTest DEFAULT_MSG GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
if(GTEST_FOUND)
diff --git a/Modules/FindGit.cmake b/Modules/FindGit.cmake
index 8188715..503b640 100644
--- a/Modules/FindGit.cmake
+++ b/Modules/FindGit.cmake
@@ -35,6 +35,7 @@ endif()
find_program(GIT_EXECUTABLE
NAMES ${git_names}
+ PATH_SUFFIXES Git/cmd Git/bin
DOC "git command line client"
)
mark_as_advanced(GIT_EXECUTABLE)
@@ -42,5 +43,5 @@ mark_as_advanced(GIT_EXECUTABLE)
# Handle the QUIETLY and REQUIRED arguments and set GIT_FOUND to TRUE if
# all listed variables are TRUE
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(Git DEFAULT_MSG GIT_EXECUTABLE)
diff --git a/Modules/FindGnuTLS.cmake b/Modules/FindGnuTLS.cmake
index 4363bf7..a437a1f 100644
--- a/Modules/FindGnuTLS.cmake
+++ b/Modules/FindGnuTLS.cmake
@@ -56,7 +56,7 @@ MARK_AS_ADVANCED(GNUTLS_INCLUDE_DIR GNUTLS_LIBRARY)
# handle the QUIETLY and REQUIRED arguments and set GNUTLS_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GnuTLS DEFAULT_MSG GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR)
IF(GNUTLS_FOUND)
diff --git a/Modules/FindGnuplot.cmake b/Modules/FindGnuplot.cmake
index e7375d4..7c59f03 100644
--- a/Modules/FindGnuplot.cmake
+++ b/Modules/FindGnuplot.cmake
@@ -34,7 +34,7 @@ SET(GNUPLOT ${GNUPLOT_EXECUTABLE})
# handle the QUIETLY and REQUIRED arguments and set GNUPLOT_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gnuplot DEFAULT_MSG GNUPLOT_EXECUTABLE)
MARK_AS_ADVANCED( GNUPLOT_EXECUTABLE )
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 90c9de4..90849a1 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -57,7 +57,7 @@
# This module is maintained by Will Dicharry <wdicharry@stellarscience.com>.
include(SelectLibraryConfigurations)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
# List of the valid HDF5 components
set( HDF5_VALID_COMPONENTS
diff --git a/Modules/FindHSPELL.cmake b/Modules/FindHSPELL.cmake
index 2838027..054f565 100644
--- a/Modules/FindHSPELL.cmake
+++ b/Modules/FindHSPELL.cmake
@@ -36,7 +36,7 @@ ENDIF()
# handle the QUIETLY and REQUIRED arguments and set HSPELL_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HSPELL DEFAULT_MSG HSPELL_LIBRARIES HSPELL_INCLUDE_DIR)
MARK_AS_ADVANCED(HSPELL_INCLUDE_DIR HSPELL_LIBRARIES)
diff --git a/Modules/FindITK.cmake b/Modules/FindITK.cmake
index 244ce54..5f43dd9 100644
--- a/Modules/FindITK.cmake
+++ b/Modules/FindITK.cmake
@@ -21,7 +21,7 @@
# instead.
#=============================================================================
-# Copyright 2001-2009 Kitware, Inc.
+# Copyright 2001-2010 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -33,67 +33,23 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-SET(ITK_DIR_STRING "directory containing ITKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/InsightToolkit for an installation.")
+# Use the Config mode of the find_package() command to find ITKConfig.
+# If this succeeds (possibly because ITK_DIR is already set), the
+# command will have already loaded ITKConfig.cmake and set ITK_FOUND.
+IF(NOT ITK_FOUND)
+ FIND_PACKAGE(ITK QUIET NO_MODULE
+ NAMES ITK InsightToolkit
+ CONFIGS ITKConfig.cmake
+ )
+ENDIF()
-# Search only if the location is not already known.
-IF(NOT ITK_DIR)
- # Get the system search path as a list.
- IF(UNIX)
- STRING(REGEX MATCHALL "[^:]+" ITK_DIR_SEARCH1 "$ENV{PATH}")
- ELSE(UNIX)
- STRING(REGEX REPLACE "\\\\" "/" ITK_DIR_SEARCH1 "$ENV{PATH}")
- ENDIF(UNIX)
- STRING(REGEX REPLACE "/;" ";" ITK_DIR_SEARCH2 ${ITK_DIR_SEARCH1})
-
- # Construct a set of paths relative to the system search path.
- SET(ITK_DIR_SEARCH "")
- FOREACH(dir ${ITK_DIR_SEARCH2})
- SET(ITK_DIR_SEARCH ${ITK_DIR_SEARCH} "${dir}/../lib/InsightToolkit")
- ENDFOREACH(dir)
-
- #
- # Look for an installation or build tree.
- #
- FIND_PATH(ITK_DIR ITKConfig.cmake
- # Look for an environment variable ITK_DIR.
- $ENV{ITK_DIR}
-
- # Look in places relative to the system executable search path.
- ${ITK_DIR_SEARCH}
-
- # Look in standard UNIX install locations.
- /usr/local/lib/InsightToolkit
- /usr/lib/InsightToolkit
-
- # Read from the CMakeSetup registry entries. It is likely that
- # ITK will have been recently built.
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10]
-
- # Help the user find it if we cannot.
- DOC "The ${ITK_DIR_STRING}"
- )
-ENDIF(NOT ITK_DIR)
-
-# If ITK was found, load the configuration file to get the rest of the
-# settings.
-IF(ITK_DIR)
- SET(ITK_FOUND 1)
- INCLUDE(${ITK_DIR}/ITKConfig.cmake)
+SET(ITK_DIR_MESSAGE "Please set ITK_DIR to the directory containing ITKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/InsightToolkit for an installation.")
+IF(ITK_FOUND)
# Set USE_ITK_FILE for backward-compatability.
SET(USE_ITK_FILE ${ITK_USE_FILE})
-ELSE(ITK_DIR)
- SET(ITK_FOUND 0)
- IF(ITK_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Please set ITK_DIR to the ${ITK_DIR_STRING}")
- ENDIF(ITK_FIND_REQUIRED)
-ENDIF(ITK_DIR)
+ELSEIF(ITK_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR ${ITK_DIR_MESSAGE})
+ELSEIF(NOT ITK_FIND_QUIETLY)
+ MESSAGE(STATUS ${ITK_DIR_MESSAGE})
+ENDIF()
diff --git a/Modules/FindImageMagick.cmake b/Modules/FindImageMagick.cmake
index 774b2ad..5e6fa20 100644
--- a/Modules/FindImageMagick.cmake
+++ b/Modules/FindImageMagick.cmake
@@ -171,7 +171,7 @@ SET(ImageMagick_LIBRARIES ${ImageMagick_LIBRARIES})
#---------------------------------------------------------------------
# Standard Package Output
#---------------------------------------------------------------------
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
ImageMagick DEFAULT_MSG ImageMagick_FOUND
)
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
index d9395b8..6ba1826 100644
--- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake
@@ -232,7 +232,7 @@ FIND_PATH(JAVA_AWT_INCLUDE_PATH jawt.h
${JAVA_INCLUDE_PATH}
)
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JNI DEFAULT_MSG JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY
JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
diff --git a/Modules/FindJPEG.cmake b/Modules/FindJPEG.cmake
index 721f400..349e7e1 100644
--- a/Modules/FindJPEG.cmake
+++ b/Modules/FindJPEG.cmake
@@ -27,7 +27,7 @@ FIND_LIBRARY(JPEG_LIBRARY NAMES ${JPEG_NAMES} )
# handle the QUIETLY and REQUIRED arguments and set JPEG_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JPEG DEFAULT_MSG JPEG_LIBRARY JPEG_INCLUDE_DIR)
IF(JPEG_FOUND)
diff --git a/Modules/FindJasper.cmake b/Modules/FindJasper.cmake
index fde5165..bae4c05 100644
--- a/Modules/FindJasper.cmake
+++ b/Modules/FindJasper.cmake
@@ -27,7 +27,7 @@ FIND_LIBRARY(JASPER_LIBRARY NAMES jasper libjasper)
# handle the QUIETLY and REQUIRED arguments and set JASPER_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jasper DEFAULT_MSG JASPER_LIBRARY JASPER_INCLUDE_DIR JPEG_LIBRARIES)
IF (JASPER_FOUND)
diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake
index acdbb70..8c2128e 100644
--- a/Modules/FindJava.cmake
+++ b/Modules/FindJava.cmake
@@ -150,7 +150,7 @@ FIND_PROGRAM(Java_JAVAC_EXECUTABLE
PATHS ${_JAVA_PATHS}
)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
if(Java_FIND_COMPONENTS)
foreach(component ${Java_FIND_COMPONENTS})
# User just want to execute some Java byte-compiled
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake
index 40effb0..bf45406 100644
--- a/Modules/FindLAPACK.cmake
+++ b/Modules/FindLAPACK.cmake
@@ -37,17 +37,12 @@
# License text for the above reference.)
get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
-if(NOT _LANGUAGES_ MATCHES Fortran)
- if(LAPACK_FIND_REQUIRED)
- message(FATAL_ERROR
- "FindLAPACK is Fortran-only so Fortran must be enabled.")
- else(LAPACK_FIND_REQUIRED)
- message(STATUS "Looking for LAPACK... - NOT found (Fortran not enabled)")
- return()
- endif(LAPACK_FIND_REQUIRED)
-endif(NOT _LANGUAGES_ MATCHES Fortran)
-
+if (NOT _LANGUAGES_ MATCHES Fortran)
+include(CheckFunctionExists)
+else (NOT _LANGUAGES_ MATCHES Fortran)
include(CheckFortranFunctionExists)
+endif (NOT _LANGUAGES_ MATCHES Fortran)
+
set(LAPACK_FOUND FALSE)
set(LAPACK95_FOUND FALSE)
@@ -112,7 +107,11 @@ if(_libraries_work)
set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_blas} ${_threads})
endif(UNIX AND BLA_STATIC)
# message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}")
- check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS)
+ if (NOT _LANGUAGES_ MATCHES Fortran)
+ check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS)
+ else (NOT _LANGUAGES_ MATCHES Fortran)
+ check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS)
+ endif (NOT _LANGUAGES_ MATCHES Fortran)
set(CMAKE_REQUIRED_LIBRARIES)
mark_as_advanced(${_prefix}${_combined_name}_WORKS)
set(_libraries_work ${${_prefix}${_combined_name}_WORKS})
@@ -157,7 +156,18 @@ if(BLAS_FOUND)
LAPACK
cheev
""
- "acml"
+ "acml;acml_mv"
+ ""
+ ""
+ )
+ endif(NOT LAPACK_LIBRARIES)
+ if(NOT LAPACK_LIBRARIES)
+ check_lapack_libraries(
+ LAPACK_LIBRARIES
+ LAPACK
+ cheev
+ ""
+ "acml_mp;acml_mv"
""
""
)
diff --git a/Modules/FindLibArchive.cmake b/Modules/FindLibArchive.cmake
index 2104e70..cedcd24 100644
--- a/Modules/FindLibArchive.cmake
+++ b/Modules/FindLibArchive.cmake
@@ -50,7 +50,10 @@ endif()
# Handle the QUIETLY and REQUIRED arguments and set LIBARCHIVE_FOUND
# to TRUE if all listed variables are TRUE.
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+# (Use ${CMAKE_ROOT}/Modules instead of ${CMAKE_CURRENT_LIST_DIR} because CMake
+# itself includes this FindLibArchive when built with an older CMake that does
+# not provide it. The older CMake also does not have CMAKE_CURRENT_LIST_DIR.)
+include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(LibArchive DEFAULT_MSG
LibArchive_LIBRARY LibArchive_INCLUDE_DIR
)
diff --git a/Modules/FindLibXml2.cmake b/Modules/FindLibXml2.cmake
index 6152bfd..95ae180 100644
--- a/Modules/FindLibXml2.cmake
+++ b/Modules/FindLibXml2.cmake
@@ -46,7 +46,7 @@ SET(XMLLINT_EXECUTABLE "${LIBXML2_XMLLINT_EXECUTABLE}")
# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE)
diff --git a/Modules/FindLibXslt.cmake b/Modules/FindLibXslt.cmake
index cb05b63..462835a 100644
--- a/Modules/FindLibXslt.cmake
+++ b/Modules/FindLibXslt.cmake
@@ -40,7 +40,7 @@ FIND_LIBRARY(LIBXSLT_LIBRARIES NAMES xslt libxslt
# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXslt DEFAULT_MSG LIBXSLT_LIBRARIES LIBXSLT_INCLUDE_DIR)
MARK_AS_ADVANCED(LIBXSLT_INCLUDE_DIR LIBXSLT_LIBRARIES)
diff --git a/Modules/FindLua50.cmake b/Modules/FindLua50.cmake
index cb979f1..ee8b84e 100644
--- a/Modules/FindLua50.cmake
+++ b/Modules/FindLua50.cmake
@@ -87,7 +87,7 @@ ELSE(${LUA_LIBRARY_lua} MATCHES "framework")
ENDIF(${LUA_LIBRARY_lua} MATCHES "framework")
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua50 DEFAULT_MSG LUA_LIBRARIES LUA_INCLUDE_DIR)
diff --git a/Modules/FindLua51.cmake b/Modules/FindLua51.cmake
index ea3e8f6..123fd5d 100644
--- a/Modules/FindLua51.cmake
+++ b/Modules/FindLua51.cmake
@@ -66,7 +66,7 @@ IF(LUA_LIBRARY)
ENDIF(UNIX AND NOT APPLE)
ENDIF(LUA_LIBRARY)
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua51 DEFAULT_MSG LUA_LIBRARIES LUA_INCLUDE_DIR)
diff --git a/Modules/FindMPEG.cmake b/Modules/FindMPEG.cmake
index 6de6ce3..cf4ef58 100644
--- a/Modules/FindMPEG.cmake
+++ b/Modules/FindMPEG.cmake
@@ -34,7 +34,7 @@ FIND_LIBRARY( MPEG_vo_LIBRARY vo
# handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG DEFAULT_MSG MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY MPEG_vo_LIBRARY)
IF(MPEG_FOUND)
diff --git a/Modules/FindMPEG2.cmake b/Modules/FindMPEG2.cmake
index 6961e87..fab37cf 100644
--- a/Modules/FindMPEG2.cmake
+++ b/Modules/FindMPEG2.cmake
@@ -36,7 +36,7 @@ FIND_LIBRARY( MPEG2_vo_LIBRARY vo
# handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG2 DEFAULT_MSG MPEG2_mpeg2_LIBRARY MPEG2_INCLUDE_DIR)
IF(MPEG2_FOUND)
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 78699cc..a81a53b 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -346,7 +346,7 @@ else (MPI_INCLUDE_PATH AND MPI_LIBRARY)
set(MPI_FOUND FALSE)
endif (MPI_INCLUDE_PATH AND MPI_LIBRARY)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
# handle the QUIETLY and REQUIRED arguments
find_package_handle_standard_args(MPI DEFAULT_MSG MPI_LIBRARY MPI_INCLUDE_PATH)
diff --git a/Modules/FindMotif.cmake b/Modules/FindMotif.cmake
index 8247afd..e354112 100644
--- a/Modules/FindMotif.cmake
+++ b/Modules/FindMotif.cmake
@@ -34,7 +34,7 @@ ENDIF(UNIX)
# handle the QUIETLY and REQUIRED arguments and set MOTIF_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Motif DEFAULT_MSG MOTIF_LIBRARIES MOTIF_INCLUDE_DIR)
diff --git a/Modules/FindOpenAL.cmake b/Modules/FindOpenAL.cmake
index 982b4fd..bcba6e2 100644
--- a/Modules/FindOpenAL.cmake
+++ b/Modules/FindOpenAL.cmake
@@ -97,7 +97,7 @@ FIND_LIBRARY(OPENAL_LIBRARY
# handle the QUIETLY and REQUIRED arguments and set OPENAL_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenAL DEFAULT_MSG OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
MARK_AS_ADVANCED(OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake
index 21aafa9..98d8808 100644
--- a/Modules/FindOpenGL.cmake
+++ b/Modules/FindOpenGL.cmake
@@ -123,7 +123,6 @@ ELSE (WIN32)
ENDIF(APPLE)
ENDIF (WIN32)
-SET( OPENGL_FOUND "NO" )
IF(OPENGL_gl_LIBRARY)
IF(OPENGL_xmesa_INCLUDE_DIR)
@@ -140,10 +139,7 @@ IF(OPENGL_gl_LIBRARY)
SET( OPENGL_GLU_FOUND "NO" )
ENDIF(OPENGL_glu_LIBRARY)
- SET( OPENGL_FOUND "YES" )
-
# This deprecated setting is for backward compatibility with CMake1.4
-
SET (OPENGL_LIBRARY ${OPENGL_LIBRARIES})
ENDIF(OPENGL_gl_LIBRARY)
@@ -151,6 +147,11 @@ ENDIF(OPENGL_gl_LIBRARY)
# This deprecated setting is for backward compatibility with CMake1.4
SET(OPENGL_INCLUDE_PATH ${OPENGL_INCLUDE_DIR})
+# handle the QUIETLY and REQUIRED arguments and set OPENGL_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenGL DEFAULT_MSG OPENGL_gl_LIBRARY)
+
MARK_AS_ADVANCED(
OPENGL_INCLUDE_DIR
OPENGL_xmesa_INCLUDE_DIR
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake
index 30eb37a..652803c 100644
--- a/Modules/FindOpenMP.cmake
+++ b/Modules/FindOpenMP.cmake
@@ -26,7 +26,7 @@
include(CheckCSourceCompiles)
include(CheckCXXSourceCompiles)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
set(OpenMP_C_FLAG_CANDIDATES
#Gnu
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index b599d99..f41a66b 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -113,7 +113,7 @@ ELSE(WIN32 AND NOT CYGWIN)
ENDIF(WIN32 AND NOT CYGWIN)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(OpenSSL DEFAULT_MSG
OPENSSL_LIBRARIES
OPENSSL_INCLUDE_DIR
diff --git a/Modules/FindOpenSceneGraph.cmake b/Modules/FindOpenSceneGraph.cmake
index c4048bd..460f0fd 100644
--- a/Modules/FindOpenSceneGraph.cmake
+++ b/Modules/FindOpenSceneGraph.cmake
@@ -231,7 +231,7 @@ else()
endif()
endif()
- include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+ include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenSceneGraph DEFAULT_MSG OPENSCENEGRAPH_LIBRARIES OPENSCENEGRAPH_INCLUDE_DIR)
endif()
diff --git a/Modules/FindOpenThreads.cmake b/Modules/FindOpenThreads.cmake
index 74aaa50..6b81fbe 100644
--- a/Modules/FindOpenThreads.cmake
+++ b/Modules/FindOpenThreads.cmake
@@ -118,6 +118,6 @@ else()
set(OPENTHREADS_LIBRARIES ${OPENTHREADS_LIBRARY})
endif()
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenThreads DEFAULT_MSG
OPENTHREADS_LIBRARY OPENTHREADS_INCLUDE_DIR)
diff --git a/Modules/FindPHP4.cmake b/Modules/FindPHP4.cmake
index 8a20063..6c2965a 100644
--- a/Modules/FindPHP4.cmake
+++ b/Modules/FindPHP4.cmake
@@ -81,5 +81,5 @@ IF(APPLE)
ENDFOREACH(symbol)
ENDIF(APPLE)
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PHP4 DEFAULT_MSG PHP4_EXECUTABLE PHP4_INCLUDE_PATH)
diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake
index c137172..f607dc6 100644
--- a/Modules/FindPNG.cmake
+++ b/Modules/FindPNG.cmake
@@ -33,7 +33,7 @@ if(ZLIB_FOUND)
/usr/local/include/libpng # OpenBSD
)
- set(PNG_NAMES ${PNG_NAMES} png libpng png14 libpng14 png14d libpng14d png12 libpng12 png12d libpng12d)
+ set(PNG_NAMES ${PNG_NAMES} png libpng png15 libpng15 png15d libpng15d png14 libpng14 png14d libpng14d png12 libpng12 png12d libpng12d)
find_library(PNG_LIBRARY NAMES ${PNG_NAMES} )
if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
@@ -55,7 +55,7 @@ endif(ZLIB_FOUND)
# handle the QUIETLY and REQUIRED arguments and set PNG_FOUND to TRUE if
# all listed variables are TRUE
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(PNG DEFAULT_MSG PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
mark_as_advanced(PNG_PNG_INCLUDE_DIR PNG_LIBRARY )
diff --git a/Modules/FindPerl.cmake b/Modules/FindPerl.cmake
index 85172d0..db393e7 100644
--- a/Modules/FindPerl.cmake
+++ b/Modules/FindPerl.cmake
@@ -44,7 +44,7 @@ SET(PERL ${PERL_EXECUTABLE})
# handle the QUIETLY and REQUIRED arguments and set PERL_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Perl DEFAULT_MSG PERL_EXECUTABLE)
MARK_AS_ADVANCED(PERL_EXECUTABLE)
diff --git a/Modules/FindPerlLibs.cmake b/Modules/FindPerlLibs.cmake
index 4cb0263..eea55f1 100644
--- a/Modules/FindPerlLibs.cmake
+++ b/Modules/FindPerlLibs.cmake
@@ -25,6 +25,7 @@
#=============================================================================
# Copyright 2004-2009 Kitware, Inc.
+# Copyright 2008 Andreas Schneider <asn@cryptomilk.org>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -147,6 +148,32 @@ if (PERL_EXECUTABLE)
string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_VENDORLIB ${PERL_VENDORLIB_OUTPUT_VARIABLE})
endif (NOT PERL_VENDORLIB_RESULT_VARIABLE)
+ macro(perl_adjust_darwin_lib_variable varname)
+ string( TOUPPER PERL_${varname} FINDPERL_VARNAME )
+ string( TOLOWER install${varname} PERL_VARNAME )
+
+ if (NOT PERL_MINUSV_OUTPUT_VARIABLE)
+ execute_process(
+ COMMAND
+ ${PERL_EXECUTABLE} -V
+ OUTPUT_VARIABLE
+ PERL_MINUSV_OUTPUT_VARIABLE
+ RESULT_VARIABLE
+ PERL_MINUSV_RESULT_VARIABLE
+ )
+ endif()
+
+ if (NOT PERL_MINUSV_RESULT_VARIABLE)
+ string(REGEX MATCH "(${PERL_VARNAME}.*points? to the Updates directory)"
+ PERL_NEEDS_ADJUSTMENT ${PERL_MINUSV_OUTPUT_VARIABLE})
+
+ if (PERL_NEEDS_ADJUSTMENT)
+ string(REGEX REPLACE "(.*)/Updates/" "/System/\\1/" ${FINDPERL_VARNAME} ${${FINDPERL_VARNAME}})
+ endif (PERL_NEEDS_ADJUSTMENT)
+
+ endif (NOT PERL_MINUSV_RESULT_VARIABLE)
+ endmacro()
+
### PERL_ARCHLIB
execute_process(
COMMAND
@@ -158,6 +185,7 @@ if (PERL_EXECUTABLE)
)
if (NOT PERL_ARCHLIB_RESULT_VARIABLE)
string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_ARCHLIB ${PERL_ARCHLIB_OUTPUT_VARIABLE})
+ perl_adjust_darwin_lib_variable( ARCHLIB )
endif (NOT PERL_ARCHLIB_RESULT_VARIABLE)
### PERL_PRIVLIB
@@ -171,6 +199,7 @@ if (PERL_EXECUTABLE)
)
if (NOT PERL_PRIVLIB_RESULT_VARIABLE)
string(REGEX REPLACE "install[a-z]+='([^']+)'.*" "\\1" PERL_PRIVLIB ${PERL_PRIVLIB_OUTPUT_VARIABLE})
+ perl_adjust_darwin_lib_variable( PRIVLIB )
endif (NOT PERL_PRIVLIB_RESULT_VARIABLE)
@@ -230,7 +259,7 @@ endif (PERL_EXECUTABLE)
# handle the QUIETLY and REQUIRED arguments and set PERLLIBS_FOUND to TRUE if
# all listed variables are TRUE
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(PerlLibs REQUIRED_VARS PERL_LIBRARY PERL_INCLUDE_PATH
VERSION_VAR PERL_VERSION)
diff --git a/Modules/FindPhysFS.cmake b/Modules/FindPhysFS.cmake
index 5694c1e..80dfd51 100644
--- a/Modules/FindPhysFS.cmake
+++ b/Modules/FindPhysFS.cmake
@@ -56,6 +56,6 @@ FIND_LIBRARY(PHYSFS_LIBRARY
# handle the QUIETLY and REQUIRED arguments and set PHYSFS_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PhysFS DEFAULT_MSG PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)
diff --git a/Modules/FindProducer.cmake b/Modules/FindProducer.cmake
index fcee1d9..39a9436 100644
--- a/Modules/FindProducer.cmake
+++ b/Modules/FindProducer.cmake
@@ -77,6 +77,6 @@ FIND_LIBRARY(PRODUCER_LIBRARY
/opt
)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Producer DEFAULT_MSG
PRODUCER_LIBRARY PRODUCER_INCLUDE_DIR)
diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake
index e79ae26..a6e6653 100644
--- a/Modules/FindProtobuf.cmake
+++ b/Modules/FindProtobuf.cmake
@@ -111,7 +111,7 @@ if(WIN32)
set(CMAKE_FIND_LIBRARY_PREFIXES "${PROTOBUF_ORIG_FIND_LIBRARY_PREFIXES}")
endif()
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROTOBUF DEFAULT_MSG
PROTOBUF_LIBRARY PROTOBUF_INCLUDE_DIR)
diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake
index 645ca79..46cde43 100644
--- a/Modules/FindPythonInterp.cmake
+++ b/Modules/FindPythonInterp.cmake
@@ -2,8 +2,9 @@
# This module finds if Python interpreter is installed and determines where the
# executables are. This code sets the following variables:
#
-# PYTHONINTERP_FOUND - Was the Python executable found
-# PYTHON_EXECUTABLE - path to the Python interpreter
+# PYTHONINTERP_FOUND - Was the Python executable found
+# PYTHON_EXECUTABLE - path to the Python interpreter
+# Python_ADDITIONAL_VERSIONS - list of additional Python versions to search for
#
#=============================================================================
@@ -19,25 +20,32 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PROGRAM(PYTHON_EXECUTABLE
- NAMES python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python
- PATHS
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.2\\InstallPath]
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath]
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath]
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.6\\InstallPath]
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.5\\InstallPath]
- )
+# Set up the versions we know about, in the order we will search. Always add
+# the user supplied additional versions to the front.
+set(_Python_VERSIONS
+ ${Python_ADDITIONAL_VERSIONS}
+ 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
+
+# Run first with the Python version in the executable
+foreach(_CURRENT_VERSION ${_Python_VERSIONS})
+ set(_Python_NAMES python${_CURRENT_VERSION})
+ if(WIN32)
+ list(APPEND _Python_NAMES python)
+ endif()
+ find_program(PYTHON_EXECUTABLE
+ NAMES ${_Python_NAMES}
+ PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]
+ )
+endforeach()
+# Now without any version if we still haven't found it
+if(NOT PYTHON_EXECUTABLE)
+ find_program(PYTHON_EXECUTABLE NAMES python)
+endif()
+
# handle the QUIETLY and REQUIRED arguments and set PYTHONINTERP_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonInterp DEFAULT_MSG PYTHON_EXECUTABLE)
-MARK_AS_ADVANCED(PYTHON_EXECUTABLE)
-
+mark_as_advanced(PYTHON_EXECUTABLE)
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index 10e9241..adcec46 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -3,12 +3,12 @@
# include files and libraries are. It also determines what the name of
# the library is. This code sets the following variables:
#
-# PYTHONLIBS_FOUND - have the Python libs been found
-# PYTHON_LIBRARIES - path to the python library
-# PYTHON_INCLUDE_PATH - path to where Python.h is found (deprecated)
-# PYTHON_INCLUDE_DIRS - path to where Python.h is found
-# PYTHON_DEBUG_LIBRARIES - path to the debug library
-#
+# PYTHONLIBS_FOUND - have the Python libs been found
+# PYTHON_LIBRARIES - path to the python library
+# PYTHON_INCLUDE_PATH - path to where Python.h is found (deprecated)
+# PYTHON_INCLUDE_DIRS - path to where Python.h is found
+# PYTHON_DEBUG_LIBRARIES - path to the debug library
+# Python_ADDITIONAL_VERSIONS - list of additional Python versions to search for
#=============================================================================
# Copyright 2001-2009 Kitware, Inc.
@@ -27,7 +27,13 @@ INCLUDE(CMakeFindFrameworks)
# Search for the python framework on Apple.
CMAKE_FIND_FRAMEWORKS(Python)
-FOREACH(_CURRENT_VERSION 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
+# Set up the versions we know about, in the order we will search. Always add
+# the user supplied additional versions to the front.
+set(_Python_VERSIONS
+ ${Python_ADDITIONAL_VERSIONS}
+ 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
+
+FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
IF(WIN32)
FIND_LIBRARY(PYTHON_DEBUG_LIBRARY
@@ -53,7 +59,7 @@ FOREACH(_CURRENT_VERSION 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
PATH_SUFFIXES python${_CURRENT_VERSION}/config
)
- # For backward compatibility, honour value of PYTHON_INCLUDE_PATH, if
+ # For backward compatibility, honour value of PYTHON_INCLUDE_PATH, if
# PYTHON_INCLUDE_DIR is not set.
IF(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)
SET(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}" CACHE PATH
@@ -78,9 +84,9 @@ FOREACH(_CURRENT_VERSION 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5)
)
# For backward compatibility, set PYTHON_INCLUDE_PATH, but make it internal.
- SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}" CACHE INTERNAL
+ SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}" CACHE INTERNAL
"Path to where Python.h is found (deprecated)")
-
+
ENDFOREACH(_CURRENT_VERSION)
MARK_AS_ADVANCED(
@@ -98,12 +104,12 @@ SET(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
SET(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs DEFAULT_MSG PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
# PYTHON_ADD_MODULE(<name> src1 src2 ... srcN) is used to build modules for python.
-# PYTHON_WRITE_MODULES_HEADER(<filename>) writes a header file you can include
+# PYTHON_WRITE_MODULES_HEADER(<filename>) writes a header file you can include
# in your sources to initialize the static python modules
FUNCTION(PYTHON_ADD_MODULE _NAME )
GET_PROPERTY(_TARGET_SUPPORTS_SHARED_LIBS
@@ -145,10 +151,11 @@ FUNCTION(PYTHON_WRITE_MODULES_HEADER _filename)
GET_FILENAME_COMPONENT(_name "${_filename}" NAME)
STRING(REPLACE "." "_" _name "${_name}")
STRING(TOUPPER ${_name} _nameUpper)
+ SET(_filename ${CMAKE_CURRENT_BINARY_DIR}/${_filename})
SET(_filenameTmp "${_filename}.in")
FILE(WRITE ${_filenameTmp} "/*Created by cmake, do not edit, changes will be lost*/\n")
- FILE(APPEND ${_filenameTmp}
+ FILE(APPEND ${_filenameTmp}
"#ifndef ${_nameUpper}
#define ${_nameUpper}
@@ -164,7 +171,7 @@ extern \"C\" {
FILE(APPEND ${_filenameTmp} "extern void init${PYTHON_MODULE_PREFIX}${_currentModule}(void);\n\n")
ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
- FILE(APPEND ${_filenameTmp}
+ FILE(APPEND ${_filenameTmp}
"#ifdef __cplusplus
}
#endif /* __cplusplus */
@@ -182,7 +189,7 @@ extern \"C\" {
ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
FILE(APPEND ${_filenameTmp} "}\n\n")
FILE(APPEND ${_filenameTmp} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n ${_name}_LoadAllPythonModules();\n}\n#endif\n\n#endif\n")
-
+
# with CONFIGURE_FILE() cmake complains that you may not use a file created using FILE(WRITE) as input file for CONFIGURE_FILE()
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_filenameTmp}" "${_filename}" OUTPUT_QUIET ERROR_QUIET)
diff --git a/Modules/FindQt3.cmake b/Modules/FindQt3.cmake
index 3606a5f..bacbb07 100644
--- a/Modules/FindQt3.cmake
+++ b/Modules/FindQt3.cmake
@@ -242,9 +242,9 @@ IF (QT_MIN_VERSION)
ENDIF (QT_MIN_VERSION)
# if the include a library are found then we have it
-IF(QT_INCLUDE_DIR AND QT_QT_LIBRARY)
- SET( QT_FOUND "YES" )
-ENDIF(QT_INCLUDE_DIR AND QT_QT_LIBRARY)
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt3 DEFAULT_MSG QT_QT_LIBRARY QT_INCLUDE_DIR QT_MOC_EXECUTABLE)
+SET(QT_FOUND ${QT3_FOUND} )
IF(QT_FOUND)
SET( QT_LIBRARIES ${QT_LIBRARIES} ${QT_QT_LIBRARY} )
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 45bbd2e..79a3d51 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -447,7 +447,10 @@ MACRO (_QT4_ADJUST_LIB_VARS _camelCaseBasename)
ENDMACRO (_QT4_ADJUST_LIB_VARS)
function(_QT4_QUERY_QMAKE VAR RESULT)
- exec_program(${QT_QMAKE_EXECUTABLE} ARGS "-query ${VAR}" RETURN_VALUE return_code OUTPUT_VARIABLE output )
+ execute_process(COMMAND "${QT_QMAKE_EXECUTABLE}" -query ${VAR}
+ RESULT_VARIABLE return_code
+ OUTPUT_VARIABLE output ERROR_VARIABLE output
+ OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE)
if(NOT return_code)
file(TO_CMAKE_PATH "${output}" output)
set(${RESULT} ${output} PARENT_SCOPE)
@@ -482,7 +485,7 @@ IF (QT_QMAKE_EXECUTABLE)
_qt4_query_qmake(QT_VERSION QTVERSION)
# check for qt3 qmake and then try and find qmake4 or qmake-qt4 in the path
- IF("${QTVERSION}" MATCHES "Unknown")
+ IF(NOT QTVERSION)
SET(QT_QMAKE_EXECUTABLE NOTFOUND CACHE FILEPATH "" FORCE)
FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 PATHS
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
@@ -493,7 +496,7 @@ IF (QT_QMAKE_EXECUTABLE)
IF(QT_QMAKE_EXECUTABLE)
_qt4_query_qmake(QT_VERSION QTVERSION)
ENDIF(QT_QMAKE_EXECUTABLE)
- ENDIF("${QTVERSION}" MATCHES "Unknown")
+ ENDIF(NOT QTVERSION)
# check that we found the Qt4 qmake, Qt3 qmake output won't match here
STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" qt_version_tmp "${QTVERSION}")
@@ -1074,15 +1077,6 @@ IF (QT4_QMAKE_FOUND)
######################################
#
- # Macros for building Qt files
- #
- ######################################
-
- INCLUDE("${_qt4_current_dir}/Qt4Macros.cmake")
-
-
- ######################################
- #
# decide if Qt got found
#
######################################
@@ -1118,6 +1112,89 @@ IF (QT4_QMAKE_FOUND)
#######################################
#
+ # Check the plugins of Qt
+ #
+ #######################################
+
+ SET( QT_PLUGIN_TYPES accessible bearer codecs decorations designer gfxdrivers graphicssystems iconengines imageformats inputmethods mousedrivers phonon_backend script sqldrivers )
+
+ SET( QT_ACCESSIBLE_PLUGINS qtaccessiblecompatwidgets qtaccessiblewidgets )
+ SET( QT_BEARER_PLUGINS qcorewlanbearer qgenericbearer )
+ SET( QT_CODECS_PLUGINS qcncodecs qjpcodecs qkrcodecs qtwcodecs )
+ SET( QT_DECORATIONS_PLUGINS qdecorationdefault qdecorationwindows )
+ SET( QT_DESIGNER_PLUGINS arthurplugin containerextension customwidgetplugin phononwidgets qdeclarativeview qt3supportwidgets qwebview taskmenuextension worldtimeclockplugin )
+ SET( QT_GRAPHICSDRIVERS_PLUGINS qgfxtransformed qgfxvnc qscreenvfb )
+ SET( QT_GRAPHICSSYSTEMS_PLUGINS qglgraphicssystem qtracegraphicssystem )
+ SET( QT_ICONENGINES_PLUGINS qsvgicon )
+ SET( QT_IMAGEFORMATS_PLUGINS qgif qjpeg qmng qico qsvg qtiff )
+ SET( QT_INPUTMETHODS_PLUGINS qimsw_multi )
+ SET( QT_MOUSEDRIVERS_PLUGINS qwstslibmousehandler )
+ SET( QT_PHONON_BACKEND_PLUGINS phonon_qt7 )
+ SET( QT_SCRIPT_PLUGINS qtscriptdbus )
+ SET( QT_SQLDRIVERS_PLUGINS qsqldb2 qsqlibase qsqlite qsqlite2 qsqlmysql qsqloci qsqlodbc qsqlpsql qsqltds )
+
+ IF(QT_QMAKE_CHANGED)
+ FOREACH(QT_PLUGIN_TYPE ${QT_PLUGIN_TYPES})
+ STRING(TOUPPER ${QT_PLUGIN_TYPE} _upper_qt_plugin_type)
+ SET(QT_${_upper_qt_plugin_type}_PLUGINS_DIR ${QT_PLUGINS_DIR}/${QT_PLUGIN_TYPE})
+ FOREACH(QT_PLUGIN ${QT_${_upper_qt_plugin_type}_PLUGINS})
+ STRING(TOUPPER ${QT_PLUGIN} _upper_qt_plugin)
+ UNSET(QT_${_upper_qt_plugin}_LIBRARY_RELEASE CACHE)
+ UNSET(QT_${_upper_qt_plugin}_LIBRARY_DEBUG CACHE)
+ UNSET(QT_${_upper_qt_plugin}_LIBRARY CACHE)
+ UNSET(QT_${_upper_qt_plugin}_PLUGIN_RELEASE CACHE)
+ UNSET(QT_${_upper_qt_plugin}_PLUGIN_DEBUG CACHE)
+ UNSET(QT_${_upper_qt_plugin}_PLUGIN CACHE)
+ ENDFOREACH(QT_PLUGIN)
+ ENDFOREACH(QT_PLUGIN_TYPE)
+ ENDIF(QT_QMAKE_CHANGED)
+
+ # find_library works better than find_file but we need to set prefixes to only match plugins
+ FOREACH(QT_PLUGIN_TYPE ${QT_PLUGIN_TYPES})
+ STRING(TOUPPER ${QT_PLUGIN_TYPE} _upper_qt_plugin_type)
+ SET(QT_${_upper_qt_plugin_type}_PLUGINS_DIR ${QT_PLUGINS_DIR}/${QT_PLUGIN_TYPE})
+ FOREACH(QT_PLUGIN ${QT_${_upper_qt_plugin_type}_PLUGINS})
+ STRING(TOUPPER ${QT_PLUGIN} _upper_qt_plugin)
+ IF(QT_IS_STATIC)
+ FIND_LIBRARY(QT_${_upper_qt_plugin}_LIBRARY_RELEASE
+ NAMES ${QT_PLUGIN}${QT_LIBINFIX} ${QT_PLUGIN}${QT_LIBINFIX}4
+ PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH
+ )
+ FIND_LIBRARY(QT_${_upper_qt_plugin}_LIBRARY_DEBUG
+ NAMES ${QT_PLUGIN}${QT_LIBINFIX}_debug ${QT_PLUGIN}${QT_LIBINFIX}d ${QT_PLUGIN}${QT_LIBINFIX}d4
+ PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH
+ )
+ _QT4_ADJUST_LIB_VARS(${QT_PLUGIN})
+ ELSE(QT_IS_STATIC)
+ # find_library works easier/better than find_file but we need to set suffixes to only match plugins
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES_DEFAULT ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_MODULE_SUFFIX} ${CMAKE_SHARED_LIBRARY_SUFFIX})
+ FIND_LIBRARY(QT_${_upper_qt_plugin}_PLUGIN_RELEASE
+ NAMES ${QT_PLUGIN}${QT_LIBINFIX} ${QT_PLUGIN}${QT_LIBINFIX}4
+ PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH
+ )
+ FIND_LIBRARY(QT_${_upper_qt_plugin}_PLUGIN_DEBUG
+ NAMES ${QT_PLUGIN}${QT_LIBINFIX}_debug ${QT_PLUGIN}${QT_LIBINFIX}d ${QT_PLUGIN}${QT_LIBINFIX}d4
+ PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH
+ )
+ MARK_AS_ADVANCED(QT_${_upper_qt_plugin}_PLUGIN_RELEASE QT_${_upper_qt_plugin}_PLUGIN_DEBUG)
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_DEFAULT})
+ ENDIF(QT_IS_STATIC)
+ ENDFOREACH(QT_PLUGIN)
+ ENDFOREACH(QT_PLUGIN_TYPE)
+
+
+ ######################################
+ #
+ # Macros for building Qt files
+ #
+ ######################################
+
+ INCLUDE("${_qt4_current_dir}/Qt4Macros.cmake")
+
+
+ #######################################
+ #
# compatibility settings
#
#######################################
diff --git a/Modules/FindQuickTime.cmake b/Modules/FindQuickTime.cmake
index 3638e77..038c2dd 100644
--- a/Modules/FindQuickTime.cmake
+++ b/Modules/FindQuickTime.cmake
@@ -43,5 +43,5 @@ ENDIF(APPLE)
# handle the QUIETLY and REQUIRED arguments and set QUICKTIME_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(QuickTime DEFAULT_MSG QUICKTIME_LIBRARY QUICKTIME_INCLUDE_DIR)
diff --git a/Modules/FindRTI.cmake b/Modules/FindRTI.cmake
index 9a01cde..031c138 100644
--- a/Modules/FindRTI.cmake
+++ b/Modules/FindRTI.cmake
@@ -95,7 +95,7 @@ ENDIF (RTI_INCLUDE_DIR)
# Set the modified system variables back to the original value.
SET(CMAKE_FIND_LIBRARY_PREFIXES "${RTI_OLD_FIND_LIBRARY_PREFIXES}")
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(RTI DEFAULT_MSG
RTI_LIBRARY RTI_INCLUDE_DIR)
diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake
index c54d5a1..80fb216 100644
--- a/Modules/FindRuby.cmake
+++ b/Modules/FindRuby.cmake
@@ -209,7 +209,7 @@ ENDIF(WIN32)
FIND_LIBRARY(RUBY_LIBRARY NAMES ${_RUBY_POSSIBLE_LIB_NAMES} HINTS ${RUBY_POSSIBLE_LIB_DIR} )
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
SET(_RUBY_REQUIRED_VARS RUBY_EXECUTABLE RUBY_INCLUDE_DIR RUBY_LIBRARY)
IF(_RUBY_VERSION_SHORT_NODOT GREATER 18)
LIST(APPEND _RUBY_REQUIRED_VARS RUBY_CONFIG_INCLUDE_DIR)
diff --git a/Modules/FindSWIG.cmake b/Modules/FindSWIG.cmake
index 028fef5..2e719ff 100644
--- a/Modules/FindSWIG.cmake
+++ b/Modules/FindSWIG.cmake
@@ -62,6 +62,6 @@ IF(SWIG_EXECUTABLE)
ENDIF(SWIG_swiglib_result)
ENDIF(SWIG_EXECUTABLE)
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SWIG REQUIRED_VARS SWIG_EXECUTABLE SWIG_DIR
VERSION_VAR SWIG_VERSION )
diff --git a/Modules/FindSubversion.cmake b/Modules/FindSubversion.cmake
index 11f66b0..d8cdacb 100644
--- a/Modules/FindSubversion.cmake
+++ b/Modules/FindSubversion.cmake
@@ -122,7 +122,7 @@ IF(Subversion_SVN_EXECUTABLE)
ENDIF(Subversion_SVN_EXECUTABLE)
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Subversion REQUIRED_VARS Subversion_SVN_EXECUTABLE
VERSION_VAR Subversion_VERSION_SVN )
diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake
index 8d780c1..13f32f8 100644
--- a/Modules/FindTCL.cmake
+++ b/Modules/FindTCL.cmake
@@ -104,7 +104,7 @@ ENDIF(WIN32)
FIND_LIBRARY(TCL_LIBRARY
NAMES
tcl
- tcl${TK_LIBRARY_VERSION} tcl${TCL_TCLSH_VERSION} tcl${TK_WISH_VERSION}
+ tcl${TCL_LIBRARY_VERSION} tcl${TCL_TCLSH_VERSION} tcl${TK_WISH_VERSION}
tcl86 tcl8.6
tcl85 tcl8.5
tcl84 tcl8.4
@@ -117,7 +117,7 @@ FIND_LIBRARY(TCL_LIBRARY
FIND_LIBRARY(TK_LIBRARY
NAMES
tk
- tk${TCL_LIBRARY_VERSION} tk${TCL_TCLSH_VERSION} tk${TK_WISH_VERSION}
+ tk${TK_LIBRARY_VERSION} tk${TCL_TCLSH_VERSION} tk${TK_WISH_VERSION}
tk86 tk8.6
tk85 tk8.5
tk84 tk8.4
@@ -197,7 +197,7 @@ FIND_PATH(TK_INCLUDE_PATH
# handle the QUIETLY and REQUIRED arguments and set TCL_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL DEFAULT_MSG TCL_LIBRARY TCL_INCLUDE_PATH)
SET(TCLTK_FIND_REQUIRED ${TCL_FIND_REQUIRED})
diff --git a/Modules/FindTIFF.cmake b/Modules/FindTIFF.cmake
index a5a4d24..714f65f 100644
--- a/Modules/FindTIFF.cmake
+++ b/Modules/FindTIFF.cmake
@@ -27,7 +27,7 @@ FIND_LIBRARY(TIFF_LIBRARY NAMES ${TIFF_NAMES} )
# handle the QUIETLY and REQUIRED arguments and set TIFF_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TIFF DEFAULT_MSG TIFF_LIBRARY TIFF_INCLUDE_DIR)
IF(TIFF_FOUND)
diff --git a/Modules/FindTclsh.cmake b/Modules/FindTclsh.cmake
index 390a68e..8fde59e 100644
--- a/Modules/FindTclsh.cmake
+++ b/Modules/FindTclsh.cmake
@@ -84,7 +84,7 @@ FIND_PROGRAM(TCL_TCLSH
# handle the QUIETLY and REQUIRED arguments and set TIFF_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Tclsh DEFAULT_MSG TCL_TCLSH)
MARK_AS_ADVANCED(TCL_TCLSH)
diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake
index 488bbd5..a6c2df8 100644
--- a/Modules/FindThreads.cmake
+++ b/Modules/FindThreads.cmake
@@ -153,5 +153,5 @@ IF(CMAKE_USE_PTHREADS_INIT)
ENDIF()
ENDIF(CMAKE_USE_PTHREADS_INIT)
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Threads DEFAULT_MSG Threads_FOUND)
diff --git a/Modules/FindWget.cmake b/Modules/FindWget.cmake
index ef4623f..c94132c 100644
--- a/Modules/FindWget.cmake
+++ b/Modules/FindWget.cmake
@@ -26,7 +26,7 @@ FIND_PROGRAM(WGET_EXECUTABLE
# handle the QUIETLY and REQUIRED arguments and set WGET_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Wget DEFAULT_MSG WGET_EXECUTABLE)
MARK_AS_ADVANCED( WGET_EXECUTABLE )
diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake
index 9d4fc0e..2062a7e 100644
--- a/Modules/FindZLIB.cmake
+++ b/Modules/FindZLIB.cmake
@@ -35,7 +35,7 @@ FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]/include"
)
-SET(ZLIB_NAMES z zlib zdll)
+SET(ZLIB_NAMES z zlib zdll zlib1 zlibd zlibd1)
FIND_LIBRARY(ZLIB_LIBRARY
NAMES
${ZLIB_NAMES}
@@ -66,7 +66,7 @@ ENDIF()
# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_INCLUDE_DIR ZLIB_LIBRARY
VERSION_VAR ZLIB_VERSION_STRING)
diff --git a/Modules/Findosg.cmake b/Modules/Findosg.cmake
index 3c884d4..0106372 100644
--- a/Modules/Findosg.cmake
+++ b/Modules/Findosg.cmake
@@ -50,5 +50,5 @@ include(Findosg_functions)
OSG_FIND_PATH (OSG osg/PositionAttitudeTransform)
OSG_FIND_LIBRARY(OSG osg)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osg DEFAULT_MSG OSG_LIBRARY OSG_INCLUDE_DIR)
diff --git a/Modules/FindosgAnimation.cmake b/Modules/FindosgAnimation.cmake
index 6cfc784..b9b44a0 100644
--- a/Modules/FindosgAnimation.cmake
+++ b/Modules/FindosgAnimation.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGANIMATION osgAnimation/Animation)
OSG_FIND_LIBRARY(OSGANIMATION osgAnimation)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgAnimation DEFAULT_MSG
OSGANIMATION_LIBRARY OSGANIMATION_INCLUDE_DIR)
diff --git a/Modules/FindosgDB.cmake b/Modules/FindosgDB.cmake
index 1da6cc0..eabdde7 100644
--- a/Modules/FindosgDB.cmake
+++ b/Modules/FindosgDB.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGDB osgDB/DatabasePager)
OSG_FIND_LIBRARY(OSGDB osgDB)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgDB DEFAULT_MSG
OSGDB_LIBRARY OSGDB_INCLUDE_DIR)
diff --git a/Modules/FindosgFX.cmake b/Modules/FindosgFX.cmake
index dd8d6d8..81d5af5 100644
--- a/Modules/FindosgFX.cmake
+++ b/Modules/FindosgFX.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGFX osgFX/BumpMapping)
OSG_FIND_LIBRARY(OSGFX osgFX)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgFX DEFAULT_MSG
OSGFX_LIBRARY OSGFX_INCLUDE_DIR)
diff --git a/Modules/FindosgGA.cmake b/Modules/FindosgGA.cmake
index ae96f81..a4fe79b 100644
--- a/Modules/FindosgGA.cmake
+++ b/Modules/FindosgGA.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGGA osgGA/FlightManipulator)
OSG_FIND_LIBRARY(OSGGA osgGA)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgGA DEFAULT_MSG
OSGGA_LIBRARY OSGGA_INCLUDE_DIR)
diff --git a/Modules/FindosgIntrospection.cmake b/Modules/FindosgIntrospection.cmake
index b540cc0..24e6ed5 100644
--- a/Modules/FindosgIntrospection.cmake
+++ b/Modules/FindosgIntrospection.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGINTROSPECTION osgIntrospection/Reflection)
OSG_FIND_LIBRARY(OSGINTROSPECTION osgIntrospection)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgIntrospection DEFAULT_MSG
OSGINTROSPECTION_LIBRARY OSGINTROSPECTION_INCLUDE_DIR)
diff --git a/Modules/FindosgManipulator.cmake b/Modules/FindosgManipulator.cmake
index b7cc02f..f71b5fd 100644
--- a/Modules/FindosgManipulator.cmake
+++ b/Modules/FindosgManipulator.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGMANIPULATOR osgManipulator/TrackballDragger)
OSG_FIND_LIBRARY(OSGMANIPULATOR osgManipulator)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgManipulator DEFAULT_MSG
OSGMANIPULATOR_LIBRARY OSGMANIPULATOR_INCLUDE_DIR)
diff --git a/Modules/FindosgParticle.cmake b/Modules/FindosgParticle.cmake
index e204597..f23a83f 100644
--- a/Modules/FindosgParticle.cmake
+++ b/Modules/FindosgParticle.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGPARTICLE osgParticle/FireEffect)
OSG_FIND_LIBRARY(OSGPARTICLE osgParticle)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgParticle DEFAULT_MSG
OSGPARTICLE_LIBRARY OSGPARTICLE_INCLUDE_DIR)
diff --git a/Modules/FindosgProducer.cmake b/Modules/FindosgProducer.cmake
index ea6b33a..51f6090 100644
--- a/Modules/FindosgProducer.cmake
+++ b/Modules/FindosgProducer.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGPRODUCER osgProducer/OsgSceneHandler)
OSG_FIND_LIBRARY(OSGPRODUCER osgProducer)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgProducer DEFAULT_MSG
OSGPRODUCER_LIBRARY OSGPRODUCER_INCLUDE_DIR)
diff --git a/Modules/FindosgShadow.cmake b/Modules/FindosgShadow.cmake
index e569602..278f8ae 100644
--- a/Modules/FindosgShadow.cmake
+++ b/Modules/FindosgShadow.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGSHADOW osgShadow/ShadowTexture)
OSG_FIND_LIBRARY(OSGSHADOW osgShadow)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgShadow DEFAULT_MSG
OSGSHADOW_LIBRARY OSGSHADOW_INCLUDE_DIR)
diff --git a/Modules/FindosgSim.cmake b/Modules/FindosgSim.cmake
index 865cb0b..15daf64 100644
--- a/Modules/FindosgSim.cmake
+++ b/Modules/FindosgSim.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGSIM osgSim/ImpostorSprite)
OSG_FIND_LIBRARY(OSGSIM osgSim)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgSim DEFAULT_MSG
OSGSIM_LIBRARY OSGSIM_INCLUDE_DIR)
diff --git a/Modules/FindosgTerrain.cmake b/Modules/FindosgTerrain.cmake
index 4dc961d..fbf373e 100644
--- a/Modules/FindosgTerrain.cmake
+++ b/Modules/FindosgTerrain.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGTERRAIN osgTerrain/Terrain)
OSG_FIND_LIBRARY(OSGTERRAIN osgTerrain)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgTerrain DEFAULT_MSG
OSGTERRAIN_LIBRARY OSGTERRAIN_INCLUDE_DIR)
diff --git a/Modules/FindosgText.cmake b/Modules/FindosgText.cmake
index ba78755..22f825f 100644
--- a/Modules/FindosgText.cmake
+++ b/Modules/FindosgText.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGTEXT osgText/Text)
OSG_FIND_LIBRARY(OSGTEXT osgText)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgText DEFAULT_MSG
OSGTEXT_LIBRARY OSGTEXT_INCLUDE_DIR)
diff --git a/Modules/FindosgUtil.cmake b/Modules/FindosgUtil.cmake
index 4f93e43..05a74df 100644
--- a/Modules/FindosgUtil.cmake
+++ b/Modules/FindosgUtil.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGUTIL osgUtil/SceneView)
OSG_FIND_LIBRARY(OSGUTIL osgUtil)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgUtil DEFAULT_MSG
OSGUTIL_LIBRARY OSGUTIL_INCLUDE_DIR)
diff --git a/Modules/FindosgViewer.cmake b/Modules/FindosgViewer.cmake
index f434fe4..650dbd7 100644
--- a/Modules/FindosgViewer.cmake
+++ b/Modules/FindosgViewer.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGVIEWER osgViewer/Viewer)
OSG_FIND_LIBRARY(OSGVIEWER osgViewer)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgViewer DEFAULT_MSG
OSGVIEWER_LIBRARY OSGVIEWER_INCLUDE_DIR)
diff --git a/Modules/FindosgVolume.cmake b/Modules/FindosgVolume.cmake
index 4a46d1e..3ad7edc 100644
--- a/Modules/FindosgVolume.cmake
+++ b/Modules/FindosgVolume.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGVOLUME osgVolume/Volume)
OSG_FIND_LIBRARY(OSGVOLUME osgVolume)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgVolume DEFAULT_MSG
OSGVOLUME_LIBRARY OSGVOLUME_INCLUDE_DIR)
diff --git a/Modules/FindosgWidget.cmake b/Modules/FindosgWidget.cmake
index e722c2d..206a8b7 100644
--- a/Modules/FindosgWidget.cmake
+++ b/Modules/FindosgWidget.cmake
@@ -46,6 +46,6 @@ include(Findosg_functions)
OSG_FIND_PATH (OSGWIDGET osgWidget/Widget)
OSG_FIND_LIBRARY(OSGWIDGET osgWidget)
-include("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgWidget DEFAULT_MSG
OSGWIDGET_LIBRARY OSGWIDGET_INCLUDE_DIR)
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index b82ccd0..090259b 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -827,7 +827,7 @@ DBG_MSG("wxWidgets_USE_FILE : ${wxWidgets_USE_FILE}")
#=====================================================================
#=====================================================================
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(wxWidgets DEFAULT_MSG wxWidgets_FOUND)
# Maintain consistency with all other variables.
SET(wxWidgets_FOUND ${WXWIDGETS_FOUND})
diff --git a/Modules/FortranCInterface/CMakeLists.txt b/Modules/FortranCInterface/CMakeLists.txt
index 18014af..4bcaae9 100644
--- a/Modules/FortranCInterface/CMakeLists.txt
+++ b/Modules/FortranCInterface/CMakeLists.txt
@@ -45,10 +45,12 @@ set(module_symbols
my_module_mp_my_sub_ # Intel
MY_MODULE_mp_MY_SUB # Intel on Windows
my_module_my_sub_ # PGI
+ my_module_MP_my_sub # NAG
mymodule$mysub # HP
mymodule_mp_mysub_ # Intel
MYMODULE_mp_MYSUB # Intel on Windows
mymodule_mysub_ # PGI
+ mymodule_MP_mysub # NAG
${FortranCInterface_MODULE_SYMBOLS}
)
list(REMOVE_DUPLICATES module_symbols)
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index b60fed8..2dfe8b1 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -1,16 +1,27 @@
-# By including this file, all files in the CMAKE_INSTALL_DEBUG_LIBRARIES,
-# will be installed with INSTALL_PROGRAMS into /bin for WIN32 and /lib
-# for non-win32. If CMAKE_SKIP_INSTALL_RULES is set to TRUE before including
-# this file, then the INSTALL command is not called. The user can use
-# the variable CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS to use a custom install
-# command and install them into any directory they want.
+# By including this file, all library files listed in the variable
+# CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS will be installed with
+# INSTALL(PROGRAMS ...) into bin for WIN32 and lib
+# for non-WIN32. If CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP is set to TRUE
+# before including this file, then the INSTALL command is not called.
+# The user can use the variable CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS to use a
+# custom install command and install them however they want.
# If it is the MSVC compiler, then the microsoft run
# time libraries will be found and automatically added to the
-# CMAKE_INSTALL_DEBUG_LIBRARIES, and installed.
+# CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS, and installed.
# If CMAKE_INSTALL_DEBUG_LIBRARIES is set and it is the MSVC
# compiler, then the debug libraries are installed when available.
+# If CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY is set then only the debug
+# libraries are installed when both debug and release are available.
# If CMAKE_INSTALL_MFC_LIBRARIES is set then the MFC run time
# libraries are installed as well as the CRT run time libraries.
+# If CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION is set then the libraries are
+# installed to that directory rather than the default.
+# If CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS is NOT set, then this file
+# warns about required files that do not exist. You can set this variable to
+# ON before including this file to avoid the warning. For example, the Visual
+# Studio Express editions do not include the redistributable files, so if you
+# include this file on a machine with only VS Express installed, you'll get
+# the warning.
#=============================================================================
# Copyright 2006-2009 Kitware, Inc.
@@ -28,6 +39,21 @@
IF(MSVC)
FILE(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT)
+ IF(CMAKE_CL_64)
+ IF(MSVC_VERSION GREATER 1599)
+ # VS 10 and later:
+ SET(CMAKE_MSVC_ARCH x64)
+ ELSE()
+ # VS 9 and earlier:
+ SET(CMAKE_MSVC_ARCH amd64)
+ ENDIF()
+ ELSE(CMAKE_CL_64)
+ SET(CMAKE_MSVC_ARCH x86)
+ ENDIF(CMAKE_CL_64)
+
+ GET_FILENAME_COMPONENT(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH)
+ GET_FILENAME_COMPONENT(base_dir "${devenv_dir}/../.." ABSOLUTE)
+
IF(MSVC70)
SET(__install__libs
"${SYSTEMROOT}/system32/msvcp70.dll"
@@ -42,15 +68,6 @@ IF(MSVC)
)
ENDIF(MSVC71)
- IF(CMAKE_CL_64)
- SET(CMAKE_MSVC_ARCH amd64)
- ELSE(CMAKE_CL_64)
- SET(CMAKE_MSVC_ARCH x86)
- ENDIF(CMAKE_CL_64)
-
- GET_FILENAME_COMPONENT(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH)
- GET_FILENAME_COMPONENT(base_dir "${devenv_dir}/../.." ABSOLUTE)
-
IF(MSVC80)
# Find the runtime library redistribution directory.
FIND_PATH(MSVC80_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest
@@ -63,12 +80,14 @@ IF(MSVC)
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
- SET(__install__libs
- "${MSVC80_CRT_DIR}/Microsoft.VC80.CRT.manifest"
- "${MSVC80_CRT_DIR}/msvcm80.dll"
- "${MSVC80_CRT_DIR}/msvcp80.dll"
- "${MSVC80_CRT_DIR}/msvcr80.dll"
- )
+ IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+ SET(__install__libs
+ "${MSVC80_CRT_DIR}/Microsoft.VC80.CRT.manifest"
+ "${MSVC80_CRT_DIR}/msvcm80.dll"
+ "${MSVC80_CRT_DIR}/msvcp80.dll"
+ "${MSVC80_CRT_DIR}/msvcr80.dll"
+ )
+ ENDIF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC80_CRT_DIR
@@ -80,7 +99,6 @@ IF(MSVC)
"${MSVC80_CRT_DIR}/msvcr80d.dll"
)
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
-
ENDIF(MSVC80)
IF(MSVC90)
@@ -96,12 +114,15 @@ IF(MSVC)
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
- SET(__install__libs
- "${MSVC90_CRT_DIR}/Microsoft.VC90.CRT.manifest"
- "${MSVC90_CRT_DIR}/msvcm90.dll"
- "${MSVC90_CRT_DIR}/msvcp90.dll"
- "${MSVC90_CRT_DIR}/msvcr90.dll"
- )
+ IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+ SET(__install__libs
+ "${MSVC90_CRT_DIR}/Microsoft.VC90.CRT.manifest"
+ "${MSVC90_CRT_DIR}/msvcm90.dll"
+ "${MSVC90_CRT_DIR}/msvcp90.dll"
+ "${MSVC90_CRT_DIR}/msvcr90.dll"
+ )
+ ENDIF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+
IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC90_CRT_DIR
"${MSVC90_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugCRT")
@@ -111,8 +132,8 @@ IF(MSVC)
"${MSVC90_CRT_DIR}/msvcp90d.dll"
"${MSVC90_CRT_DIR}/msvcr90d.dll"
)
- ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
- ENDIF(MSVC90)
+ ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
+ ENDIF(MSVC90)
IF(MSVC10)
# Find the runtime library redistribution directory.
@@ -120,26 +141,27 @@ IF(MSVC)
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;InstallDir]/../../VC/redist"
"${base_dir}/VC/redist"
+ "$ENV{ProgramFiles}/Microsoft Visual Studio 10.0/VC/redist"
+ "$ENV{ProgramFiles(x86)}/Microsoft Visual Studio 10.0/VC/redist"
)
MARK_AS_ADVANCED(MSVC10_REDIST_DIR)
SET(MSVC10_CRT_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.CRT")
- # Install the manifest that allows DLLs to be loaded from the
- # directory containing the executable.
- SET(__install__libs
- "${MSVC10_CRT_DIR}/Microsoft.VC100.CRT.manifest"
- "${MSVC10_CRT_DIR}/msvcp100.dll"
- "${MSVC10_CRT_DIR}/msvcr100.dll"
- )
+ IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+ SET(__install__libs
+ "${MSVC10_CRT_DIR}/msvcp100.dll"
+ "${MSVC10_CRT_DIR}/msvcr100.dll"
+ )
+ ENDIF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+
IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC10_CRT_DIR
- "${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugCRT")
+ "${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC100.DebugCRT")
SET(__install__libs ${__install__libs}
- "${MSVC10_CRT_DIR}/Microsoft.VC100.DebugCRT.manifest"
"${MSVC10_CRT_DIR}/msvcp100d.dll"
"${MSVC10_CRT_DIR}/msvcr100d.dll"
)
- ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
+ ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
ENDIF(MSVC10)
IF(CMAKE_INSTALL_MFC_LIBRARIES)
@@ -148,11 +170,13 @@ IF(MSVC)
"${SYSTEMROOT}/system32/mfc70.dll"
)
ENDIF(MSVC70)
+
IF(MSVC71)
SET(__install__libs ${__install__libs}
"${SYSTEMROOT}/system32/mfc71.dll"
)
ENDIF(MSVC71)
+
IF(MSVC80)
IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC80_MFC_DIR
@@ -165,17 +189,20 @@ IF(MSVC)
"${MSVC80_MFC_DIR}/mfcm80ud.dll"
)
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
-
+
SET(MSVC80_MFC_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFC")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
- SET(__install__libs ${__install__libs}
- "${MSVC80_MFC_DIR}/Microsoft.VC80.MFC.manifest"
- "${MSVC80_MFC_DIR}/mfc80.dll"
- "${MSVC80_MFC_DIR}/mfc80u.dll"
- "${MSVC80_MFC_DIR}/mfcm80.dll"
- "${MSVC80_MFC_DIR}/mfcm80u.dll"
- )
+ IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+ SET(__install__libs ${__install__libs}
+ "${MSVC80_MFC_DIR}/Microsoft.VC80.MFC.manifest"
+ "${MSVC80_MFC_DIR}/mfc80.dll"
+ "${MSVC80_MFC_DIR}/mfc80u.dll"
+ "${MSVC80_MFC_DIR}/mfcm80.dll"
+ "${MSVC80_MFC_DIR}/mfcm80u.dll"
+ )
+ ENDIF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+
# include the language dll's for vs8 as well as the actuall dll's
SET(MSVC80_MFCLOC_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFCLOC")
# Install the manifest that allows DLLs to be loaded from the
@@ -206,17 +233,20 @@ IF(MSVC)
"${MSVC90_MFC_DIR}/mfcm90ud.dll"
)
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
-
+
SET(MSVC90_MFC_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFC")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
- SET(__install__libs ${__install__libs}
- "${MSVC90_MFC_DIR}/Microsoft.VC90.MFC.manifest"
- "${MSVC90_MFC_DIR}/mfc90.dll"
- "${MSVC90_MFC_DIR}/mfc90u.dll"
- "${MSVC90_MFC_DIR}/mfcm90.dll"
- "${MSVC90_MFC_DIR}/mfcm90u.dll"
- )
+ IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+ SET(__install__libs ${__install__libs}
+ "${MSVC90_MFC_DIR}/Microsoft.VC90.MFC.manifest"
+ "${MSVC90_MFC_DIR}/mfc90.dll"
+ "${MSVC90_MFC_DIR}/mfc90u.dll"
+ "${MSVC90_MFC_DIR}/mfcm90.dll"
+ "${MSVC90_MFC_DIR}/mfcm90u.dll"
+ )
+ ENDIF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+
# include the language dll's for vs9 as well as the actuall dll's
SET(MSVC90_MFCLOC_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFCLOC")
# Install the manifest that allows DLLs to be loaded from the
@@ -240,30 +270,26 @@ IF(MSVC)
SET(MSVC10_MFC_DIR
"${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC100.DebugMFC")
SET(__install__libs ${__install__libs}
- "${MSVC10_MFC_DIR}/Microsoft.VC100.DebugMFC.manifest"
"${MSVC10_MFC_DIR}/mfc100d.dll"
"${MSVC10_MFC_DIR}/mfc100ud.dll"
"${MSVC10_MFC_DIR}/mfcm100d.dll"
"${MSVC10_MFC_DIR}/mfcm100ud.dll"
)
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
-
+
SET(MSVC10_MFC_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.MFC")
- # Install the manifest that allows DLLs to be loaded from the
- # directory containing the executable.
- SET(__install__libs ${__install__libs}
- "${MSVC10_MFC_DIR}/Microsoft.VC100.MFC.manifest"
- "${MSVC10_MFC_DIR}/mfc100.dll"
- "${MSVC10_MFC_DIR}/mfc100u.dll"
- "${MSVC10_MFC_DIR}/mfcm100.dll"
- "${MSVC10_MFC_DIR}/mfcm100u.dll"
- )
+ IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+ SET(__install__libs ${__install__libs}
+ "${MSVC10_MFC_DIR}/mfc100.dll"
+ "${MSVC10_MFC_DIR}/mfc100u.dll"
+ "${MSVC10_MFC_DIR}/mfcm100.dll"
+ "${MSVC10_MFC_DIR}/mfcm100u.dll"
+ )
+ ENDIF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+
# include the language dll's for vs10 as well as the actuall dll's
SET(MSVC10_MFCLOC_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.MFCLOC")
- # Install the manifest that allows DLLs to be loaded from the
- # directory containing the executable.
SET(__install__libs ${__install__libs}
- "${MSVC10_MFCLOC_DIR}/Microsoft.VC100.MFCLOC.manifest"
"${MSVC10_MFCLOC_DIR}/mfc100chs.dll"
"${MSVC10_MFCLOC_DIR}/mfc100cht.dll"
"${MSVC10_MFCLOC_DIR}/mfc100enu.dll"
@@ -275,7 +301,6 @@ IF(MSVC)
"${MSVC10_MFCLOC_DIR}/mfc100kor.dll"
)
ENDIF(MSVC10)
-
ENDIF(CMAKE_INSTALL_MFC_LIBRARIES)
FOREACH(lib
@@ -284,6 +309,15 @@ IF(MSVC)
IF(EXISTS ${lib})
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
+ ELSE(EXISTS ${lib})
+ IF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
+ MESSAGE(WARNING "system runtime library file does not exist: '${lib}'")
+ # This warning indicates an incomplete Visual Studio installation
+ # or a bug somewhere above here in this file.
+ # If you would like to avoid this warning, fix the real problem, or
+ # set CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS before including
+ # this file.
+ ENDIF()
ENDIF(EXISTS ${lib})
ENDFOREACH(lib)
ENDIF(MSVC)
@@ -292,10 +326,14 @@ ENDIF(MSVC)
# specified by CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS.
IF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
IF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
- IF(WIN32)
- INSTALL_PROGRAMS(/bin ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
- ELSE(WIN32)
- INSTALL_PROGRAMS(/lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
- ENDIF(WIN32)
+ IF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION)
+ IF(WIN32)
+ SET(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION bin)
+ ELSE(WIN32)
+ SET(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION lib)
+ ENDIF(WIN32)
+ ENDIF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION)
+ INSTALL(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
+ DESTINATION ${CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION})
ENDIF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
ENDIF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in
index 776bc07..df9d2d3 100644
--- a/Modules/NSIS.template.in
+++ b/Modules/NSIS.template.in
@@ -25,7 +25,7 @@
!include "MUI.nsh"
;Default installation folder
- InstallDir "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
+ InstallDir "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
;--------------------------------
;General
@@ -540,6 +540,7 @@ FunctionEnd
@CPACK_NSIS_INSTALLER_MUI_ICON_CODE@
@CPACK_NSIS_INSTALLER_ICON_CODE@
@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@
+@CPACK_NSIS_INSTALLER_MUI_FINISHPAGE_RUN_CODE@
;--------------------------------
;Pages
@@ -906,7 +907,7 @@ Function .onInit
; install directory that is expected to be the
; default
StrCpy $IS_DEFAULT_INSTALLDIR 0
- StrCmp "$INSTDIR" "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@" 0 +2
+ StrCmp "$INSTDIR" "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@" 0 +2
StrCpy $IS_DEFAULT_INSTALLDIR 1
StrCpy $SV_ALLUSERS "JustMe"
@@ -939,7 +940,7 @@ Function .onInit
done:
StrCmp $SV_ALLUSERS "AllUsers" 0 +3
StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2
- StrCpy $INSTDIR "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
+ StrCpy $INSTDIR "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 noOptionsPage
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "NSIS.InstallOptions.ini"
diff --git a/Modules/Platform/CYGWIN-GNU.cmake b/Modules/Platform/CYGWIN-GNU.cmake
index 6f72a75..5aad45b 100644
--- a/Modules/Platform/CYGWIN-GNU.cmake
+++ b/Modules/Platform/CYGWIN-GNU.cmake
@@ -24,7 +24,8 @@ set(CMAKE_CREATE_WIN32_EXE "-mwindows")
set(CMAKE_GNULD_IMAGE_VERSION
"-Wl,--major-image-version,<TARGET_VERSION_MAJOR>,--minor-image-version,<TARGET_VERSION_MINOR>")
-
+set(CMAKE_GENERATOR_RC windres)
+enable_language(RC)
macro(__cygwin_compiler_gnu lang)
# Binary link rules.
set(CMAKE_${lang}_CREATE_SHARED_MODULE
diff --git a/Modules/Platform/CYGWIN-windres.cmake b/Modules/Platform/CYGWIN-windres.cmake
new file mode 100644
index 0000000..8bc1b15
--- /dev/null
+++ b/Modules/Platform/CYGWIN-windres.cmake
@@ -0,0 +1 @@
+SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <FLAGS> <DEFINES> <SOURCE> <OBJECT>")
diff --git a/Modules/Platform/CYGWIN.cmake b/Modules/Platform/CYGWIN.cmake
index b157f72..b7ad2ce 100644
--- a/Modules/Platform/CYGWIN.cmake
+++ b/Modules/Platform/CYGWIN.cmake
@@ -1,9 +1,53 @@
-SET(WIN32 1)
+if("${CMAKE_MINIMUM_REQUIRED_VERSION}" VERSION_LESS "2.8.3.20101214")
+ set(__USE_CMAKE_LEGACY_CYGWIN_WIN32 1)
+endif()
+if(NOT DEFINED WIN32)
+ set(WIN32 0)
+ if(DEFINED __USE_CMAKE_LEGACY_CYGWIN_WIN32)
+ if(NOT DEFINED CMAKE_LEGACY_CYGWIN_WIN32
+ AND DEFINED ENV{CMAKE_LEGACY_CYGWIN_WIN32})
+ set(CMAKE_LEGACY_CYGWIN_WIN32 $ENV{CMAKE_LEGACY_CYGWIN_WIN32})
+ endif()
+ if(CMAKE_LEGACY_CYGWIN_WIN32)
+ message(STATUS "Defining WIN32 under Cygwin due to CMAKE_LEGACY_CYGWIN_WIN32")
+ set(WIN32 1)
+ elseif("x${CMAKE_LEGACY_CYGWIN_WIN32}" STREQUAL "x")
+ message(WARNING "CMake no longer defines WIN32 on Cygwin!"
+ "\n"
+ "(1) If you are just trying to build this project, ignore this warning "
+ "or quiet it by setting CMAKE_LEGACY_CYGWIN_WIN32=0 in your environment or "
+ "in the CMake cache. "
+ "If later configuration or build errors occur then this project may "
+ "have been written under the assumption that Cygwin is WIN32. "
+ "In that case, set CMAKE_LEGACY_CYGWIN_WIN32=1 instead."
+ "\n"
+ "(2) If you are developing this project, add the line\n"
+ " set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required\n"
+ "at the top of your top-level CMakeLists.txt file or set the minimum "
+ "required version of CMake to 2.8.4 or higher. "
+ "Then teach your project to build on Cygwin without WIN32.")
+ endif()
+ elseif(DEFINED CMAKE_LEGACY_CYGWIN_WIN32)
+ message(AUTHOR_WARNING "CMAKE_LEGACY_CYGWIN_WIN32 ignored because\n"
+ " cmake_minimum_required(VERSION ${CMAKE_MINIMUM_REQUIRED_VERSION})\n"
+ "is at least 2.8.4.")
+ endif()
+endif()
+if(DEFINED __USE_CMAKE_LEGACY_CYGWIN_WIN32)
+ # Pass WIN32 legacy setting to scripts.
+ if(WIN32)
+ set(ENV{CMAKE_LEGACY_CYGWIN_WIN32} 1)
+ else()
+ set(ENV{CMAKE_LEGACY_CYGWIN_WIN32} 0)
+ endif()
+ unset(__USE_CMAKE_LEGACY_CYGWIN_WIN32)
+endif()
+
SET(CYGWIN 1)
SET(CMAKE_SHARED_LIBRARY_PREFIX "cyg")
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll")
-SET(CMAKE_SHARED_MODULE_PREFIX "lib")
+SET(CMAKE_SHARED_MODULE_PREFIX "cyg")
SET(CMAKE_SHARED_MODULE_SUFFIX ".dll")
SET(CMAKE_IMPORT_LIBRARY_PREFIX "lib")
SET(CMAKE_IMPORT_LIBRARY_SUFFIX ".dll.a")
diff --git a/Modules/Platform/Darwin-GNU.cmake b/Modules/Platform/Darwin-GNU.cmake
index f425eb9..8a50a6a 100644
--- a/Modules/Platform/Darwin-GNU.cmake
+++ b/Modules/Platform/Darwin-GNU.cmake
@@ -20,8 +20,8 @@ set(__DARWIN_COMPILER_GNU 1)
macro(__darwin_compiler_gnu lang)
# GNU does not have -shared on OS X
- set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -headerpad_max_install_names")
- set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -headerpad_max_install_names")
+ set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
+ set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
endmacro()
macro(cmake_gnu_has_isysroot lang)
diff --git a/Modules/Platform/Darwin-NAG-Fortran.cmake b/Modules/Platform/Darwin-NAG-Fortran.cmake
new file mode 100644
index 0000000..933f9e1
--- /dev/null
+++ b/Modules/Platform/Darwin-NAG-Fortran.cmake
@@ -0,0 +1,5 @@
+set(CMAKE_Fortran_VERBOSE_FLAG "-Wl,-v") # Runs gcc under the hood.
+
+# Need -fpp explicitly on case-insensitive filesystem.
+set(CMAKE_Fortran_COMPILE_OBJECT
+ "<CMAKE_Fortran_COMPILER> -fpp -o <OBJECT> <DEFINES> <FLAGS> -c <SOURCE>")
diff --git a/Modules/Platform/Darwin-icc.cmake b/Modules/Platform/Darwin-icc.cmake
index 49aa843..b62036c 100644
--- a/Modules/Platform/Darwin-icc.cmake
+++ b/Modules/Platform/Darwin-icc.cmake
@@ -33,11 +33,11 @@ SET(CMAKE_SHARED_MODULE_PREFIX "lib")
SET(CMAKE_SHARED_MODULE_SUFFIX ".so")
SET(CMAKE_MODULE_EXISTS 1)
SET(CMAKE_DL_LIBS "")
-SET(CMAKE_C_LINK_FLAGS "-headerpad_max_install_names")
-SET(CMAKE_CXX_LINK_FLAGS "-headerpad_max_install_names")
+SET(CMAKE_C_LINK_FLAGS "-Wl,-headerpad_max_install_names")
+SET(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names")
SET(CMAKE_PLATFORM_HAS_INSTALLNAME 1)
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -headerpad_max_install_names")
-SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -headerpad_max_install_names")
+SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
+SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -Wl,-headerpad_max_install_names")
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index db0642e..a99ff4a 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -33,8 +33,8 @@ SET(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ")
SET(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
SET(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
-SET(CMAKE_C_LINK_FLAGS "-headerpad_max_install_names")
-SET(CMAKE_CXX_LINK_FLAGS "-headerpad_max_install_names")
+SET(CMAKE_C_LINK_FLAGS "-Wl,-headerpad_max_install_names")
+SET(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names")
IF(HAVE_FLAG_SEARCH_PATHS_FIRST)
SET(CMAKE_C_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
@@ -42,8 +42,8 @@ IF(HAVE_FLAG_SEARCH_PATHS_FIRST)
ENDIF(HAVE_FLAG_SEARCH_PATHS_FIRST)
SET(CMAKE_PLATFORM_HAS_INSTALLNAME 1)
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -headerpad_max_install_names")
-SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -headerpad_max_install_names")
+SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
+SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -Wl,-headerpad_max_install_names")
SET(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,")
SET(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,")
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
diff --git a/Modules/Platform/Linux-NAG-Fortran.cmake b/Modules/Platform/Linux-NAG-Fortran.cmake
new file mode 100644
index 0000000..353bae6
--- /dev/null
+++ b/Modules/Platform/Linux-NAG-Fortran.cmake
@@ -0,0 +1,10 @@
+set(CMAKE_Fortran_VERBOSE_FLAG "-Wl,-v") # Runs gcc under the hood.
+
+# Need one "-Wl," level to send flag through to gcc.
+# Use "-Xlinker" to get through gcc to real linker.
+set(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-Wl,-shared")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG "-Wl,-Xlinker,-rpath,-Xlinker,")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":")
+set(CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG "-Wl,-Xlinker,-rpath-link,-Xlinker,")
+set(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,-Xlinker,-soname,-Xlinker,")
+set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-Wl,-rdynamic")
diff --git a/Modules/Platform/SCO_SV.cmake b/Modules/Platform/SCO_SV.cmake
index efb7aa0..cbdcb7d 100644
--- a/Modules/Platform/SCO_SV.cmake
+++ b/Modules/Platform/SCO_SV.cmake
@@ -1,5 +1,2 @@
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-Kpic -belf")
-SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-Kpic -belf")
SET(CMAKE_DL_LIBS "")
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-belf -Wl,-Bexport")
INCLUDE(Platform/UnixPaths)
diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake
index ac635a5..7084b83 100644
--- a/Modules/Platform/Windows-GNU.cmake
+++ b/Modules/Platform/Windows-GNU.cmake
@@ -56,6 +56,8 @@ if("${_help}" MATCHES "GNU ld .* 2\\.1[1-6]")
set(__WINDOWS_GNU_LD_RESPONSE 0)
endif()
+enable_language(RC)
+
macro(__windows_compiler_gnu lang)
if(MSYS OR MINGW)
diff --git a/Modules/Platform/Windows-Intel-C.cmake b/Modules/Platform/Windows-Intel-C.cmake
new file mode 100644
index 0000000..767fec5
--- /dev/null
+++ b/Modules/Platform/Windows-Intel-C.cmake
@@ -0,0 +1,2 @@
+include(Platform/Windows-Intel)
+__windows_compiler_intel(C)
diff --git a/Modules/Platform/Windows-Intel-CXX.cmake b/Modules/Platform/Windows-Intel-CXX.cmake
new file mode 100644
index 0000000..2845b0f
--- /dev/null
+++ b/Modules/Platform/Windows-Intel-CXX.cmake
@@ -0,0 +1,4 @@
+include(Platform/Windows-Intel)
+set(_COMPILE_CXX " /TP")
+set(_FLAGS_CXX " /GX /GR")
+__windows_compiler_intel(CXX)
diff --git a/Modules/Platform/Windows-Intel-Fortran.cmake b/Modules/Platform/Windows-Intel-Fortran.cmake
new file mode 100644
index 0000000..c959287
--- /dev/null
+++ b/Modules/Platform/Windows-Intel-Fortran.cmake
@@ -0,0 +1,11 @@
+include(Platform/Windows-Intel)
+set(CMAKE_BUILD_TYPE_INIT Debug)
+set(_COMPILE_Fortran " /fpp")
+set(CMAKE_Fortran_MODDIR_FLAG "-module:")
+set(CMAKE_Fortran_STANDARD_LIBRARIES_INIT "user32.lib")
+__windows_compiler_intel(Fortran)
+SET (CMAKE_Fortran_FLAGS_INIT "/W1 /nologo /fpp /libs:dll /threads")
+SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "/debug:full /dbglibs")
+SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/O2 /D NDEBUG")
+SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "/O1 /D NDEBUG")
+SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/O1 /debug:full /D NDEBUG")
diff --git a/Modules/Platform/Windows-Intel.cmake b/Modules/Platform/Windows-Intel.cmake
index e893925..e7462ba 100644
--- a/Modules/Platform/Windows-Intel.cmake
+++ b/Modules/Platform/Windows-Intel.cmake
@@ -1,3 +1,66 @@
+
+#=============================================================================
+# Copyright 2002-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 distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# This module is shared by multiple languages; use include blocker.
+if(__WINDOWS_INTEL)
+ return()
+endif()
+set(__WINDOWS_INTEL 1)
+
+# make sure to enable languages after setting configuration types
+ENABLE_LANGUAGE(RC)
+SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
+
+SET(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:")
+SET(CMAKE_LINK_LIBRARY_FLAG "")
+SET(WIN32 1)
+IF(CMAKE_VERBOSE_MAKEFILE)
+ SET(CMAKE_CL_NOLOGO)
+ELSE(CMAKE_VERBOSE_MAKEFILE)
+ SET(CMAKE_CL_NOLOGO "/nologo")
+ENDIF(CMAKE_VERBOSE_MAKEFILE)
+SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
+SET(CMAKE_CREATE_WIN32_EXE /subsystem:windows)
+SET(CMAKE_CREATE_CONSOLE_EXE /subsystem:console)
+
+# default to Debug builds
+#SET(CMAKE_BUILD_TYPE_INIT Debug)
+SET(CMAKE_BUILD_TYPE_INIT Release)
+
+SET(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib")
+SET(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
+
+# executable linker flags
+SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
+IF(MSVC_C_ARCHITECTURE_ID)
+ SET(_MACHINE_ARCH_FLAG "/machine:${MSVC_C_ARCHITECTURE_ID}")
+ELSEIF(MSVC_CXX_ARCHITECTURE_ID)
+ SET(_MACHINE_ARCH_FLAG "/machine:${MSVC_CXX_ARCHITECTURE_ID}")
+ELSEIF(MSVC_Fortran_ARCHITECTURE_ID)
+ SET(_MACHINE_ARCH_FLAG "/machine:${MSVC_Fortran_ARCHITECTURE_ID}")
+ENDIF()
+SET (CMAKE_EXE_LINKER_FLAGS_INIT "/STACK:10000000 /INCREMENTAL:YES ${_MACHINE_ARCH_FLAG}")
+SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug")
+SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug")
+
+SET (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
+SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
+SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
+SET (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT})
+SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
+SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})
+
INCLUDE("${CMAKE_PLATFORM_ROOT_BIN}/CMakeIntelInformation.cmake" OPTIONAL)
IF(NOT _INTEL_XILINK_TEST_RUN)
@@ -15,3 +78,31 @@ SET(_INTEL_COMPILER_SUPPORTS_MANIFEST ${_INTEL_COMPILER_SUPPORTS_MANIFEST})
")
ENDIF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeIntelInformation.cmake")
ENDIF(NOT _INTEL_XILINK_TEST_RUN)
+
+macro(__windows_compiler_intel lang)
+ set(CMAKE_${lang}_COMPILE_OBJECT
+ "<CMAKE_${lang}_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} /Fo<OBJECT> <DEFINES> <FLAGS> -c <SOURCE>${CMAKE_END_TEMP_FILE}")
+ set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE
+ "<CMAKE_${lang}_COMPILER> > <PREPROCESSED_SOURCE> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} <DEFINES> <FLAGS> -E <SOURCE>${CMAKE_END_TEMP_FILE}")
+ set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS 1)
+ set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "lib ${CMAKE_CL_NOLOGO} <LINK_FLAGS> /out:<TARGET> <OBJECTS> ")
+ set(CMAKE_${lang}_CREATE_SHARED_LIBRARY
+ "xilink ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /dll <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
+ set(CMAKE_${lang}_CREATE_SHARED_MODULE "${CMAKE_${lang}_CREATE_SHARED_LIBRARY}")
+ set(CMAKE_${lang}_LINK_EXECUTABLE
+ "<CMAKE_${lang}_COMPILER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} <FLAGS> <OBJECTS> /Fe<TARGET> -link /implib:<TARGET_IMPLIB> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
+ set(CMAKE_${lang}_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000${_FLAGS_${lang}}")
+ set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Od /GZ")
+ set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/DNDEBUG /MD /O1")
+ set(CMAKE_${lang}_FLAGS_RELEASE_INIT "/DNDEBUG /MD /O2")
+ set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/DNDEBUG /MD /Zi /O2")
+
+ if(_INTEL_COMPILER_SUPPORTS_MANIFEST)
+ SET(CMAKE_${lang}_LINK_EXECUTABLE
+ "<CMAKE_COMMAND> -E vs_link_exe ${CMAKE_${lang}_LINK_EXECUTABLE}")
+ SET(CMAKE_${lang}_CREATE_SHARED_LIBRARY
+ "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_${lang}_CREATE_SHARED_LIBRARY}")
+ SET(CMAKE_${lang}_CREATE_SHARED_MODULE
+ "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_${lang}_CREATE_SHARED_MODULE}")
+ endif()
+endmacro()
diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake
index 7463c62..56582ff 100644
--- a/Modules/Platform/Windows-cl.cmake
+++ b/Modules/Platform/Windows-cl.cmake
@@ -212,6 +212,8 @@ SET (CMAKE_EXE_LINKER_FLAGS_INIT
SET( MSVC_INCREMENTAL_YES_FLAG "")
IF(NOT MSVC_INCREMENTAL_DEFAULT)
SET( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:YES")
+ELSE()
+ SET( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL" )
ENDIF()
IF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
diff --git a/Modules/Platform/Windows-g++.cmake b/Modules/Platform/Windows-g++.cmake
deleted file mode 100644
index 3aa393c..0000000
--- a/Modules/Platform/Windows-g++.cmake
+++ /dev/null
@@ -1 +0,0 @@
-INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-gcc.cmake)
diff --git a/Modules/Platform/Windows-icl.cmake b/Modules/Platform/Windows-icl.cmake
deleted file mode 100644
index 9088cc7..0000000
--- a/Modules/Platform/Windows-icl.cmake
+++ /dev/null
@@ -1,109 +0,0 @@
-SET(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:")
-SET(CMAKE_LINK_LIBRARY_FLAG "")
-SET(WIN32 1)
-IF(CMAKE_VERBOSE_MAKEFILE)
- SET(CMAKE_CL_NOLOGO)
-ELSE(CMAKE_VERBOSE_MAKEFILE)
- SET(CMAKE_CL_NOLOGO "/nologo")
-ENDIF(CMAKE_VERBOSE_MAKEFILE)
-
-SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
-SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1)
-
-# create a shared C++ library
-SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
- "xilink ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /dll <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
-
-SET(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
-
-# create a C shared library
-SET(CMAKE_C_CREATE_SHARED_LIBRARY ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
-
-# create a C shared module just copy the shared library rule
-SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_LIBRARY})
-
-
-# create a C++ static library
-SET(CMAKE_CXX_CREATE_STATIC_LIBRARY "lib ${CMAKE_CL_NOLOGO} <LINK_FLAGS> /out:<TARGET> <OBJECTS> ")
-
-# create a C static library
-SET(CMAKE_C_CREATE_STATIC_LIBRARY ${CMAKE_CXX_CREATE_STATIC_LIBRARY})
-
-# compile a C++ file into an object file
-SET(CMAKE_CXX_COMPILE_OBJECT
- "<CMAKE_CXX_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} /TP -DWIN32 /Fo<OBJECT> <DEFINES> <FLAGS> -c <SOURCE>${CMAKE_END_TEMP_FILE}")
-
-# compile a C file into an object file
-SET(CMAKE_C_COMPILE_OBJECT
- "<CMAKE_C_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} -DWIN32 /Fo<OBJECT> <DEFINES> <FLAGS> -c <SOURCE>${CMAKE_END_TEMP_FILE}")
-
-
-SET(CMAKE_C_LINK_EXECUTABLE
- "<CMAKE_C_COMPILER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} <FLAGS> <OBJECTS> /Fe<TARGET> -link /implib:<TARGET_IMPLIB> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
-
-SET(CMAKE_C_CREATE_PREPROCESSED_SOURCE
- "<CMAKE_C_COMPILER> > <PREPROCESSED_SOURCE> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} <FLAGS> <DEFINES> -E <SOURCE>${CMAKE_END_TEMP_FILE}")
-
-SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE
- "<CMAKE_CXX_COMPILER> > <PREPROCESSED_SOURCE> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} <FLAGS> <DEFINES> /TP -E <SOURCE>${CMAKE_END_TEMP_FILE}")
-
-SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
-
-SET(CMAKE_CXX_LINK_EXECUTABLE
- "<CMAKE_CXX_COMPILER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} <FLAGS> <OBJECTS> /Fe<TARGET> -link /implib:<TARGET_IMPLIB> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
-
-SET(CMAKE_CREATE_WIN32_EXE /subsystem:windows)
-SET(CMAKE_CREATE_CONSOLE_EXE /subsystem:console)
-
-# default to Debug builds
-#SET(CMAKE_BUILD_TYPE_INIT Debug)
-SET(CMAKE_BUILD_TYPE_INIT Release)
-SET (CMAKE_CXX_FLAGS_INIT "/W3 /Zm1000 /GX /GR")
-SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/MDd /Zi /Od /GZ")
-SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MD /O1")
-SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /O2")
-SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2")
-SET (CMAKE_C_FLAGS_INIT "/W3 /Zm1000")
-SET (CMAKE_C_FLAGS_DEBUG_INIT "/MDd /Zi /Od /GZ")
-SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MD /O1")
-SET (CMAKE_C_FLAGS_RELEASE_INIT "/MD /O2")
-SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2")
-
-
-SET(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib")
-SET(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
-
-# executable linker flags
-SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
-SET(_MACHINE_ARCH_FLAG ${MSVC_C_ARCHITECTURE_ID})
-IF(NOT _MACHINE_ARCH_FLAG)
- SET(_MACHINE_ARCH_FLAG ${MSVC_CXX_ARCHITECTURE_ID})
-ENDIF(NOT _MACHINE_ARCH_FLAG)
-SET (CMAKE_EXE_LINKER_FLAGS_INIT "/STACK:10000000 /INCREMENTAL:YES /machine:${_MACHINE_ARCH_FLAG}")
-SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug")
-SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug")
-
-SET (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
-SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
-SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
-SET (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT})
-SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
-SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})
-
-
-INCLUDE(Platform/Windows-Intel)
-
-IF(_INTEL_COMPILER_SUPPORTS_MANIFEST)
- SET(CMAKE_C_LINK_EXECUTABLE
- "<CMAKE_COMMAND> -E vs_link_exe ${CMAKE_C_LINK_EXECUTABLE}")
- SET(CMAKE_C_CREATE_SHARED_LIBRARY
- "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_C_CREATE_SHARED_LIBRARY}")
- SET(CMAKE_C_CREATE_SHARED_MODULE
- "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_C_CREATE_SHARED_MODULE}")
- SET(CMAKE_CXX_LINK_EXECUTABLE
- "<CMAKE_COMMAND> -E vs_link_exe ${CMAKE_CXX_LINK_EXECUTABLE}")
- SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
- "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_CXX_CREATE_SHARED_LIBRARY}")
- SET(CMAKE_CXX_CREATE_SHARED_MODULE
- "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_CXX_CREATE_SHARED_MODULE}")
-ENDIF(_INTEL_COMPILER_SUPPORTS_MANIFEST)
diff --git a/Modules/Platform/Windows-ifort.cmake b/Modules/Platform/Windows-ifort.cmake
deleted file mode 100644
index 6cffed9..0000000
--- a/Modules/Platform/Windows-ifort.cmake
+++ /dev/null
@@ -1,80 +0,0 @@
-SET(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:")
-SET(CMAKE_LINK_LIBRARY_FLAG "")
-SET(WIN32 1)
-IF(CMAKE_VERBOSE_MAKEFILE)
- SET(CMAKE_CL_NOLOGO)
-ELSE(CMAKE_VERBOSE_MAKEFILE)
- SET(CMAKE_CL_NOLOGO "/nologo")
-ENDIF(CMAKE_VERBOSE_MAKEFILE)
-
-SET(CMAKE_Fortran_MODDIR_FLAG "-module:")
-
-SET(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1)
-
-SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
- "link ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /dll <LINK_FLAGS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
-
-SET(CMAKE_Fortran_CREATE_SHARED_MODULE ${CMAKE_Fortran_CREATE_SHARED_LIBRARY})
-
-# create a C++ static library
-SET(CMAKE_Fortran_CREATE_STATIC_LIBRARY "lib ${CMAKE_CL_NOLOGO} <LINK_FLAGS> /out:<TARGET> <OBJECTS> ")
-
-# compile a C++ file into an object file
-SET(CMAKE_Fortran_COMPILE_OBJECT
- "<CMAKE_Fortran_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} /fpp /Fo<OBJECT> <DEFINES> <FLAGS> -c <SOURCE>${CMAKE_END_TEMP_FILE}")
-
-SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
-
-SET(CMAKE_Fortran_LINK_EXECUTABLE
- "<CMAKE_Fortran_COMPILER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} <FLAGS> /Fe<TARGET> -link /implib:<TARGET_IMPLIB> <CMAKE_Fortran_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
-
-INCLUDE(Platform/Windows-Intel)
-
-IF(_INTEL_COMPILER_SUPPORTS_MANIFEST)
- SET(CMAKE_Fortran_LINK_EXECUTABLE
- "<CMAKE_COMMAND> -E vs_link_exe ${CMAKE_Fortran_LINK_EXECUTABLE}")
- SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
- "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_Fortran_CREATE_SHARED_LIBRARY}")
- SET(CMAKE_Fortran_CREATE_SHARED_MODULE
- "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_Fortran_CREATE_SHARED_MODULE}")
-ENDIF(_INTEL_COMPILER_SUPPORTS_MANIFEST)
-
-SET(CMAKE_CREATE_WIN32_EXE /subsystem:windows)
-SET(CMAKE_CREATE_CONSOLE_EXE /subsystem:console)
-
-IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
- SET (CMAKE_NO_BUILD_TYPE 1)
-ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
-IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8")
- SET (CMAKE_NO_BUILD_TYPE 1)
- SET (CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo" CACHE STRING
- "Semicolon separated list of supported configuration types, only supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything else will be ignored.")
-ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8")
-# does the compiler support pdbtype and is it the newer compiler
-
-SET(CMAKE_BUILD_TYPE_INIT Debug)
-SET (CMAKE_Fortran_FLAGS_INIT "/W1 /nologo /fpp /libs:dll /threads")
-SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "/debug:full /dbglibs")
-SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/O2 /D NDEBUG")
-SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "/O1 /D NDEBUG")
-SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/O1 /debug:full /D NDEBUG")
-
-SET (CMAKE_Fortran_STANDARD_LIBRARIES_INIT "user32.lib")
-
-# executable linker flags
-SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
-SET (CMAKE_EXE_LINKER_FLAGS_INIT " /INCREMENTAL:YES")
-IF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
- SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept")
- SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug /pdbtype:sept")
-ELSE (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
- SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug")
- SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug")
-ENDIF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
-
-SET (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
-SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
-SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
-SET (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT})
-SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
-SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})
diff --git a/Modules/Platform/Windows-windres.cmake b/Modules/Platform/Windows-windres.cmake
new file mode 100644
index 0000000..8bc1b15
--- /dev/null
+++ b/Modules/Platform/Windows-windres.cmake
@@ -0,0 +1 @@
+SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <FLAGS> <DEFINES> <SOURCE> <OBJECT>")
diff --git a/Modules/Qt4ConfigDependentSettings.cmake b/Modules/Qt4ConfigDependentSettings.cmake
index bfb50de..10af3bc 100644
--- a/Modules/Qt4ConfigDependentSettings.cmake
+++ b/Modules/Qt4ConfigDependentSettings.cmake
@@ -35,10 +35,10 @@ SET(QT_QTHELP_LIB_DEPENDENCIES ${QT_QTCLUCENE_LIBRARY})
IF(Q_WS_WIN)
- # On Windows, qconfig.pri has "static" for static library builds
- IF(QT_CONFIG MATCHES "static")
+ # On Windows, qconfig.pri has "shared" for shared library builds
+ IF(NOT QT_CONFIG MATCHES "shared")
SET(QT_IS_STATIC 1)
- ENDIF(QT_CONFIG MATCHES "static")
+ ENDIF(NOT QT_CONFIG MATCHES "shared")
ELSE(Q_WS_WIN)
# On other platforms, check file extension to know if its static
IF(QT_QTCORE_LIBRARY_RELEASE)
@@ -75,6 +75,23 @@ IF(QT_QCONFIG MATCHES "system-png")
SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${PNG_LIBRARY})
ENDIF(QT_QCONFIG MATCHES "system-png")
+## system jpeg
+IF(QT_QCONFIG MATCHES "system-jpeg")
+ find_package(JPEG)
+ SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${JPEG_LIBRARIES})
+ENDIF(QT_QCONFIG MATCHES "system-jpeg")
+
+## system tiff
+IF(QT_QCONFIG MATCHES "system-tiff")
+ find_package(TIFF)
+ SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${TIFF_LIBRARIES})
+ENDIF(QT_QCONFIG MATCHES "system-tiff")
+
+## system mng
+IF(QT_QCONFIG MATCHES "system-mng")
+ find_library(MNG_LIBRARY NAMES mng)
+ SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${MNG_LIBRARY})
+ENDIF(QT_QCONFIG MATCHES "system-mng")
# for X11, get X11 library directory
IF(Q_WS_X11)
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake
index 700d3a2..86a7404 100644
--- a/Modules/Qt4Macros.cmake
+++ b/Modules/Qt4Macros.cmake
@@ -71,12 +71,12 @@ MACRO (QT4_GET_MOC_FLAGS _moc_flags)
GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES)
FOREACH(_current ${_inc_DIRS})
- IF("${_current}" MATCHES ".framework/?$")
- STRING(REGEX REPLACE "/[^/]+.framework" "" framework_path "${_current}")
+ IF("${_current}" MATCHES "\\.framework/?$")
+ STRING(REGEX REPLACE "/[^/]+\\.framework" "" framework_path "${_current}")
SET(${_moc_flags} ${${_moc_flags}} "-F${framework_path}")
- ELSE("${_current}" MATCHES ".framework/?$")
+ ELSE("${_current}" MATCHES "\\.framework/?$")
SET(${_moc_flags} ${${_moc_flags}} "-I${_current}")
- ENDIF("${_current}" MATCHES ".framework/?$")
+ ENDIF("${_current}" MATCHES "\\.framework/?$")
ENDFOREACH(_current ${_inc_DIRS})
GET_DIRECTORY_PROPERTY(_defines COMPILE_DEFINITIONS)
@@ -196,11 +196,16 @@ MACRO (QT4_ADD_RESOURCES outfiles )
ENDIF(NOT IS_ABSOLUTE "${_RC_FILE}")
SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
ENDFOREACH(_RC_FILE)
+ # Since this cmake macro is doing the dependency scanning for these files,
+ # let's make a configured file and add it as a dependency so cmake is run
+ # again when dependencies need to be recomputed.
+ QT4_MAKE_OUTPUT_FILE("${infile}" "" "qrc.depends" out_depends)
+ CONFIGURE_FILE("${infile}" "${out_depends}" COPY_ONLY)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${QT_RCC_EXECUTABLE}
ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
MAIN_DEPENDENCY ${infile}
- DEPENDS ${_RC_DEPENDS})
+ DEPENDS ${_RC_DEPENDS} "${out_depends}")
SET(${outfiles} ${${outfiles}} ${outfile})
ENDFOREACH (it)
@@ -249,7 +254,15 @@ MACRO(QT4_GENERATE_DBUS_INTERFACE _header) # _customName OPTIONS -some -options
GET_FILENAME_COMPONENT(_basename ${_header} NAME_WE)
IF (_customName)
- SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_customName})
+ if (IS_ABSOLUTE ${_customName})
+ get_filename_component(_containingDir ${_customName} PATH)
+ if (NOT EXISTS ${_containingDir})
+ file(MAKE_DIRECTORY "${_containingDir}")
+ endif()
+ SET(_target ${_customName})
+ else()
+ SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_customName})
+ endif()
ELSE (_customName)
SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.xml)
ENDIF (_customName)
diff --git a/Modules/SystemInformation.cmake b/Modules/SystemInformation.cmake
index d973e90f..d4f2233 100644
--- a/Modules/SystemInformation.cmake
+++ b/Modules/SystemInformation.cmake
@@ -1,6 +1,6 @@
#=============================================================================
-# Copyright 2007-2009 Kitware, Inc.
+# Copyright 2007-2010 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -12,6 +12,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
+CMAKE_MINIMUM_REQUIRED(VERSION ${CMAKE_VERSION})
PROJECT(DumpInformation)
# first get the standard information for th platform