Commit 2898e8fa authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: merge fixes for RC 6

parent 9bf0d8e2
......@@ -354,7 +354,7 @@ ENDMACRO (CMAKE_BUILD_UTILITIES)
SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 6)
SET(CMake_VERSION_PATCH 3)
SET(CMake_VERSION_RC 5)
SET(CMake_VERSION_RC 6)
# CVS versions are odd, if this is an odd minor version
# then set the CMake_VERSION_DATE variable
IF("${CMake_VERSION_MINOR}" MATCHES "[13579]$")
......
Changes in CMake 2.6.3 RC 6
- Fix project(foo NONE) enable c later bug on OSX
- Fix Haiku default paths
- Fix windows paths to look in cmake install dirs
- RPM Update generator to handle optional dependencies using Requires
- Fix FindCurses for Haiku
- Look for doxygen in more places
- Look for different expat names on windows
- FindLibxml2 use FindPkgConfig.cmake instead of UsePkgConfig.cmake,
- Add translations support to FindQt4.cmake
- FindWxWidgets Fixed placement of initial wxWidgets_FOUND=TRUE
- Fix GetPrerequisites.cmake to work with 0 libs
- Add support for Squish
- Make bundle startup optional in bundle generator
- Fix runtime search path ordering with symlinks
- Fix potential crash with ctest and log being null
Changes in CMake 2.6.3 RC 5
- add EXCLUDE, INCLUDE to ctest_test command in ctest -S scripts
- Set CMAKE_SYSTEM in ctest -S scripts by reading CMakeDetermineSystem
......
# support for the MS assembler, masm and masm64
SET(ASM_DIALECT "_MASM")
SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS asm)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> /c /Fo <OBJECT> <SOURCE>")
INCLUDE(CMakeASMInformation)
SET(ASM_DIALECT)
# Find the MS assembler (masm or masm64)
SET(ASM_DIALECT "_MASM")
# if we are using the 64bit cl compiler, assume we also want the 64bit assembler
IF(CMAKE_CL_64)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml64)
ELSE(CMAKE_CL_64)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml)
ENDIF(CMAKE_CL_64)
INCLUDE(CMakeDetermineASMCompiler)
SET(ASM_DIALECT)
# 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.
SET(ASM_DIALECT "_MASM")
INCLUDE(CMakeTestASMCompiler)
SET(ASM_DIALECT)
......@@ -126,11 +126,24 @@ IF (NOT CPACK_RPM_PACKAGE_DESCRIPTION)
ENDIF (CPACK_PACKAGE_DESCRIPTION_FILE)
ENDIF (NOT CPACK_RPM_PACKAGE_DESCRIPTION)
# CPACK_RPM_PACKAGE_REQUIRES
# Placeholder used to specify binary RPM dependencies (if any)
# see http://www.rpm.org/max-rpm/s1-rpm-depend-manual-dependencies.html
IF(CPACK_RPM_PACKAGE_REQUIRES)
IF(CPACK_RPM_PACKAGE_DEBUG)
MESSAGE("CPackRPM:Debug: User defined Requires:\n ${CPACK_RPM_PACKAGE_REQUIRES}")
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
SET(TMP_RPM_REQUIRES "Requires: ${CPACK_RPM_PACKAGE_REQUIRES}")
ENDIF(CPACK_RPM_PACKAGE_REQUIRES)
# CPACK_RPM_SPEC_INSTALL_POST
# May be used to define a RPM post intallation script
# for example setting it to "/bin/true" may prevent
# rpmbuild from stripping binaries.
IF(CPACK_RPM_SPEC_INSTALL_POST)
IF(CPACK_RPM_PACKAGE_DEBUG)
MESSAGE("CPackRPM:Debug: User defined CPACK_RPM_SPEC_INSTALL_POST = ${CPACK_RPM_SPEC_INSTALL_POST}")
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
SET(TMP_RPM_SPEC_INSTALL_POST "%define __spec_install_post ${CPACK_RPM_SPEC_INSTALL_POST}")
ENDIF(CPACK_RPM_SPEC_INSTALL_POST)
......@@ -177,14 +190,13 @@ ELSE(CPACK_RPM_USER_BINARY_SPECFILE)
IF(CPACK_RPM_PACKAGE_DEBUG)
MESSAGE("CPackRPM:Debug: CPACK_TOPLEVEL_DIRECTORY = ${CPACK_TOPLEVEL_DIRECTORY}")
MESSAGE("CPackRPM:Debug: CPACK_TOPLEVEL_TAG = ${CPACK_TOPLEVEL_TAG}")
MESSAGE("CPackRPM:Debug: CPACK_TEMPORARY_DIRECTORY = ${PACK_TEMPORARY_DIRECTORY}")
MESSAGE("CPackRPM:Debug: CPACK_TEMPORARY_DIRECTORY = ${CPACK_TEMPORARY_DIRECTORY}")
MESSAGE("CPackRPM:Debug: CPACK_OUTPUT_FILE_NAME = ${CPACK_OUTPUT_FILE_NAME}")
MESSAGE("CPackRPM:Debug: CPACK_OUTPUT_FILE_PATH = ${CPACK_OUTPUT_FILE_PATH}")
MESSAGE("CPackRPM:Debug: CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}")
MESSAGE("CPackRPM:Debug: CPACK_RPM_BINARY_SPECFILE = ${CPACK_RPM_BINARY_SPECFILE}")
MESSAGE("CPackRPM:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = ${PACK_PACKAGE_INSTALL_DIRECTORY}")
MESSAGE("CPackRPM:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = ${CPACK_PACKAGE_INSTALL_DIRECTORY}")
MESSAGE("CPackRPM:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}")
MESSAGE("CPackRPM:Debug: CPACK_RPM_SPEC_INSTALL_POST = ${CPACK_RPM_SPEC_INSTALL_POST}")
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
FILE(WRITE ${CPACK_RPM_BINARY_SPECFILE}
"# -*- rpm-spec -*-
......@@ -196,6 +208,7 @@ Release: ${CPACK_RPM_PACKAGE_RELEASE}
License: ${CPACK_RPM_PACKAGE_LICENSE}
Group: ${CPACK_RPM_PACKAGE_GROUP}
Vendor: ${CPACK_RPM_PACKAGE_VENDOR}
${TMP_RPM_REQUIRES}
${TMP_RPM_BUILDARCH}
#%define prefix ${CMAKE_INSTALL_PREFIX}
......@@ -228,6 +241,9 @@ ${CPACK_RPM_PACKAGE_DESCRIPTION}
/*
%changelog
* Mon Oct 03 2008 Erk <eric.noulard@gmail.com>
Update generator to handle optional dependencies using Requires
Update DEBUG output typos.
* Mon Aug 25 2008 Erk <eric.noulard@gmail.com>
Update generator to handle optional post-install
* Tue Aug 16 2007 Erk <eric.noulard@gmail.com>
......
......@@ -15,7 +15,6 @@
FIND_LIBRARY(CURSES_CURSES_LIBRARY NAMES curses )
FIND_LIBRARY(CURSES_NCURSES_LIBRARY NAMES ncurses )
SET(CURSES_USE_NCURSES FALSE)
IF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_LIBRARY)
......@@ -80,21 +79,32 @@ ELSE(NOT CURSES_USE_NCURSES)
# for compatibility with older FindCurses.cmake this has to be in the cache
# FORCE must not be used since this would break builds which preload
# however if the value of the variable has NOTFOUND in it, then
# it is OK to force, and we need to force in order to have it work.
# a cache wqith these variables set
# only put ncurses include and library into
# variables if they are found
IF(NOT CURSES_NCURSES_INCLUDE_PATH AND CURSES_HAVE_NCURSES_NCURSES_H)
GET_FILENAME_COMPONENT(CURSES_NCURSES_INCLUDE_PATH
"${CURSES_HAVE_NCURSES_NCURSES_H}" PATH)
ENDIF(NOT CURSES_NCURSES_INCLUDE_PATH AND CURSES_HAVE_NCURSES_NCURSES_H)
IF(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY)
SET( FORCE_IT )
IF(CURSES_INCLUDE_PATH MATCHES NOTFOUND)
SET(FORCE_IT FORCE)
ENDIF(CURSES_INCLUDE_PATH MATCHES NOTFOUND)
SET(CURSES_INCLUDE_PATH "${CURSES_NCURSES_INCLUDE_PATH}"
CACHE FILEPATH "The curses include path")
CACHE FILEPATH "The curses include path" ${FORCE_IT})
SET( FORCE_IT)
IF(CURSES_LIBRARY MATCHES NOTFOUND)
SET(FORCE_IT FORCE)
ENDIF(CURSES_LIBRARY MATCHES NOTFOUND)
SET(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}"
CACHE FILEPATH "The curses library")
CACHE FILEPATH "The curses library" ${FORCE_IT})
ENDIF(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY)
ENDIF(NOT CURSES_USE_NCURSES)
FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr HINTS "${_cursesLibDir}")
FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr )
......
......@@ -66,7 +66,9 @@ ENDIF (NOT DOXYGEN_FIND_QUIETLY)
FIND_PROGRAM(DOXYGEN_DOT_EXECUTABLE
NAMES dot
PATHS "$ENV{ProgramFiles}/ATT/Graphviz/bin"
PATHS "$ENV{ProgramFiles}/Graphviz 2.21/bin"
"C:/Program Files/Graphviz 2.21/bin"
"$ENV{ProgramFiles}/ATT/Graphviz/bin"
"C:/Program Files/ATT/Graphviz/bin"
[HKEY_LOCAL_MACHINE\\SOFTWARE\\ATT\\Graphviz;InstallPath]/bin
/Applications/Graphviz.app/Contents/MacOS
......
......@@ -9,7 +9,7 @@
FIND_PATH(EXPAT_INCLUDE_DIR NAMES expat.h)
# Look for the library.
FIND_LIBRARY(EXPAT_LIBRARY NAMES expat)
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
......
......@@ -21,20 +21,22 @@ ENDIF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
IF (NOT WIN32)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
INCLUDE(UsePkgConfig)
PKGCONFIG(libxml-2.0 _LibXml2IncDir _LibXml2LinkDir _LibXml2LinkFlags _LibXml2Cflags)
SET(LIBXML2_DEFINITIONS ${_LibXml2Cflags})
FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(PC_LIBXML libxml-2.0)
SET(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
ENDIF (NOT WIN32)
FIND_PATH(LIBXML2_INCLUDE_DIR libxml/xpath.h
PATHS
${_LibXml2IncDir}
HINTS
${PC_LIBXML_INCLUDEDIR}
${PC_LIBXML_INCLUDE_DIRS}
PATH_SUFFIXES libxml2
)
FIND_LIBRARY(LIBXML2_LIBRARIES NAMES xml2 libxml2
PATHS
${_LibXml2LinkDir}
HINTS
${PC_LIBXML_LIBDIR}
${PC_LIBXML_LIBRARY_DIRS}
)
FIND_PROGRAM(LIBXML2_XMLLINT_EXECUTABLE xmllint)
......
......@@ -199,9 +199,12 @@
# QT_QTXMLPATTERNS_INCLUDE_DIR Path to "include/QtXmlPatterns"
# QT_PHONON_INCLUDE_DIR Path to "include/phonon"
#
# QT_BINARY_DIR Path to "bin" of Qt4
# QT_LIBRARY_DIR Path to "lib" of Qt4
#
# QT_PLUGINS_DIR Path to "plugins" for Qt4
# QT_TRANSLATIONS_DIR Path to "translations" of Qt4
# QT_DOC_DIR Path to "doc" of Qt4
# QT_MKSPECS_DIR Path to "mkspecs" of Qt4
#
#
# The Qt toolkit may contain both debug and release libraries.
......@@ -243,9 +246,6 @@
# QT_LUPDATE_EXECUTABLE Where to find the lupdate tool.
# QT_LRELEASE_EXECUTABLE Where to find the lrelease tool.
#
# QT_DOC_DIR Path to "doc" of Qt4
# QT_MKSPECS_DIR Path to "mkspecs" of Qt4
#
#
# These are around for backwards compatibility
# they will be set
......@@ -473,6 +473,17 @@ IF (QT4_QMAKE_FOUND)
FILE(TO_CMAKE_PATH "${qt_plugins_dir}" qt_plugins_dir)
SET(QT_PLUGINS_DIR ${qt_plugins_dir} CACHE PATH "The location of the Qt plugins" FORCE)
ENDIF ((QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR) OR QT_QMAKE_CHANGED)
# ask qmake for the translations directory
IF ((QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR) OR QT_QMAKE_CHANGED)
EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
ARGS "-query QT_INSTALL_TRANSLATIONS"
OUTPUT_VARIABLE qt_translations_dir )
# make sure we have / and not \ as qmake gives on windows
FILE(TO_CMAKE_PATH "${qt_translations_dir}" qt_translations_dir)
SET(QT_TRANSLATIONS_DIR ${qt_translations_dir} CACHE PATH "The location of the Qt translations" FORCE)
ENDIF ((QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR) OR QT_QMAKE_CHANGED)
########################################
#
# Setting the INCLUDE-Variables
......@@ -554,7 +565,8 @@ IF (QT4_QMAKE_FOUND)
ENDIF( NOT QT_INCLUDE_DIR)
# Make variables changeble to the advanced user
MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_INCLUDE_DIR QT_DOC_DIR QT_MKSPECS_DIR QT_PLUGINS_DIR)
MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_INCLUDE_DIR QT_DOC_DIR QT_MKSPECS_DIR
QT_PLUGINS_DIR QT_TRANSLATIONS_DIR)
# Set QT_INCLUDES
SET( QT_INCLUDES ${QT_MKSPECS_DIR}/default ${QT_INCLUDE_DIR} )
......
#
# ---- Find Squish
# This module can be used to find Squish (currently support is aimed at version 3).
#
# ---- Variables and Macros
# SQUISH_FOUND If false, don't try to use Squish
# SQUISH_VERSION_MAJOR The major version of Squish found
# SQUISH_VERSION_MINOR The minor version of Squish found
# SQUISH_VERSION_PATCH The patch version of Squish found
#
# SQUISH_INSTALL_DIR The Squish installation directory (containing bin, lib, etc)
# SQUISH_SERVER_EXECUTABLE The squishserver executable
# SQUISH_CLIENT_EXECUTABLE The squishrunner executable
#
# SQUISH_INSTALL_DIR_FOUND Was the install directory found?
# SQUISH_SERVER_EXECUTABLE_FOUND Was the server executable found?
# SQUISH_CLIENT_EXECUTABLE_FOUND Was the client executable found?
#
# macro SQUISH_ADD_TEST(testName applicationUnderTest testSuite testCase)
#
# ---- Typical Use
# ENABLE_TESTING()
# FIND_PACKAGE(Squish)
# IF (SQUISH_FOUND)
# SQUISH_ADD_TEST(myTestName myApplication testSuiteName testCaseName)
# ENDIF (SQUISH_FOUND)
#
SET(SQUISH_INSTALL_DIR_STRING "Directory containing the bin, doc, and lib directories for Squish; this should be the root of the installation directory.")
SET(SQUISH_SERVER_EXECUTABLE_STRING "The squishserver executable program.")
SET(SQUISH_CLIENT_EXECUTABLE_STRING "The squishclient executable program.")
# Search only if the location is not already known.
IF(NOT SQUISH_INSTALL_DIR)
# Get the system search path as a list.
IF(UNIX)
STRING(REGEX MATCHALL "[^:]+" SQUISH_INSTALL_DIR_SEARCH1 "$ENV{PATH}")
ELSE(UNIX)
STRING(REGEX REPLACE "\\\\" "/" SQUISH_INSTALL_DIR_SEARCH1 "$ENV{PATH}")
ENDIF(UNIX)
STRING(REGEX REPLACE "/;" ";" SQUISH_INSTALL_DIR_SEARCH2 ${SQUISH_INSTALL_DIR_SEARCH1})
# Construct a set of paths relative to the system search path.
SET(SQUISH_INSTALL_DIR_SEARCH "")
FOREACH(dir ${SQUISH_INSTALL_DIR_SEARCH2})
SET(SQUISH_INSTALL_DIR_SEARCH ${SQUISH_INSTALL_DIR_SEARCH} "${dir}/../lib/fltk")
ENDFOREACH(dir)
# Look for an installation
FIND_PATH(SQUISH_INSTALL_DIR bin/squishrunner
# Look for an environment variable SQUISH_INSTALL_DIR.
$ENV{SQUISH_INSTALL_DIR}
# Look in places relative to the system executable search path.
${SQUISH_INSTALL_DIR_SEARCH}
# Look in standard UNIX install locations.
#/usr/local/squish
DOC "The ${SQUISH_INSTALL_DIR_STRING}"
)
ENDIF(NOT SQUISH_INSTALL_DIR)
# search for the executables
IF(SQUISH_INSTALL_DIR)
SET(SQUISH_INSTALL_DIR_FOUND 1)
# find the client program
IF(NOT SQUISH_CLIENT_EXECUTABLE)
FIND_PROGRAM(SQUISH_CLIENT_EXECUTABLE ${SQUISH_INSTALL_DIR}/bin/squishrunner DOC "The ${SQUISH_CLIENT_EXECUTABLE_STRING}")
ENDIF(NOT SQUISH_CLIENT_EXECUTABLE)
# find the server program
IF(NOT SQUISH_SERVER_EXECUTABLE)
FIND_PROGRAM(SQUISH_SERVER_EXECUTABLE ${SQUISH_INSTALL_DIR}/bin/squishserver DOC "The ${SQUISH_SERVER_EXECUTABLE_STRING}")
ENDIF(NOT SQUISH_SERVER_EXECUTABLE)
ELSE(SQUISH_INSTALL_DIR)
SET(SQUISH_INSTALL_DIR_FOUND 0)
ENDIF(SQUISH_INSTALL_DIR)
# record if executables are set
IF(SQUISH_CLIENT_EXECUTABLE)
SET(SQUISH_CLIENT_EXECUTABLE_FOUND 1)
ELSE(SQUISH_CLIENT_EXECUTABLE)
SET(SQUISH_CLIENT_EXECUTABLE_FOUND 0)
ENDIF(SQUISH_CLIENT_EXECUTABLE)
IF(SQUISH_SERVER_EXECUTABLE)
SET(SQUISH_SERVER_EXECUTABLE_FOUND 1)
ELSE(SQUISH_SERVER_EXECUTABLE)
SET(SQUISH_SERVER_EXECUTABLE_FOUND 0)
ENDIF(SQUISH_SERVER_EXECUTABLE)
# record if Squish was found
SET(SQUISH_FOUND 1)
FOREACH(var SQUISH_INSTALL_DIR_FOUND SQUISH_CLIENT_EXECUTABLE_FOUND SQUISH_SERVER_EXECUTABLE_FOUND)
IF(NOT ${var})
SET(SQUISH_FOUND 0)
ENDIF(NOT ${var})
ENDFOREACH(var)
MACRO(SQUISH_ADD_TEST testName testAUT testCase envVars testWraper)
ADD_TEST(${testName}
${CMAKE_COMMAND} -V -VV
"-Dsquish_aut:STRING=${testAUT}"
"-Dsquish_server_executable:STRING=${SQUISH_SERVER_EXECUTABLE}"
"-Dsquish_client_executable:STRING=${SQUISH_CLIENT_EXECUTABLE}"
"-Dsquish_libqtdir:STRING=${QT_LIBRARY_DIR}"
"-Dsquish_test_case:STRING=${testCase}"
"-Dsquish_env_vars:STRING=${envVars}"
"-Dsquish_wrapper:STRING=${testWraper}"
-P "${CMAKE_ROOT}/Modules/SquishTestScript.cmake"
)
SET_TESTS_PROPERTIES(${testName}
PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED;ERROR;FATAL"
)
ENDMACRO(SQUISH_ADD_TEST)
......@@ -489,8 +489,6 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
ENDIF(NOT WX_LIB_DIR STREQUAL wxWidgets_LIB_DIR)
IF(WX_LIB_DIR)
SET(wxWidgets_FOUND TRUE)
# If building shared libs, define WXUSINGDLL to use dllimport.
IF(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*")
SET(wxWidgets_DEFINITIONS "-DWXUSINGDLL")
......@@ -509,6 +507,8 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
DBG_MSG_V("WX_CONFIGURATION_LIST=${WX_CONFIGURATION_LIST}")
IF(WX_CONFIGURATION)
SET(wxWidgets_FOUND TRUE)
# If the selected configuration wasn't found force the default
# one. Otherwise, use it but still force a refresh for
# updating the doc string with the current list of available
......
......@@ -568,8 +568,10 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
endif("${candidate}" MATCHES "${gp_regex}")
endforeach(candidate)
list(SORT ${prerequisites_var})
list(LENGTH ${prerequisites_var} prerequisites_var_length)
if(prerequisites_var_length GREATER 0)
list(SORT ${prerequisites_var})
endif(prerequisites_var_length GREATER 0)
if(${recurse})
set(more_inputs ${unseen_prereqs})
foreach(input ${more_inputs})
......
......@@ -52,7 +52,7 @@ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
# and still cmake didn't fail in CMakeFindBinUtils.cmake (because it isn't rerun)
# hardcode CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did before, Alex
IF(NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
SET(CMAKE_INSTALL_NAME_TOOL install_name_tool)
FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL install_name_tool)
ENDIF(NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
# find installed SDKs
FILE(GLOB _CMAKE_OSX_SDKS "/Developer/SDKs/*")
......
......@@ -12,3 +12,9 @@ SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,")
INCLUDE(Platform/UnixPaths)
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH /boot/common)
LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH /boot/common/include)
LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH /boot/common/lib)
LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH /boot/common/bin)
LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES /boot/common/lib)
# Add the program-files folder(s) to the list of installation
# prefixes.
#
# Windows 64-bit Binary:
# ENV{ProgramFiles(x86)} = [C:\Program Files (x86)]
# ENV{ProgramFiles} = [C:\Program Files]
# ENV{ProgramW6432} = <not set>
# (executed from cygwin):
# ENV{ProgramFiles(x86)} = <not set>
# ENV{ProgramFiles} = [C:\Program Files]
# ENV{ProgramW6432} = <not set>
#
# Windows 32-bit Binary:
# ENV{ProgramFiles(x86)} = [C:\Program Files (x86)]
# ENV{ProgramFiles} = [C:\Program Files (x86)]
# ENV{ProgramW6432} = [C:\Program Files]
# (executed from cygwin):
# ENV{ProgramFiles(x86)} = <not set>
# ENV{ProgramFiles} = [C:\Program Files (x86)]
# ENV{ProgramW6432} = [C:\Program Files]
IF(DEFINED "ENV{ProgramW6432}")
# 32-bit binary on 64-bit windows.
# The 64-bit program files are in ProgramW6432.
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramW6432}")
# The 32-bit program files are in ProgramFiles.
IF(DEFINED "ENV{ProgramFiles}")
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramFiles}")
ENDIF()
ELSE()
# 64-bit binary, or 32-bit binary on 32-bit windows.
IF(DEFINED "ENV{ProgramFiles}")
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramFiles}")
ENDIF()
IF(DEFINED "ENV{ProgramFiles(x86)}")
# 64-bit binary. 32-bit program files are in ProgramFiles(x86).
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramFiles(x86)}")
ELSEIF(DEFINED "ENV{SystemDrive}")
# Guess the 32-bit program files location.
IF(EXISTS "$ENV{SystemDrive}/Program Files (x86)")
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
"$ENV{SystemDrive}/Program Files (x86)")
ENDIF()
ENDIF()
ENDIF()
# Add the CMake install location.
GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH "${_CMAKE_INSTALL_DIR}")
# List common installation prefixes. These will be used for all
# search types.
# Add other locations.
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
# Standard
"$ENV{ProgramFiles}"
# CMake install location
"${_CMAKE_INSTALL_DIR}"
# Project install destination.
"${CMAKE_INSTALL_PREFIX}"
......
echo 'Starting the squish server...'
start %1
echo 'Running the test case...'
%2 --testcase %3 --wrapper %4 --aut %5
set result=%ERRORLEVEL%
echo 'Stopping the squish server...'
%1 --stop
exit \b %result%
#!/bin/sh
echo "Starting the squish server...$1 --daemon"
$1 --daemon
echo "Running the test case...$2 --testcase $3 --wrapper $4 --aut $5"
$2 --testcase $3 --wrapper $4 --aut $5
returnValue=$?
echo "Stopping the squish server...$1 --stop"
$1 --stop
exit $returnValue
#
# This script launches a GUI test using Squish. You should not call
# the script directly; instead, you should acces it via the
# SQUISH_ADD_TEST macro that is defined in FindSquish.cmake.
#
# This script starts the Squish server, launches the test on the
# client, and finally stops the squish server. If any of these steps
# fail (including if the tests do not pass) then a fatal error is
# raised.
#
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
# print out the variable that we are using
message(STATUS "squish_aut='${squish_aut}'")
message(STATUS "squish_server_executable='${squish_server_executable}'")
message(STATUS "squish_client_executable='${squish_client_executable}'")
message(STATUS "squish_libqtdir ='${squish_libqtdir}'")
message(STATUS "squish_test_case='${squish_test_case}'")
message(STATUS "squish_wrapper='${squish_wrapper}'")
message(STATUS "squish_env_vars='${squish_env_vars}'")
# parse enviornment variables
foreach(i ${squish_env_vars})
message(STATUS "parsing env var key/value pair ${i}")
string(REGEX MATCH "([^=]*)=(.*)" squish_env_name ${i})
message(STATUS "key=${CMAKE_MATCH_1}")
message(STATUS "value=${CMAKE_MATCH_2}")
set ( ENV{${CMAKE_MATCH_1}} ${CMAKE_MATCH_2} )
endforeach()
if (QT4_INSTALLED)
# record qt lib directory
set ( ENV{${SQUISH_LIBQTDIR}} ${squish_libqtdir} )
endif (QT4_INSTALLED)
# run the test
if (WIN32)
execute_process(
COMMAND ${CMAKE_ROOT}/Modules/SquishRunTestCase.bat ${squish_server_executable} ${squish_client_executable} ${squish_test_case} ${squish_wrapper} ${squish_aut}
RESULT_VARIABLE test_rv
)
endif (WIN32)
if (UNIX)
execute_process(
COMMAND ${CMAKE_ROOT}/Modules/SquishRunTestCase.sh ${squish_server_executable} ${squish_client_executable} ${squish_test_case} ${squish_wrapper} ${squish_aut}
RESULT_VARIABLE test_rv
)
endif (UNIX)
# check for an error with running the test
if(NOT "${test_rv}" STREQUAL "0")
message(FATAL_ERROR "Error running Squish test")
endif(NOT "${test_rv}" STREQUAL "0")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment