Commit ecf914e6 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: move changes from main tree to release branch

parent 3776cfa0
......@@ -5,7 +5,7 @@ MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
# The CMake version number.
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 4)
SET(CMake_VERSION_PATCH 2)
SET(CMake_VERSION_PATCH 3)
SET(CMake_VERSION "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
SET(CMake_VERSION_FULL "${CMake_VERSION}.${CMake_VERSION_PATCH}")
......
Changes in CMake 2.4.3
* progress is now reported for each compile
* Add support for CXX only projects
* Better FindWxWidgets
* Added FindBoose.cmake
* add more fortran file extensions
* Cpack supports multiple packages at the same time
* Fix to FindKDE4 to look for kde4-config first
* Support for env var CMAKE_CONFIG_TYPE in ctest
* Fix for -DVAR=foo on the command line not saving to the cache
* ENH: Added creation of XXX_FIND_COMPONENTS list of all components requested
withREQUIRED option. This addresses the feature request in bug#3494.
* Object files get safe names
* progress is now reported with makefiles
* location of CMakeTmp changed to a varible
......
......@@ -42,6 +42,17 @@ IF(NOT CMAKE_CXX_COMPILER)
ENDIF(NOT CMAKE_CXX_COMPILER)
MARK_AS_ADVANCED(CMAKE_CXX_COMPILER)
GET_FILENAME_COMPONENT(COMPILER_LOCATION "${CMAKE_CXX_COMPILER}" PATH)
FIND_PROGRAM(CMAKE_AR NAMES ar PATHS ${COMPILER_LOCATION})
MARK_AS_ADVANCED(CMAKE_AR)
FIND_PROGRAM(CMAKE_RANLIB NAMES ranlib)
IF(NOT CMAKE_RANLIB)
SET(CMAKE_RANLIB : CACHE INTERNAL "noop for ranlib")
ENDIF(NOT CMAKE_RANLIB)
MARK_AS_ADVANCED(CMAKE_RANLIB)
# do not test for GNU if the generator is visual studio
IF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
SET(CMAKE_COMPILER_IS_GNUCXX_RUN 1)
......
......@@ -15,7 +15,7 @@ IF(CMAKE_COMPILER_IS_MINGW)
SET(MINGW 1)
ENDIF(CMAKE_COMPILER_IS_MINGW)
SET(CMAKE_COMPILER_IS_GNUG77_RUN 1)
SET(CMAKE_Fortran_SOURCE_FILE_EXTENSIONS f;F;f77;f90;for;f95)
SET(CMAKE_Fortran_SOURCE_FILE_EXTENSIONS f;F;f77;F77;f90;F90;for;f95;F95)
SET(CMAKE_Fortran_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
SET(CMAKE_Fortran_LINKER_PREFERENCE Prefered)
IF(UNIX)
......
......@@ -92,13 +92,13 @@ cpack_check_file_exists("${CPACK_RESOURCE_FILE_WELCOME}" "welcome resource")
IF(NOT CPACK_GENERATOR)
IF(UNIX)
IF(APPLE)
SET(CPACK_GENERATOR "PackageMaker")
SET(CPACK_GENERATOR "PackageMaker;STGZ;TGZ")
ELSE(APPLE)
SET(CPACK_GENERATOR "STGZ")
SET(CPACK_GENERATOR "STGZ;TGZ;TZ")
ENDIF(APPLE)
SET(CPACK_SOURCE_GENERATOR "TGZ")
SET(CPACK_SOURCE_GENERATOR "TGZ;TZ")
ELSE(UNIX)
SET(CPACK_GENERATOR "NSIS")
SET(CPACK_GENERATOR "NSIS;ZIP")
SET(CPACK_SOURCE_GENERATOR "ZIP")
ENDIF(UNIX)
ENDIF(NOT CPACK_GENERATOR)
......
# - Find the Boost includes and libraries.
# The following variables are set if Boost is found. If Boost is not
# found, Boost_FOUND is set to false.
# Boost_FOUND - True when the Boost include directory is found.
# Boost_INCLUDE_DIRS - the path to where the boost include files are.
# Boost_LIBRARY_DIRS - The path to where the boost library files are.
# Boost_LIB_DIAGNOSTIC_DEFINITIONS - Only set if using Windows.
# ----------------------------------------------------------------------------
# If you have installed Boost in a non-standard location or you have
# just staged the boost files using bjam then you have three
# options. In the following comments, it is assumed that <Your Path>
# points to the root directory of the include directory of Boost. e.g
# If you have put boost in C:\development\Boost then <Your Path> is
# "C:/development/Boost" and in this directory there will be two
# directories called "include" and "lib".
# 1) After CMake runs, set Boost_INCLUDE_DIR to <Your Path>/include/boost<-version>
# 2) Use CMAKE_INCLUDE_PATH to set a path to <Your Path>/include. This will allow FIND_PATH()
# to locate Boost_INCLUDE_DIR by utilizing the PATH_SUFFIXES option. e.g.
# SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "<Your Path>/include")
# 3) Set an environment variable called ${BOOST_ROOT} that points to the root of where you have
# installed Boost, e.g. <Your Path>. It is assumed that there is at least a subdirectory called
# include in this path.
#
# Note:
# 1) If you are just using the boost headers, then you do not need to use
# Boost_LIBRARY_DIRS in your CMakeLists.txt file.
# 2) If Boost has not been installed, then when setting Boost_LIBRARY_DIRS
# the script will look for /lib first and, if this fails, then for /stage/lib.
#
# Usage:
# In your CMakeLists.txt file do something like this:
# ...
# # Boost
# FIND_PACKAGE(Boost)
# ...
# INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
# LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
#
# In Windows, we make the assumption that, if the Boost files are installed, the default directory
# will be C:\boost.
#
# TODO:
#
# 1) Automatically find the Boost library files and eliminate the need
# to use Link Directories.
#
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
# dynamic Boost library, the default is to do a static link. You can alter this for a specific
# library "whatever" by defining 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 "-DBOOST_LIB_DIAGNOSTIC")
ENDIF(WIN32)
SET(BOOST_INCLUDE_PATH_DESCRIPTION "directory containing the boost include files. E.g /usr/local/include/boost-1_33_1 or c:\\boost\\include\\boost-1_33_1")
SET(BOOST_DIR_MESSAGE "Set the Boost_INCLUDE_DIR cmake cache entry to the ${BOOST_INCLUDE_PATH_DESCRIPTION}")
SET(BOOST_DIR_SEARCH $ENV{BOOST_ROOT})
IF(BOOST_DIR_SEARCH)
FILE(TO_CMAKE_PATH ${BOOST_DIR_SEARCH} BOOST_DIR_SEARCH)
SET(BOOST_DIR_SEARCH ${BOOST_DIR_SEARCH}/include)
ENDIF(BOOST_DIR_SEARCH)
IF(WIN32)
SET(BOOST_DIR_SEARCH
${BOOST_DIR_SEARCH}
C:/boost/include
D:/boost/include
)
ENDIF(WIN32)
# Add in some path suffixes. These will have to be updated whenever a new Boost version comes out.
SET(SUFFIX_FOR_PATH
boost-1_34_1
boost-1_34_0
boost-1_33_1
boost-1_33_0
)
#
# Look for an installation.
#
FIND_PATH(Boost_INCLUDE_DIR NAMES boost/config.hpp PATH_SUFFIXES ${SUFFIX_FOR_PATH} PATHS
# Look in other places.
${BOOST_DIR_SEARCH}
# Help the user find it if we cannot.
DOC "The ${BOOST_INCLUDE_PATH_DESCRIPTION}"
)
# Assume we didn't find it.
SET(Boost_FOUND 0)
# Now try to get the include and library path.
IF(Boost_INCLUDE_DIR)
# 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_LIBRARY_DIR ${Boost_INCLUDE_DIR})
IF("${Boost_LIBRARY_DIR}" MATCHES "boost-[0-9]+")
GET_FILENAME_COMPONENT(Boost_LIBRARY_DIR ${Boost_LIBRARY_DIR} PATH)
ENDIF ("${Boost_LIBRARY_DIR}" MATCHES "boost-[0-9]+")
IF("${Boost_LIBRARY_DIR}" MATCHES "/include$")
# Strip off the trailing "/include" in the path.
GET_FILENAME_COMPONENT(Boost_LIBRARY_DIR ${Boost_LIBRARY_DIR} PATH)
ENDIF("${Boost_LIBRARY_DIR}" MATCHES "/include$")
IF(EXISTS "${Boost_LIBRARY_DIR}/lib")
SET (Boost_LIBRARY_DIR ${Boost_LIBRARY_DIR}/lib)
ELSE(EXISTS "${Boost_LIBRARY_DIR}/lib")
IF(EXISTS "${Boost_LIBRARY_DIR}/stage/lib")
SET(Boost_LIBRARY_DIR ${Boost_LIBRARY_DIR}/stage/lib)
ELSE(EXISTS "${Boost_LIBRARY_DIR}/stage/lib")
SET(Boost_LIBRARY_DIR "")
ENDIF(EXISTS "${Boost_LIBRARY_DIR}/stage/lib")
ENDIF(EXISTS "${Boost_LIBRARY_DIR}/lib")
IF(EXISTS "${Boost_INCLUDE_DIR}")
SET(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR})
# We have found boost. It is possible that the user has not
# compiled any libraries so we set Boost_FOUND to be true here.
SET(Boost_FOUND 1)
ENDIF(EXISTS "${Boost_INCLUDE_DIR}")
IF(Boost_LIBRARY_DIR AND EXISTS "${Boost_LIBRARY_DIR}")
SET(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIR})
ENDIF(Boost_LIBRARY_DIR AND EXISTS "${Boost_LIBRARY_DIR}")
ENDIF(Boost_INCLUDE_DIR)
IF(NOT Boost_FOUND)
IF(NOT Boost_FIND_QUIETLY)
MESSAGE(STATUS "Boost was not found. ${BOOST_DIR_MESSAGE}")
ELSE(NOT Boost_FIND_QUIETLY)
IF(Boost_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Boost was not found. ${BOOST_DIR_MESSAGE}")
ENDIF(Boost_FIND_REQUIRED)
ENDIF(NOT Boost_FIND_QUIETLY)
ENDIF(NOT Boost_FOUND)
......@@ -12,8 +12,8 @@
FILE(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS)
# First try to find kde-config
FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde-config
# First try to find kde-config, for KDE4 soon to be renamed to kde4-config
FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config kde-config
PATHS
${CMAKE_INSTALL_PREFIX}/bin
${_KDEDIRS}
......@@ -23,7 +23,7 @@ FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde-config
IF (NOT KDE4_KDECONFIG_EXECUTABLE)
FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde-config )
FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config kde-config )
ENDIF (NOT KDE4_KDECONFIG_EXECUTABLE)
IF (KDE4_KDECONFIG_EXECUTABLE)
......
......@@ -52,6 +52,7 @@ IF (WIN32)
ENDIF (CYGWIN)
ELSE (WIN32)
IF(NOT APPLE)
# The first line below is to make sure that the proper headers
# are used on a Linux machine with the NVidia drivers installed.
......@@ -116,6 +117,7 @@ ELSE (WIN32)
/usr/shlib
)
ENDIF(NOT APPLE)
ENDIF (WIN32)
SET( OPENGL_FOUND "NO" )
......
This diff is collapsed.
# - Find wxWindows (wxWidgets) installation
# This module finds if wxWindows/wxWidgets is installed and determines where
# the include files and libraries are. It also determines what the name of
# the library is. This code sets the following variables:
# the library is.
# Please note this file is DEPRECATED and replaced by FindwxWidgets.cmake.
# This code sets the following variables:
#
# WXWINDOWS_FOUND = system has WxWindows
# WXWINDOWS_LIBRARIES = path to the wxWindows libraries
......@@ -16,17 +18,13 @@
# Unix
# WXWINDOWS_DEFINITIONS = extra defines
#
# DEPRECATED
# CMAKE_WX_CAN_COMPILE
# WXWINDOWS_LIBRARY
# CMAKE_WX_CXX_FLAGS
# WXWINDOWS_INCLUDE_PATH
#
# OPTIONS
# If you need OpenGL support please
# SET(WXWINDOWS_USE_GL 1)
# in your CMakeLists.txt *before* you include this file.
#
# HAVE_ISYSTEM - true required to replace -I by -isystem on g++
#
# For convenience include Use_wxWindows.cmake in your project's
# CMakeLists.txt using INCLUDE(Use_wxWindows).
#
......@@ -39,6 +37,13 @@
# e.g. compiled in wx/build/msw dir as:
# nmake -f makefile.vc BUILD=debug SHARED=0 USE_OPENGL=1 MONOLITHIC=1
#
# DEPRECATED
#
# CMAKE_WX_CAN_COMPILE
# WXWINDOWS_LIBRARY
# CMAKE_WX_CXX_FLAGS
# WXWINDOWS_INCLUDE_PATH
#
# AUTHOR
# Jan Woetzel <http://www.mip.informatik.uni-kiel.de/~jw> (07/2003-01/2006)
......@@ -606,7 +611,17 @@ ELSE(WIN32_STYLE_FIND)
##MESSAGE("DBG: WX_CONFIG_ARGS_LIBS=${WX_CONFIG_ARGS_LIBS}===")
# set CXXFLAGS to be fed into CMAKE_CXX_FLAGS by the user:
IF (HAVE_ISYSTEM) # does the compiler support -isystem ?
IF (NOT APPLE) # -isystem seem sto be unsuppored on Mac
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX )
IF (CMAKE_CXX_COMPILER MATCHES g\\+\\+)
SET(CMAKE_WXWINDOWS_CXX_FLAGS "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} --cxxflags|sed -e s/-I/-isystem/g`")
ELSE(CMAKE_CXX_COMPILER MATCHES g\\+\\+)
SET(CMAKE_WXWINDOWS_CXX_FLAGS "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} --cxxflags`")
ENDIF(CMAKE_CXX_COMPILER MATCHES g\\+\\+)
ENDIF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX )
ENDIF (NOT APPLE)
ENDIF (HAVE_ISYSTEM)
##MESSAGE("DBG: for compilation:
##CMAKE_WXWINDOWS_CXX_FLAGS=${CMAKE_WXWINDOWS_CXX_FLAGS}===")
......
# - Find wxWindows installation
#
# This convenience include finds if wxWindows is installed
# and set the appropriate libs, incdirs, flags etc.
# INCLUDE_DIRECTORIES, LINK_DIRECTORIES and ADD_DEFINITIONS
# are called.
# author Jan Woetzel <jw -at- mip.informatik.uni-kiel.de> (07/2003)
#
##
# -----------------------------------------------------
# USAGE:
# just include Use_wxWindows.cmake
# in your projects CMakeLists.txt
# INCLUDE( ${CMAKE_MODULE_PATH}/Use_wxWindows.cmake)
##
# if you are sure you need GL then
# SET(WXWINDOWS_USE_GL 1)
# *before* you include this file.
#
# -----------------------------------------------------
# 16.Feb.2004: changed INCLUDE to FIND_PACKAGE to read from users own non-system CMAKE_MODULE_PATH (Jan Woetzel JW)
# 07/2006: rewrite as FindwxWidgets.cmake, kept for backward compatibilty JW
MESSAGE(STATUS "Use_wxWindows.cmake is DEPRECATED. \n"
"Please use FIND_PACKAGE(wxWidgets) and INCLUDE(${wxWidgets_USE_FILE}) instead. (JW)")
INCLUDE(FindwxWindows)
# ------------------------
FIND_PACKAGE( wxWindows )
IF(WXWINDOWS_FOUND)
#MESSAGE("DBG Use_wxWindows.cmake: WXWINDOWS_INCLUDE_DIR=${WXWINDOWS_INCLUDE_DIR} WXWINDOWS_LINK_DIRECTORIES=${WXWINDOWS_LINK_DIRECTORIES} WXWINDOWS_LIBRARIES=${WXWINDOWS_LIBRARIES} CMAKE_WXWINDOWS_CXX_FLAGS=${CMAKE_WXWINDOWS_CXX_FLAGS} WXWINDOWS_DEFINITIONS=${WXWINDOWS_DEFINITIONS}")
#MESSAGE("DBG Use_wxWindows.cmake: WXWINDOWS_INCLUDE_DIR=${WXWINDOWS_INCLUDE_DIR} WXWINDOWS_LINK_DIRECTORIES=${WXWINDOWS_LINK_DIRECTORIES} WXWINDOWS_LIBRARIES=${WXWINDOWS_LIBRARIES} CMAKE_WXWINDOWS_CXX_FLAGS=${CMAKE_WXWINDOWS_CXX_FLAGS} WXWINDOWS_DEFINITIONS=${WXWINDOWS_DEFINITIONS}")
IF(WXWINDOWS_INCLUDE_DIR)
INCLUDE_DIRECTORIES(${WXWINDOWS_INCLUDE_DIR})
ENDIF(WXWINDOWS_INCLUDE_DIR)
IF(WXWINDOWS_LINK_DIRECTORIES)
LINK_DIRECTORIES(${WXWINDOWS_LINK_DIRECTORIES})
ENDIF(WXWINDOWS_LINK_DIRECTORIES)
IF(WXWINDOWS_LIBRARIES)
LINK_LIBRARIES(${WXWINDOWS_LIBRARIES})
ENDIF(WXWINDOWS_LIBRARIES)
IF (CMAKE_WXWINDOWS_CXX_FLAGS)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_WXWINDOWS_CXX_FLAGS}")
ENDIF(CMAKE_WXWINDOWS_CXX_FLAGS)
IF(WXWINDOWS_DEFINITIONS)
ADD_DEFINITIONS(${WXWINDOWS_DEFINITIONS})
ENDIF(WXWINDOWS_DEFINITIONS)
ELSE(WXWINDOWS_FOUND)
MESSAGE(SEND_ERROR "wxWindows not found by Use_wxWindows.cmake")
ENDIF(WXWINDOWS_FOUND)
# - Same as Use_wxWindows
# - Convenience include for using wxWidgets library
# Finds if wxWidgets is installed
# and set the appropriate libs, incdirs, flags etc.
# INCLUDE_DIRECTORIES, LINK_DIRECTORIES and ADD_DEFINITIONS
# are called.
#
# USAGE
# SET( wxWidgets_USE_LIBS gl xml xrc ) # optionally: more than wx std libs
# FIND_PACKAGE(wxWidgets REQUIRED)
# INCLUDE( ${xWidgets_USE_FILE} )
# ... add your targets here, e.g. ADD_EXECUTABLE/ ADD_LIBRARY ...
# TARGET_LINK_LIBRARIERS( <yourWxDependantTarget> ${wxWidgets_LIBRARIES})
#
# DEPRECATED
# LINK_LIBRARIES is not called in favor of adding dependencies per target.
#
# AUTHOR
# Jan Woetzel <jw -at- mip.informatik.uni-kiel.de>
# debug message and logging.
# comment these out for distribution
IF (NOT LOGFILE )
# SET(LOGFILE "${PROJECT_BINARY_DIR}/CMakeOutput.log")
ENDIF (NOT LOGFILE )
MACRO(MSG _MSG)
# FILE(APPEND ${LOGFILE} "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}\n")
# MESSAGE(STATUS "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}")
ENDMACRO(MSG)
MSG("wxWidgets_FOUND=${wxWidgets_FOUND}")
IF (wxWidgets_FOUND)
IF (wxWidgets_INCLUDE_DIRS)
INCLUDE_DIRECTORIES( ${wxWidgets_INCLUDE_DIRS} )
MSG("wxWidgets_INCLUDE_DIRS=${wxWidgets_INCLUDE_DIRS}")
ENDIF(wxWidgets_INCLUDE_DIRS)
IF (wxWidgets_LIBRARY_DIRS)
LINK_DIRECTORIES(${wxWidgets_LIBRARY_DIRS})
MSG("wxWidgets_LIBRARY_DIRS=${wxWidgets_LIBRARY_DIRS}")
ENDIF(wxWidgets_LIBRARY_DIRS)
IF (wxWidgets_DEFINITIONS)
ADD_DEFINITIONS( ${wxWidgets_DEFINITIONS} )
MSG("wxWidgets_DEFINITIONS=${wxWidgets_DEFINITIONS}")
ENDIF(wxWidgets_DEFINITIONS)
IF (wxWidgets_CXX_FLAGS)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS}")
MSG("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}")
ENDIF(wxWidgets_CXX_FLAGS)
# DEPRECATED JW
# just for backward compatibility: add deps to all targets
# library projects better use advanced FIND_PACKAGE(wxWidgets) directly.
#IF(wxWidgets_LIBRARIES)
# LINK_LIBRARIES(${wxWidgets_LIBRARIES})
# # BUG: str too long: MSG("wxWidgets_LIBRARIES=${wxWidgets_LIBRARIES}")
# IF(LOGFILE)
# FILE(APPEND ${LOGFILE} "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${wxWidgets_LIBRARIES}\n")
# ENDIF(LOGFILE)
#ENDIF(wxWidgets_LIBRARIES)
INCLUDE(Use_wxWindows)
ELSE (wxWidgets_FOUND)
MESSAGE("wxWidgets requested but not found.")
ENDIF(wxWidgets_FOUND)
......@@ -4,11 +4,12 @@ We would like all FindXXX.cmake files to produce consistent variable names.
Please use the following consistent variable names for general use.
XXX_INCLUDE_DIR Where to find xxx.h, etc. If for some reason, you really need two paths, then that shouldn't be a problem - however, consider if you really should have two different FindXXX.cmake files. (XXX_INCLUDE_PATH was considered bad because a path includes an actual filename.)
XXX_LIBRARIES The libraries to link against to use XXX. These should include full paths.
XXX_INCLUDE_DIRS The final set of include directories listed in one variable for use by client code. This should not be a cache entry.
XXX_LIBRARIES The libraries to link against to use XXX. These should include full paths. This should not be a cache entry.
XXX_DEFINITIONS Definitions to use when compiling code that uses XXX. This really shouldn't include options such as (-DHAS_JPEG)that a client source-code file uses to decide whether to #include <jpeg.h>
XXX_EXECUTABLE Where to find the XXX tool.
XXX_YYY_EXECUTABLE Where to find the YYY tool that comes with XXX.
XXX_LIBRARY_DIRS Optionally, the final set of library directories listed in one variable for use by client code. This should not be a cache entry.
XXX_ROOT_DIR Where to find the base directory of XXX.
XXX_VERSION_YY Expect Version YY if true. Make sure at most one of these is ever true.
XXX_WRAP_YY If False, do not try to use the relevent CMake wrapping command.
......@@ -21,6 +22,8 @@ The following names should not usually be used in CMakeLists.txt files, but they
XXX_LIBRARY Name of XXX Library. A User may set this and XXX_INCLUDE_DIR to ignore to force non-use of XXX.
XXX_YY_LIBRARY Name of YY library that is part of the XXX system. It may or may not be required to use XXX.
XXX_INCLUDE_DIR Where to find xxx.h, etc. (XXX_INCLUDE_PATH was considered bad because a path includes an actual filename.)
XXX_YY_INCLUDE_DIR Where to find xxx_yy.h, etc.
For tidiness's sake, try to keep as many options as possible out of the cache, leaving at least one option which can be used to disable use of the module, or locate a not-found library (e.g. XXX_ROOT_DIR). For the same reason, mark most cache options as advanced.
......@@ -68,8 +71,9 @@ XXX_FIND_REQUIRED to true before loading the FindXXX.cmake module. If
this variable is set the module should issue a FATAL_ERROR if the
package cannot be found. For each package-specific component, say
YYY, listed after the REQUIRED option a variable XXX_FIND_REQUIRED_YYY
to true. This can be used by the FindXXX.cmake module to determine
which sub-components of the package must be found. If neither the
QUIET nor REQUIRED options are given then the FindXXX.cmake module
should look for the package and complain without error if the module
is not found.
to true. The set of components listed will also be specified in a
XXX_FIND_COMPONENTS variable. This can be used by the FindXXX.cmake
module to determine which sub-components of the package must be found.
If neither the QUIET nor REQUIRED options are given then the
FindXXX.cmake module should look for the package and complain without
error if the module is not found.
......@@ -205,6 +205,8 @@ IF (WIN32)
cmLocalVisualStudio6Generator.h
cmLocalVisualStudio7Generator.cxx
cmLocalVisualStudio7Generator.h
cmLocalVisualStudioGenerator.cxx
cmLocalVisualStudioGenerator.h
cmWin32ProcessExecution.cxx
cmWin32ProcessExecution.h
)
......@@ -324,11 +326,11 @@ IF(BUILD_MFCDialog)
ENDIF(BUILD_MFCDialog)
# WX Widgets GUI
OPTION(CMAKE_BUILD_WX_DIALOG "Build wxWidgets dialog for CMake" FALSE)
MARK_AS_ADVANCED(CMAKE_BUILD_WX_DIALOG)
IF(CMAKE_BUILD_WX_DIALOG)
OPTION(BUILD_WXDialog "Build wxWidgets dialog for CMake" FALSE)
MARK_AS_ADVANCED(BUILD_WXDialog)
IF(BUILD_WXDialog)
SUBDIRS(WXDialog)
ENDIF(CMAKE_BUILD_WX_DIALOG)
ENDIF(BUILD_WXDialog)
# Testing
IF (NOT DART_ROOT)
......@@ -502,6 +504,16 @@ IF(BUILD_TESTING)
--build-two-config
--test-command conly)
ADD_TEST(CxxOnly ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/CxxOnly"
"${CMake_BINARY_DIR}/Tests/CxxOnly"
--build-generator ${CMAKE_TEST_GENERATOR}
--build-project cxxonly
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-two-config
--test-command cxxonly)
ADD_TEST(MacroTest ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/MacroTest"
......@@ -962,8 +974,9 @@ IF(BUILD_TESTING)
--build-target install
# --build-target package
--build-options "-DCMAKE_INSTALL_PREFIX:PATH=${BundleTestInstallDir}"
"-DCMake_SOURCE_DIR:PATH=${CMAKE_SOURCE_DIR}"
--test-command
${BundleTestInstallDir}/Application/BundleTestExe.app/Contents/MacOS/BundleTestExe)
${BundleTestInstallDir}/Application/SecondBundleExe.app/Contents/MacOS/SecondBundleExe)
ADD_TEST(objc++ ${CMAKE_CTEST_COMMAND}
--build-and-test
......@@ -1063,9 +1076,8 @@ IF(BUILD_TESTING)
ENDIF(JAVA_COMPILE AND JAVA_RUNTIME AND JAVA_ARCHIVE AND NOT MINGW)
ENDIF(NOT CMAKE_TEST_GENERATOR MATCHES "Xcode")
IF (CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE OR WXWINDOWS_INCLUDE_DIR)
# Will be set if the wxwindows gui is on
IF(BUILD_WXDialog AND wxWidgets_CONFIG_EXECUTABLE)
# Will be set if the WX gui is on
ADD_TEST(UseWX ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/UseWX"
......@@ -1073,11 +1085,11 @@ IF(BUILD_TESTING)
--build-generator ${CMAKE_TEST_GENERATOR}
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-exe-dir ${CMake_BINARY_DIR}/Tests/UseWX
--build-project UsewxWindows
--build-options -DCMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE:FILEPATH=${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE}
--build-project UsewxWidgets
--build-options -DwxWidgets_CONFIG_EXECUTABLE=${wxWidgets_CONFIG_EXECUTABLE}
--test-command UseWX
)
ENDIF (CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE OR WXWINDOWS_INCLUDE_DIR)
ENDIF(BUILD_WXDialog AND wxWidgets_CONFIG_EXECUTABLE)
IF(UNIX)
STRING(COMPARE EQUAL "${CMAKE_INSTALL_PREFIX}" "${CMake_BINARY_DIR}/Tests/TestShellInstall/Prefix"
......
......@@ -142,6 +142,7 @@ int cmCPackGenericGenerator::PrepareNames()
{
this->SetOptionIfNotSet("CPACK_STRIP_COMMAND", pkgPath.c_str());
}
this->SetOptionIfNotSet("CPACK_REMOVE_TOPLEVEL_DIRECTORY", "1");
return 1;
}
......@@ -150,23 +151,6 @@ int cmCPackGenericGenerator::PrepareNames()
int cmCPackGenericGenerator::InstallProject()
{
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Install projects" << std::endl);
std::vector<cmsys::RegularExpression> ignoreFilesRegex;
const char* cpackIgnoreFiles = this->GetOption("CPACK_IGNORE_FILES");
if ( cpackIgnoreFiles )
{
std::vector<std::string> ignoreFilesRegexString;
cmSystemTools::ExpandListArgument(cpackIgnoreFiles,
ignoreFilesRegexString);
std::vector<std::string>::iterator it;
for ( it = ignoreFilesRegexString.begin();
it != ignoreFilesRegexString.end();
++it )
{
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
"Create ignore files regex for: " << it->c_str() << std::endl);
ignoreFilesRegex.push_back(it->c_str());
}
}
this->CleanTemporaryDirectory();
const char* tempInstallDirectory
= this->GetOption("CPACK_TEMPORARY_INSTALL_DIRECTORY");
......@@ -178,6 +162,7 @@ int cmCPackGenericGenerator::InstallProject()
<< std::endl);
return 0;
}