Commit ebd0c2d3 authored by Bill Hoffman's avatar Bill Hoffman

Merge in changes for RC 3

parent f9687e32
......@@ -315,7 +315,7 @@ ENDMACRO (CMAKE_BUILD_UTILITIES)
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 8)
SET(CMake_VERSION_PATCH 0)
SET(CMake_VERSION_RC 2)
SET(CMake_VERSION_RC 3)
# We use odd minor numbers for development versions.
# Use a date for the development patch level.
......@@ -460,9 +460,9 @@ INSTALL(
DIRECTORY_PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
PATTERN "*.sh.in" PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
PATTERN "*.sh*" PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
PATTERN "CVS" EXCLUDE
)
......
......@@ -25,6 +25,7 @@ SET(CTEST_CUSTOM_WARNING_EXCEPTION
"remark\\(1209"
"stl_deque.h:1051"
"(Lexer|Parser).*warning.*conversion.*may (alter its value|change the sign)"
"[Qq]t([Cc]ore|[Gg]ui).*warning.*conversion.*may alter its value"
"Parser.cxx.*warning.*2111-D.*statement is unreachable"
"CMakeSetupManifest.xml.*manifest authoring warning.*Unrecognized Element"
)
......
Changes in CMake 2.8.0 RC 3
- CTest Added OS Platform (cpu architecture) detection support to windows system
- Several minor FindBoost changes to address posts on mailing list
- Resolve #9685: Fix include dir to be correct path for gnutils
- Fix color check for dependency scanning
- Remove CMP00015 for now as it breaks more things than it fixes
- Reduce duration of ctest_sleep arguments. Add SmallAndFast project. Replace kwsys with SmallAndFast to make CTestTest faster. (I will keep an eye on coverage results after this commit and make sure we still have equivalent ctest coverage.)
- Do not use -fPIC to link executables
- Split Borland compiler information files
- Trimmed off the newline from sw_vers output on mac, it could cause xml parsing errors if left in
- Check for openssl-linked option with Qt 4.4+ before making ssl a dependency.
- Make Complex test of CMakeLib more optional
- Modernize FindVTK module
- Fix find_package() when <pkg>_DIR is wrong
- Do not collapse path of NOTFOUND values
- More robust implicit link line detection regex
- fix Xcode 30 generator
- Use the correct CMake (the freshly built one) to drive the CMakeWizardTest.
- Support more special characters in file(STRINGS)
- Log implicit link line detection regex
- speedup C dependency scanning even more
- Avoid non-root copies of root-only targets
- Added better OS information for Mac OS X
- Use work-around from bug 4772 for C++ and Fortran
- FortranCInterface: Mangling for Intel on Windows
- cmake-gui don't allow consecutive generates without a configure.
- Fix Preprocess test for Intel on Windows
- Teach intel compiler on windows to place .lib files and .pdb files.
- CPack: Fix bash-isms in launch script
- BUG: #0009648 Change "The following tests FAILED" message to print on stdout rather than stderr
- Avoid (Unix|Windows)Paths.cmake multiple include
- When getting include dirs for moc, also watch for framework includes and use -F instead of -I.
- Find locally installed software first
- Add '#!/bin/sh' to cygwin-package.sh
- Fix permsissions of installed SquishRunTestCase.sh
- Fix module docs to be manpage (groff) friendly
- Support GNU/kFreeBSD
- Remove old Encoding field from CMake.desktop
- FindQt3: Prefer (moc|uic)-qt3 names over (moc|uic)
- Match width of ctest "Start xx: " line to line up with the end test line
- Remove old license from FindPkgConfig.cmake module
- Test target link information invalidation
- Invalidate target link info when necessary
- Use new style header generation and get rid of OBJECT_DEPENDS in tutorial
- Fix issue #8649 - move the location of CPACK_NSIS_EXTRA_INSTALL_COMMANDS so that it is not excluded from execution when 'Do not create shortcuts' is checked.
- add the additional features for the dbus macros from KDE's FindQt4.cmake
fc9f7a5 Fix warnings in CMake source code.
- Correct some typos in error messages in the string command. Add a test that covers more of the code implemented in cmStringCommand.cxx, especially the error handlers.
- Create INTERPROCEDURAL_OPTIMIZATION build feature
- Document CMAKE_CURRENT_LIST_FILE more precisely
- Fix the documentation to say what it really does. Bug #9638
- document how the minimum version can be specified
- Fix warnings in CMake source code. Suppress rampant warnings emanating from Qt files.
- Add documentation for Cocoa flag and move Motif under X11 flag.
Changes in CMake 2.8.0 RC 2
- Fix FindQt4 so that QtHelp depends on QtNetwork
- Add missing copyright notice to CMake.cmake module
......
......@@ -58,13 +58,12 @@ IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF (NOT _INCLUDED_FILE)
# some systems include the compiler information in the system file
# and if this is the enable_language command then it may not have been
# included at this point, or needs to be included again so that the
# language_INIT variables are set correctly
# We specify the compiler information in the system file for some
# platforms, but this language may not have been enabled when the file
# was first included. Include it again to get the language info.
# Remove this when all compiler info is removed from system files.
IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
ENDIF (NOT _INCLUDED_FILE)
......
......@@ -54,7 +54,15 @@ IF(CMAKE_CXX_COMPILER_ID)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF(CMAKE_CXX_COMPILER_ID)
IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL
RESULT_VARIABLE _INCLUDED_FILE)
ENDIF (NOT _INCLUDED_FILE)
# We specify the compiler information in the system file for some
# platforms, but this language may not have been enabled when the file
# was first included. Include it again to get the language info.
# Remove this when all compiler info is removed from system files.
IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
ENDIF (NOT _INCLUDED_FILE)
......
......@@ -66,7 +66,9 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src)
AND NOT "${CMAKE_OSX_ARCHITECTURES}" MATCHES ";"
# Skip this with Xcode for now.
AND NOT "${CMAKE_GENERATOR}" MATCHES Xcode)
CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs)
CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs log)
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Parsed ${lang} implicit link information from above output:\n${log}\n\n")
ENDIF()
SET(CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES "${implicit_libs}" PARENT_SCOPE)
SET(CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES "${implicit_dirs}" PARENT_SCOPE)
......
......@@ -25,6 +25,7 @@
# HP-UX HP-UX
# IRIX IRIX
# Linux Linux
# GNU/kFreeBSD GNU/kFreeBSD
# NetBSD NetBSD
# OpenBSD OpenBSD
# OFS/1 (Digital Unix) OSF1
......@@ -121,6 +122,11 @@ MACRO(ADJUST_CMAKE_SYSTEM_VARIABLES _PREFIX)
SET(${_PREFIX}_NAME BSDOS)
ENDIF(${_PREFIX}_NAME MATCHES BSD.OS)
# fix for GNU/kFreeBSD, remove the GNU/
IF(${_PREFIX}_NAME MATCHES kFreeBSD)
SET(${_PREFIX}_NAME kFreeBSD)
ENDIF(${_PREFIX}_NAME MATCHES kFreeBSD)
# fix for CYGWIN which has windows version in it
IF(${_PREFIX}_NAME MATCHES CYGWIN)
SET(${_PREFIX}_NAME CYGWIN)
......
......@@ -28,13 +28,20 @@ IF(CMAKE_COMPILER_IS_GNUG77)
SET(CMAKE_BASE_NAME g77)
ENDIF(CMAKE_COMPILER_IS_GNUG77)
IF(CMAKE_Fortran_COMPILER_ID)
IF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake)
SET(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER_ID}-Fortran)
ENDIF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF(CMAKE_Fortran_COMPILER_ID)
SET(CMAKE_SYSTEM_AND_Fortran_COMPILER_INFO_FILE
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL
RESULT_VARIABLE _INCLUDED_FILE)
ENDIF (NOT _INCLUDED_FILE)
# We specify the compiler information in the system file for some
# platforms, but this language may not have been enabled when the file
# was first included. Include it again to get the language info.
# Remove this when all compiler info is removed from system files.
IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
ENDIF (NOT _INCLUDED_FILE)
# This should be included before the _INIT variables are
# used to initialize the cache. Since the rule variables
......
......@@ -16,16 +16,20 @@
# 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)
function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var)
set(implicit_libs "")
set(implicit_dirs_tmp)
set(log "")
# Parse implicit linker arguments.
set(linker "CMAKE_LINKER-NOTFOUND")
if(CMAKE_LINKER)
get_filename_component(linker ${CMAKE_LINKER} NAME)
endif()
set(linker_regex "^( *|.*/)(${linker}|ld|collect2)")
# Construct a regex to match linker lines. It must match both the
# whole line and just the command (argv[0]).
set(linker_regex "^( *|.*[/\\])(${linker}|ld|collect2)[^/\\]*( |$)")
set(log "${log} link line regex: [${linker_regex}]\n")
string(REGEX REPLACE "\r?\n" ";" output_lines "${text}")
foreach(line IN LISTS output_lines)
set(cmd)
......@@ -38,38 +42,51 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var)
list(GET args 0 cmd)
endif()
if("${cmd}" MATCHES "${linker_regex}")
set(log "${log} link line: [${line}]\n")
string(REGEX REPLACE ";-([LYz]);" ";-\\1" args "${args}")
foreach(arg IN LISTS args)
if("${arg}" MATCHES "^-L(.:)?[/\\]")
# Unix search path.
string(REGEX REPLACE "^-L" "" dir "${arg}")
list(APPEND implicit_dirs_tmp ${dir})
set(log "${log} arg [${arg}] ==> dir [${dir}]\n")
elseif("${arg}" MATCHES "^-l[^:]")
# Unix library.
string(REGEX REPLACE "^-l" "" lib "${arg}")
list(APPEND implicit_libs ${lib})
set(log "${log} arg [${arg}] ==> lib [${lib}]\n")
elseif("${arg}" MATCHES "^(.:)?[/\\].*\\.a$")
# Unix library full path.
list(APPEND implicit_libs ${arg})
set(log "${log} arg [${arg}] ==> lib [${arg}]\n")
elseif("${arg}" MATCHES "^-Y(P,)?")
# Sun search path.
string(REGEX REPLACE "^-Y(P,)?" "" dirs "${arg}")
string(REPLACE ":" ";" dirs "${dirs}")
list(APPEND implicit_dirs_tmp ${dirs})
set(log "${log} arg [${arg}] ==> dirs [${dirs}]\n")
elseif("${arg}" MATCHES "^-l:")
# HP named library.
list(APPEND implicit_libs ${arg})
set(log "${log} arg [${arg}] ==> lib [${arg}]\n")
elseif("${arg}" MATCHES "^-z(all|default|weak)extract")
# Link editor option.
list(APPEND implicit_libs ${arg})
set(log "${log} arg [${arg}] ==> opt [${arg}]\n")
else()
set(log "${log} arg [${arg}] ==> ignore\n")
endif()
endforeach()
break()
elseif("${line}" MATCHES "LPATH(=| is:? )")
set(log "${log} LPATH line: [${line}]\n")
# HP search path.
string(REGEX REPLACE ".*LPATH(=| is:? *)" "" paths "${line}")
string(REPLACE ":" ";" paths "${paths}")
list(APPEND implicit_dirs_tmp ${paths})
set(log "${log} dirs [${paths}]\n")
else()
set(log "${log} ignore line: [${line}]\n")
endif()
endforeach()
......@@ -78,10 +95,16 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var)
foreach(d IN LISTS implicit_dirs_tmp)
get_filename_component(dir "${d}" ABSOLUTE)
list(APPEND implicit_dirs "${dir}")
set(log "${log} collapse dir [${d}] ==> [${dir}]\n")
endforeach()
list(REMOVE_DUPLICATES implicit_dirs)
# Log results.
set(log "${log} implicit libs: [${implicit_libs}]\n")
set(log "${log} implicit dirs: [${implicit_dirs}]\n")
# Return results.
set(${lib_var} "${implicit_libs}" PARENT_SCOPE)
set(${dir_var} "${implicit_dirs}" PARENT_SCOPE)
set(${log_var} "${log}" PARENT_SCOPE)
endfunction()
......@@ -3,10 +3,10 @@
# Modified from: Aaron Voisine <aaron@voisine.org>
CWD="`dirname \"$0\"`"
TMP=/tmp/$UID/TemporaryItems
TMP=/tmp/$(id -ru)/TemporaryItems
version=`sw_vers -productVersion`
if [ "$?" == "0" ]; then
if [ "$?" = "0" ]; then
major=${version%%\.*}
rest=${version#*\.}
minor=${rest%%\.*}
......@@ -24,7 +24,7 @@ echo "Build = $build"
# if 10.5 or greater, then all the open-x11 stuff need not occur
if ((( $major < 10 )) || ((( $major == 10)) && (( $minor < 5 )))); then
if [ "$major" -lt 10 ] || ([ "$major" -eq 10 ] && [ "$minor" -lt 5 ]); then
version=`sw_vers -productVersion`
if [ "$?" = "0" ]; then
major=${version%%\.*}
......@@ -44,7 +44,7 @@ echo "Build = $build"
# if 10.5 or greater, then all the open-x11 stuff need not occur
if ((( $major < 10 )) || ((( $major == 10)) && (( $minor < 5 )))); then
if [ "$major" -lt 10 ] || ([ "$major" -eq 10 ] && [ "$minor" -lt 5 ]); then
ps -wx -ocommand | grep -e '[X]11.app' > /dev/null
if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then
echo "rm -f ~/.xinitrc" > ~/.xinitrc
......
......@@ -22,13 +22,13 @@
# BISON_${Name}_OUTPUTS - The sources files generated by bison
# BISON_${Name}_COMPILE_FLAGS - Options used in the bison command line
#
#====================================================================
# Example:
# ====================================================================
# Example:
#
# find_package(BISON)
# BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
# add_executable(Foo main.cpp ${BISON_MyParser_OUTPUTS})
#====================================================================
# find_package(BISON)
# BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
# add_executable(Foo main.cpp ${BISON_MyParser_OUTPUTS})
# ====================================================================
#=============================================================================
# Copyright 2009 Kitware, Inc.
......
# - Try to find Boost include dirs and libraries
# Usage of this module as follows:
#
# NOTE: Take note of the Boost_ADDITIONAL_VERSIONS variable below.
# Due to Boost naming conventions and limitations in CMake this find
# module is NOT future safe with respect to Boost version numbers,
# and may break.
#
# == Using Header-Only libraries from within Boost: ==
#
# find_package( Boost 1.36.0 )
......@@ -65,7 +70,7 @@
# omit the 3rd version number from include paths if it is 0 although not all
# binary Boost releases do so.
#
# SET(Boost_ADDITIONAL_VERSIONS "0.99" "0.99.0" "1.78" "1.78.0")
# SET(Boost_ADDITIONAL_VERSIONS "1.78" "1.78.0" "1.79" "1.79.0")
#
# ===================================== ============= ========================
#
......@@ -90,6 +95,12 @@
# of FindBoost.cmake if you are having problems.
# Please enable this before filing any bug
# reports.
#
# Boost_DETAILED_FAILURE_MSG FindBoost doesn't output detailed information
# about why it failed or how to fix the problem
# unless this is set to TRUE or the REQUIRED
# keyword is specified in find_package().
# [Since CMake 2.8.0]
#
# Boost_COMPILER Set this to the compiler suffix used by Boost
# (e.g. "-gcc43") if FindBoost has problems finding
......@@ -154,6 +165,7 @@
# Copyright 2007 Wengo
# Copyright 2007 Mike Jackson
# Copyright 2008 Andreas Pakulat <apaku@gmx.de>
# Copyright 2008-2009 Philip Lowman <philip@yhbt.com>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
......@@ -547,8 +559,9 @@ ELSE (_boost_IN_CACHE)
# NOTE: this is not perfect yet, if you experience any issues
# please report them and use the Boost_COMPILER variable
# to work around the problems.
if("${CMAKE_CXX_COMPILER}" MATCHES "icl"
OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"
OR "${CMAKE_CXX_COMPILER}" MATCHES "icl"
OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
if(WIN32)
set (_boost_COMPILER "-iw")
else()
......@@ -874,11 +887,23 @@ ELSE (_boost_IN_CACHE)
SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${UPPERCOMPONENT}_LIBRARY})
ENDIF ( Boost_${UPPERCOMPONENT}_FOUND )
ENDFOREACH(COMPONENT)
ELSE (Boost_FOUND)
IF (Boost_FIND_REQUIRED)
message(SEND_ERROR "Unable to find the requested Boost libraries.\n${Boost_ERROR_REASON}")
ENDIF(Boost_FIND_REQUIRED)
ENDIF(Boost_FOUND)
else()
if(Boost_FIND_REQUIRED)
message(SEND_ERROR "Unable to find the requested Boost libraries.\n${Boost_ERROR_REASON}")
else()
if(NOT Boost_FIND_QUIETLY)
# we opt not to automatically output Boost_ERROR_REASON here as
# it could be quite lengthy and somewhat imposing in it's requests
# Since Boost is not always a required dependency we'll leave this
# up to the end-user.
if(Boost_DEBUG OR Boost_DETAILED_FAILURE_MSG)
message(STATUS "Could NOT find Boost\n${Boost_ERROR_REASON}")
else()
message(STATUS "Could NOT find Boost")
endif()
endif()
endif(Boost_FIND_REQUIRED)
endif()
# show the Boost_INCLUDE_DIRS AND Boost_LIBRARIES variables only in the advanced view
MARK_AS_ADVANCED(Boost_INCLUDE_DIR
......
......@@ -222,8 +222,7 @@
# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
# Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html
#
# Copyright (c) 2008-2009
# NVIDIA Corp.
# Copyright (c) 2008 - 2009 NVIDIA Corporation. All rights reserved.
#
# Copyright (c) 2007-2009
# Scientific Computing and Imaging Institute, University of Utah
......@@ -1028,6 +1027,8 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
${main_dep}
DEPENDS ${CUDA_NVCC_DEPEND}
DEPENDS ${custom_target_script}
# Make sure the output directory exists before trying to write to it.
COMMAND ${CMAKE_COMMAND} -E make_directory "${generated_file_path}"
COMMAND ${CMAKE_COMMAND} ARGS
-D verbose:BOOL=${verbose_output}
${ccbin_flags}
......
# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
# Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html
#
# Copyright (c) 2008-2009
# NVIDIA Corp.
# Copyright (c) 2008 - 2009 NVIDIA Corporation. All rights reserved.
#
# Copyright (c) 2007-2009
# Scientific Computing and Imaging Institute, University of Utah
......
# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
# Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html
#
# Copyright (c) 2008-2009
# NVIDIA Corp.
# Copyright (c) 2008 - 2009 NVIDIA Corporation. All rights reserved.
#
# Copyright (c) 2007-2009
# Scientific Computing and Imaging Institute, University of Utah
......
# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
#
# Copyright (c) 2008-2009
# NVIDIA Corp.
# Copyright (c) 2008 - 2009 NVIDIA Corporation. All rights reserved.
#
# This code is licensed under the MIT License. See the FindCUDA.cmake script
# for the text of the license.
......@@ -151,12 +150,6 @@ cuda_execute_process(
COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}"
)
# Make sure the output directory is present
cuda_execute_process(
"Creating output directory: ${generated_file_path}"
COMMAND "${CMAKE_COMMAND}" -E make_directory "${generated_file_path}"
)
# Generate the dependency file
cuda_execute_process(
"Generating dependency file: ${NVCC_generated_dependency_file}"
......
......@@ -26,23 +26,23 @@
# where <FlexTarget> and <BisonTarget> are the first parameters of
# respectively FLEX_TARGET and BISON_TARGET macros.
#
#====================================================================
# Example:
# ====================================================================
# Example:
#
# find_package(BISON)
# find_package(FLEX)
# 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)
# ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser)
# BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp
# FLEX_TARGET(MyScanner lexer.l ${CMAKE_CURRENT_BIANRY_DIR}/lexer.cpp)
# ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser)
#
# include_directories(${CMAKE_CURRENT_BINARY_DIR})
# add_executable(Foo
# Foo.cc
# ${BISON_MyParser_OUTPUTS}
# ${FLEX_MyScanner_OUTPUTS}
# )
#====================================================================
# include_directories(${CMAKE_CURRENT_BINARY_DIR})
# add_executable(Foo
# Foo.cc
# ${BISON_MyParser_OUTPUTS}
# ${FLEX_MyScanner_OUTPUTS}
# )
# ====================================================================
#=============================================================================
# Copyright 2009 Kitware, Inc.
......
......@@ -40,11 +40,10 @@ IF (NOT WIN32)
SET(GNUTLS_DEFINITIONS ${PC_GNUTLS_CFLAGS_OTHER})
ENDIF (NOT WIN32)
FIND_PATH(GNUTLS_INCLUDE_DIR gnutls.h
FIND_PATH(GNUTLS_INCLUDE_DIR gnutls/gnutls.h
HINTS
${PC_GNUTLS_INCLUDEDIR}
${PC_GNUTLS_INCLUDE_DIRS}
PATH_SUFFIXES gnutls
)
FIND_LIBRARY(GNUTLS_LIBRARY NAMES gnutls libgnutls
......@@ -53,13 +52,15 @@ FIND_LIBRARY(GNUTLS_LIBRARY NAMES gnutls libgnutls
${PC_GNUTLS_LIBRARY_DIRS}
)
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(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GnuTLS DEFAULT_MSG GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR)
MARK_AS_ADVANCED(GNUTLS_INCLUDE_DIR GNUTLS_LIBRARY)
SET(GNUTLS_LIBRARIES ${GNUTLS_LIBRARY})
SET(GNUTLS_INCLUDE_DIRS ${GNUTLS_INCLUDE_DIR})
IF(GNUTLS_FOUND)
SET(GNUTLS_LIBRARIES ${GNUTLS_LIBRARY})
SET(GNUTLS_INCLUDE_DIRS ${GNUTLS_INCLUDE_DIR})
ENDIF()
......@@ -69,6 +69,7 @@
#=============================================================================
# Copyright 2006-2009 Kitware, Inc.
# Copyright 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
......@@ -80,30 +81,6 @@
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
#
# Redistribution and use, with or without modification, are permitted
# provided that the following conditions are met:
#
# 1. Redistributions must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# 2. The name of the author may not be used to endorse or promote
# products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
### Common stuff ####
set(PKG_CONFIG_VERSION 1)
set(PKG_CONFIG_FOUND 0)
......
......@@ -11,20 +11,20 @@
# PROTOBUF_INCLUDE_DIR - The include directory for protocol buffers
# PROTOBUF_PROTOC_EXECUTABLE - The protoc compiler
#
#====================================================================
# Example:
# ====================================================================
# Example:
#
# find_package(Protobuf REQUIRED)
# include_directories(${PROTOBUF_INCLUDE_DIRS})
# find_package(Protobuf REQUIRED)
# include_directories(${PROTOBUF_INCLUDE_DIRS})
#
# include_directories(${CMAKE_CURRENT_BINARY_DIR})
# PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS foo.proto)
# add_executable(bar bar.cc ${PROTO_SRCS} ${PROTO_HDRS})
# target_link_libraries(bar ${PROTOBUF_LIBRARY})
# include_directories(${CMAKE_CURRENT_BINARY_DIR})
# PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS foo.proto)
# add_executable(bar bar.cc ${PROTO_SRCS} ${PROTO_HDRS})
# target_link_libraries(bar ${PROTOBUF_LIBRARY})
#
# NOTE: You may need to link against pthreads, depending
# on the platform.
#====================================================================
# ====================================================================
#
# PROTOBUF_GENERATE_CPP (public function)
# SRCS = Variable to define with autogenerated
......@@ -33,7 +33,7 @@
# header files
# ARGN = proto files
#
#====================================================================
# ====================================================================
#=============================================================================
......
......@@ -138,7 +138,7 @@ FIND_LIBRARY(QT_QASSISTANTCLIENT_LIBRARY
# qt 3 should prefer QTDIR over the PATH
FIND_PROGRAM(QT_MOC_EXECUTABLE
NAMES moc moc-qt3
NAMES moc-qt3 moc
HINTS
$ENV{QTDIR}/bin
PATHS
......@@ -160,7 +160,8 @@ IF(QT_MOC_EXECUTABLE)
ENDIF(QT_MOC_EXECUTABLE)
# qt 3 should prefer QTDIR over the PATH
FIND_PROGRAM(QT_UIC_EXECUTABLE uic
FIND_PROGRAM(QT_UIC_EXECUTABLE
NAMES uic-qt3 uic
HINTS
$ENV{QTDIR}/bin
PATHS
......
This diff is collapsed.
......@@ -40,32 +40,41 @@
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
# Assume not found.
SET(VTK_FOUND 0)
# VTK 4.0 did not provide VTKConfig.cmake.
IF("${VTK_FIND_VERSION}" VERSION_LESS 4.1)
SET(_VTK_40_ALLOW 1)
IF(VTK_FIND_VERSION)
SET(_VTK_40_ONLY 1)
ENDIF()
ENDIF()
# Construct consitent error messages for use below.
SET(VTK_DIR_DESCRIPTION "directory containing VTKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/vtk for an installation. For VTK 4.0, this is the location of UseVTK.cmake. This is either the root of the build tree or PREFIX/include/vtk for an installation.")
SET(VTK_DIR_DESCRIPTION "directory containing VTKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/vtk for an installation.")
IF(_VTK_40_ALLOW)
SET(VTK_DIR_DESCRIPTION "${VTK_DIR_DESCRIPTION} For VTK 4.0, this is the location of UseVTK.cmake. This is either the root of the build tree or PREFIX/include/vtk for an installation.")
ENDIF()
SET(VTK_DIR_MESSAGE "VTK not found. Set the VTK_DIR cmake cache entry to the ${VTK_DIR_DESCRIPTION}")
# Search only if the location is not already known.
IF(NOT VTK_DIR)
# Get the system search path as a list.
IF(UNIX)
STRING(REGEX MATCHALL "[^:]+" VTK_DIR_SEARCH1 "$ENV{PATH}")
ELSE(UNIX)
STRING(REGEX REPLACE "\\\\" "/" VTK_DIR_SEARCH1 "$ENV{PATH}")
ENDIF(UNIX)
STRING(REGEX REPLACE "/;" ";" VTK_DIR_SEARCH2 "${VTK_DIR_SEARCH1}")
# Check whether VTK 4.0 has already been found.
IF(_VTK_40_ALLOW AND VTK_DIR)
IF(EXISTS ${VTK_DIR}/UseVTK.cmake AND NOT EXISTS ${VTK_DIR}/VTKConfig.cmake)
SET(VTK_FOUND 1)
INCLUDE(UseVTKConfig40) # No VTKConfig; load VTK 4.0 settings.
ENDIF()
ENDIF()
# Construct a set of paths relative to the system search path.
SET(VTK_DIR_SEARCH "")
FOREACH(dir ${VTK_DIR_SEARCH2})
SET(VTK_DIR_SEARCH ${VTK_DIR_SEARCH}
${dir}/../lib/vtk-5.4
${dir}/../lib/vtk-5.2
${dir}/../lib/vtk-5.1
${dir}/../lib/vtk-5.0
${dir}/../lib/vtk
)
ENDFOREACH(dir)