[asterisk-scf-commits] asterisk-scf/release/cmake.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Tue Apr 26 13:38:55 CDT 2011
branch "master" has been updated
via 4b00f584ee6f3ed0763124efb90fdbb0f108d77b (commit)
via 4d3509c5aba99dd3dba2072f4bc3ec52b06a8c52 (commit)
via 20915be35f2cfb3ce65aaf6bc155a6241f9bc6e4 (commit)
via ee23705d7936e25fa76d36541a0ab660bf52c377 (commit)
via 2bffa6ab93be88e2316baf9373055e11bd07e177 (commit)
via 92c60f854b5a5aca1a22734b054b2daaf99efd3a (commit)
via dbb6feda7e756133e4bf3ca7eb6fc23a7644f788 (commit)
via f913b54065d5ff67c6e7cdf5d2c45b8ca0357eeb (commit)
via ad1482b42618df6d86229adb635613e5b7d91e54 (commit)
from d5da796c0242e9fe5e93145a398e38199c173220 (commit)
Summary of changes:
AsteriskSCF.cmake | 145 ++++++++++++++++++++++++++++++++++++++--------
modules/FindIce.cmake | 18 ++++++
modules/FindIceBox.cmake | 21 ++++---
3 files changed, 151 insertions(+), 33 deletions(-)
- Log -----------------------------------------------------------------
commit 4b00f584ee6f3ed0763124efb90fdbb0f108d77b
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Tue Apr 26 11:43:57 2011 -0500
Build test paths properly on both Windows and UNIX-type platforms. Build
LD_LIBRARY_PATH on UNIX-type platforms. Eliminate code duplication in setting
test properties.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 649c512..e568b5a 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -186,7 +186,7 @@ macro(set_cache_var_list VAR LIST TYPE DESCRIPTION)
set(${VAR} "${_scvl}" CACHE ${TYPE} ${DESCRIPTION} FORCE)
endmacro()
-macro(compute_test_path)
+macro(compute_test_paths)
# We need to construct a PATH that will allow unit tests to be run
# against the versions of Ice and Boost that the components and test
# were built against.
@@ -199,27 +199,61 @@ macro(compute_test_path)
# Add the project's binary directories for tests and components
file(TO_NATIVE_PATH "${PROJECT_BINARY_DIR}/bin" foo)
list(APPEND test_path_dirs "${foo}")
- file(TO_NATIVE_PATH "${PROJECT_BINARY_DIR}/lib" foo)
- list(APPEND test_path_dirs "${foo}")
# Add the Ice directory that contains executables
file(TO_NATIVE_PATH "${ICE_DIR}/bin" foo)
list(APPEND test_path_dirs "${foo}")
# On Windows, we also need some additional directories
- foreach(test_path_dir ${Boost_LIBRARY_DIRS})
- file(TO_NATIVE_PATH "${test_path_dir}" foo)
+ if(WIN32)
+ file(TO_NATIVE_PATH "${PROJECT_BINARY_DIR}/lib" foo)
list(APPEND test_path_dirs "${foo}")
+ foreach(test_path_dir ${Boost_LIBRARY_DIRS})
+ file(TO_NATIVE_PATH "${test_path_dir}" foo)
+ list(APPEND test_path_dirs "${foo}")
+ endforeach()
+ endif()
+
+ foreach(test_path_dir ${test_path_dirs})
+ if(NOT test_path)
+ set(test_path "${test_path_dir}")
+ else()
+ if(WIN32)
+ set(test_path "${test_path}\\;${test_path_dir}")
+ else()
+ set(test_path "${test_path}:${test_path_dir}")
+ endif()
+ endif()
endforeach()
+ set(ASTERISK_SCF_BIN_TEST_PATH "${test_path}" PARENT_SCOPE)
+
+ # On UNIX-type platforms, we also need to set LD_LIBRARY_PATH
+ # so that our libraries can be found
+ if(UNIX)
+ unset(test_path_dirs)
+ unset(test_path)
+
+ # Start with the existing PATH
+ foreach(test_path_dir $ENV{LD_LIBRARY_PATH})
+ list(APPEND test_path_dirs "${test_path_dir}")
+ endforeach()
+
+ file(TO_NATIVE_PATH "${PROJECT_BINARY_DIR}/lib" foo)
+ list(APPEND test_path_dirs "${foo}")
- # The sequence below is a bit bizarre; essentially, this compensates
- # for the fact that CMake stores lists of items as semicolon separated
- # entries, but we need to have a string that contains such entries
- # *NOT* treated as if it was a list (so the semicolons won't be removed
- # when the list is later expanded)
- string(REPLACE "\\;" ";" test_path "${test_path_dirs}")
- string(REPLACE ";" "\\;" test_path "${test_path}")
- set(ASTERISK_SCF_TEST_PATH "${test_path}" PARENT_SCOPE)
+ foreach(test_path_dir ${test_path_dirs})
+ if(NOT test_path)
+ set(test_path "${test_path_dir}")
+ else()
+ if(WIN32)
+ set(test_path "${test_path}\\;${test_path_dir}")
+ else()
+ set(test_path "${test_path}:${test_path_dir}")
+ endif()
+ endif()
+ endforeach()
+ set(ASTERISK_SCF_LIB_TEST_PATH "${test_path}" PARENT_SCOPE)
+ endif()
endmacro()
# Function which initializes project specific things
@@ -343,7 +377,7 @@ function(asterisk_scf_project NAME ICE_VERSION)
set(Boost_CORE_FOUND "bazinga" PARENT_SCOPE)
set(Boost_CORE_FOUND "bazinga")
- compute_test_path()
+ compute_test_paths()
message(STATUS "Passed requirement checks for CXX components")
endfunction()
@@ -770,17 +804,24 @@ function(asterisk_scf_component_package COMPONENTNAME DESC GROUPNAME)
cpack_add_component(${COMPONENTNAME} DESCRIPTION ${DESC} GROUP ${GROUP})
endfunction()
-# Adds a boost test executable to CTest. These executable will be run
-# with 'make test'
-# @param EXE - boost test executable. Probably built
-# using asterisk_scf_component_build_standalone.
+function(set_test_props NAME RESULTS)
+ set_property(TEST "${NAME}" PROPERTY TIMEOUT ${TEST_TIMEOUT_SEC})
+ list(APPEND testenv "PATH=${ASTERISK_SCF_BIN_TEST_PATH}")
+ if(UNIX)
+ list(APPEND testenv "LD_LIBRARY_PATH=${ASTERISK_SCF_LIB_TEST_PATH}")
+ endif()
+ list(APPEND testenv "BOOST_TEST_REPORT_FORMAT=XML")
+ list(APPEND testenv "BOOST_TEST_REPORT_LEVEL=detailed")
+ list(APPEND testenv "BOOST_TEST_REPORT_SINK=${RESULTS}")
+ set_property(TEST "${NAME}" PROPERTY ENVIRONMENT "${testenv}")
+endfunction()
+
function(asterisk_scf_test_boost NAME)
add_test(NAME "${NAME}" COMMAND "${NAME}")
set(project_test_results "${CMAKE_BINARY_DIR}/test_results/${ASTERISK_SCF_PROJECT}")
file(MAKE_DIRECTORY "${project_test_results}")
file(TO_NATIVE_PATH "${project_test_results}/${NAME}.xml" project_test_results)
- set_property(TEST "${NAME}" PROPERTY TIMEOUT ${TEST_TIMEOUT_SEC})
- set_property(TEST "${NAME}" PROPERTY ENVIRONMENT "PATH=${ASTERISK_SCF_TEST_PATH};BOOST_TEST_REPORT_FORMAT=XML;BOOST_TEST_REPORT_LEVEL=detailed;BOOST_TEST_REPORT_SINK=${project_test_results}")
+ set_test_props("${NAME}" "${project_test_results}")
endfunction()
function(asterisk_scf_test_icebox NAME CONFIG)
@@ -789,6 +830,5 @@ function(asterisk_scf_test_icebox NAME CONFIG)
set(project_test_results "${CMAKE_BINARY_DIR}/test_results/${ASTERISK_SCF_PROJECT}")
file(MAKE_DIRECTORY "${project_test_results}")
file(TO_NATIVE_PATH "${project_test_results}/${NAME}.xml" project_test_results)
- set_property(TEST "${NAME}" PROPERTY TIMEOUT ${TEST_TIMEOUT_SEC})
- set_property(TEST "${NAME}" PROPERTY ENVIRONMENT "PATH=${ASTERISK_SCF_TEST_PATH};BOOST_TEST_REPORT_FORMAT=XML;BOOST_TEST_REPORT_LEVEL=detailed;BOOST_TEST_REPORT_SINK=${project_test_results}")
+ set_test_props("${NAME}" "${project_test_results}")
endfunction()
commit 4d3509c5aba99dd3dba2072f4bc3ec52b06a8c52
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Tue Apr 26 11:17:11 2011 -0500
Correct a bug in a previous commit; settings for CMake output directories
need to be at the global scope.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index cd82fc7..649c512 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -237,9 +237,9 @@ function(asterisk_scf_project NAME ICE_VERSION)
message(STATUS "Setting up project ${NAME} for Ice version ${ICE_VERSION}")
- set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
- set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib" PARENT_SCOPE)
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib" PARENT_SCOPE)
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin" PARENT_SCOPE)
# On Windows, IceBox C++ services must be compiled with some symbols exported;
# the source code should use ASTERISK_SCF_ICEBOX_EXPORT to accomplish this, and this
commit 20915be35f2cfb3ce65aaf6bc155a6241f9bc6e4
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Tue Apr 26 08:56:28 2011 -0500
Rename test-addition functions and set environment variables required for
tests to run. Tests now run with a PATH that includes all the binaries built
during the CMake build, and also includes Ice and Boost libraries and binaries.
This means that tests can now be run without requiring Ice and Boost to be
in the PATH before running CMake/CTest, so a build can be made on a system
with multiple versions of eitehr one installed and the proper one will be
used for running tests.
In addition, set the Boost::Test 'report' parameters using environment variables
instead of command line parameters, so that configuration files for IceBox-based
tests no longer need to be 'configured'.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 78dc4b9..cd82fc7 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -186,6 +186,42 @@ macro(set_cache_var_list VAR LIST TYPE DESCRIPTION)
set(${VAR} "${_scvl}" CACHE ${TYPE} ${DESCRIPTION} FORCE)
endmacro()
+macro(compute_test_path)
+ # We need to construct a PATH that will allow unit tests to be run
+ # against the versions of Ice and Boost that the components and test
+ # were built against.
+
+ # Start with the existing PATH
+ foreach(test_path_dir $ENV{PATH})
+ list(APPEND test_path_dirs "${test_path_dir}")
+ endforeach()
+
+ # Add the project's binary directories for tests and components
+ file(TO_NATIVE_PATH "${PROJECT_BINARY_DIR}/bin" foo)
+ list(APPEND test_path_dirs "${foo}")
+ file(TO_NATIVE_PATH "${PROJECT_BINARY_DIR}/lib" foo)
+ list(APPEND test_path_dirs "${foo}")
+
+ # Add the Ice directory that contains executables
+ file(TO_NATIVE_PATH "${ICE_DIR}/bin" foo)
+ list(APPEND test_path_dirs "${foo}")
+
+ # On Windows, we also need some additional directories
+ foreach(test_path_dir ${Boost_LIBRARY_DIRS})
+ file(TO_NATIVE_PATH "${test_path_dir}" foo)
+ list(APPEND test_path_dirs "${foo}")
+ endforeach()
+
+ # The sequence below is a bit bizarre; essentially, this compensates
+ # for the fact that CMake stores lists of items as semicolon separated
+ # entries, but we need to have a string that contains such entries
+ # *NOT* treated as if it was a list (so the semicolons won't be removed
+ # when the list is later expanded)
+ string(REPLACE "\\;" ";" test_path "${test_path_dirs}")
+ string(REPLACE ";" "\\;" test_path "${test_path}")
+ set(ASTERISK_SCF_TEST_PATH "${test_path}" PARENT_SCOPE)
+endmacro()
+
# Function which initializes project specific things
function(asterisk_scf_project NAME ICE_VERSION)
if(ASTERISK_SCF_MASTER_PROJECT)
@@ -307,6 +343,8 @@ function(asterisk_scf_project NAME ICE_VERSION)
set(Boost_CORE_FOUND "bazinga" PARENT_SCOPE)
set(Boost_CORE_FOUND "bazinga")
+ compute_test_path()
+
message(STATUS "Passed requirement checks for CXX components")
endfunction()
@@ -733,18 +771,24 @@ function(asterisk_scf_component_package COMPONENTNAME DESC GROUPNAME)
endfunction()
# Adds a boost test executable to CTest. These executable will be run
-# with 'make test' @param EXE - boost test executable. Probably built
+# with 'make test'
+# @param EXE - boost test executable. Probably built
# using asterisk_scf_component_build_standalone.
-function(boost_add_test EXE)
- add_test(NAME "${EXE}" COMMAND "${EXE}"
- "--report_sink=${CMAKE_BINARY_DIR}/${EXE}-result.xml"
- "--report_format=XML"
- "--report_level=detailed")
- set_tests_properties("${EXE}" PROPERTIES TIMEOUT ${TEST_TIMEOUT_SEC})
+function(asterisk_scf_test_boost NAME)
+ add_test(NAME "${NAME}" COMMAND "${NAME}")
+ set(project_test_results "${CMAKE_BINARY_DIR}/test_results/${ASTERISK_SCF_PROJECT}")
+ file(MAKE_DIRECTORY "${project_test_results}")
+ file(TO_NATIVE_PATH "${project_test_results}/${NAME}.xml" project_test_results)
+ set_property(TEST "${NAME}" PROPERTY TIMEOUT ${TEST_TIMEOUT_SEC})
+ set_property(TEST "${NAME}" PROPERTY ENVIRONMENT "PATH=${ASTERISK_SCF_TEST_PATH};BOOST_TEST_REPORT_FORMAT=XML;BOOST_TEST_REPORT_LEVEL=detailed;BOOST_TEST_REPORT_SINK=${project_test_results}")
endfunction()
-function(icebox_add_test NAME CONFIG)
+function(asterisk_scf_test_icebox NAME CONFIG)
find_package(IceBox REQUIRED)
- add_test(NAME "${NAME}" COMMAND "${ICEBOX_EXECUTABLE}" "--Ice.Config=${CONFIG}")
- set_tests_properties("${NAME}" PROPERTIES TIMEOUT ${TEST_TIMEOUT_SEC})
+ add_test(NAME "${NAME}" COMMAND "${ICEBOX_EXECUTABLE}" "--Ice.Config=${ASTERISK_SCF_PROJECT_DIR}/${CONFIG}")
+ set(project_test_results "${CMAKE_BINARY_DIR}/test_results/${ASTERISK_SCF_PROJECT}")
+ file(MAKE_DIRECTORY "${project_test_results}")
+ file(TO_NATIVE_PATH "${project_test_results}/${NAME}.xml" project_test_results)
+ set_property(TEST "${NAME}" PROPERTY TIMEOUT ${TEST_TIMEOUT_SEC})
+ set_property(TEST "${NAME}" PROPERTY ENVIRONMENT "PATH=${ASTERISK_SCF_TEST_PATH};BOOST_TEST_REPORT_FORMAT=XML;BOOST_TEST_REPORT_LEVEL=detailed;BOOST_TEST_REPORT_SINK=${project_test_results}")
endfunction()
commit ee23705d7936e25fa76d36541a0ab660bf52c377
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Tue Apr 26 08:55:36 2011 -0500
Perform the basic check for Boost as soon as the main project is initialized,
since nearly every Asterisk SCF component requires it.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 66403fd..78dc4b9 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -298,6 +298,15 @@ function(asterisk_scf_project NAME ICE_VERSION)
append_to_var(CMAKE_MODULE_LINKER_FLAGS ${linker_flags})
append_to_var(CMAKE_SHARED_LINKER_FLAGS ${linker_flags})
+ # Boost is required
+ # Only specify those versions that are not "known" by default for
+ # the oldest version of cmake supported.
+ #
+ set(Boost_ADDITIONAL_VERSIONS "1.44" "1.44.0" "1.45" "1.45.0" "1.46" "1.46.0" "1.46.1")
+ find_package(Boost ${MIN_BOOST_VERSION} REQUIRED)
+ set(Boost_CORE_FOUND "bazinga" PARENT_SCOPE)
+ set(Boost_CORE_FOUND "bazinga")
+
message(STATUS "Passed requirement checks for CXX components")
endfunction()
@@ -309,19 +318,6 @@ endfunction()
# Find a Boost library.
function(find_Boost_library LIBRARY)
- if(NOT Boost_FOUND)
- #
- # Only specify those versions that are not "known" by default for
- # the oldest version of cmake supported.
- #
- set(Boost_ADDITIONAL_VERSIONS "1.44" "1.44.0" "1.45" "1.45.0" "1.46" "1.46.0" "1.46.1")
- find_package(Boost ${MIN_BOOST_VERSION})
- if(NOT Boost_FOUND)
- message(FATAL_ERROR "Boost libraries v${MIN_BOOST_VERSION} or better not found")
- endif()
- set(Boost_CORE_FOUND "bazinga" PARENT_SCOPE)
- set(Boost_CORE_FOUND "bazinga")
- endif()
string(TOUPPER ${LIBRARY} libtag)
if(NOT Boost_${libtag}_FOUND)
find_package(Boost REQUIRED ${LIBRARY})
commit 2bffa6ab93be88e2316baf9373055e11bd07e177
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Tue Apr 26 08:53:31 2011 -0500
Place all binary output into a single set of directories (not directories that
parallel the source tree).
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index f4c23a1..66403fd 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -201,6 +201,10 @@ function(asterisk_scf_project NAME ICE_VERSION)
message(STATUS "Setting up project ${NAME} for Ice version ${ICE_VERSION}")
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
+
# On Windows, IceBox C++ services must be compiled with some symbols exported;
# the source code should use ASTERISK_SCF_ICEBOX_EXPORT to accomplish this, and this
if(WIN32)
commit 92c60f854b5a5aca1a22734b054b2daaf99efd3a
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Tue Apr 26 08:52:50 2011 -0500
Remember sub-project names and directories for use by various processes.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index b6c3c4f..f4c23a1 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -188,6 +188,17 @@ endmacro()
# Function which initializes project specific things
function(asterisk_scf_project NAME ICE_VERSION)
+ if(ASTERISK_SCF_MASTER_PROJECT)
+ # this is a sub-project, so just record the name and
+ # move on
+ set(ASTERISK_SCF_PROJECT "${NAME}" PARENT_SCOPE)
+ set(ASTERISK_SCF_PROJECT_DIR "${CMAKE_CURRENT_LIST_DIR}" PARENT_SCOPE)
+ return()
+ else()
+ set(ASTERISK_SCF_PROJECT "MASTER" PARENT_SCOPE)
+ set(ASTERISK_SCF_MASTER_PROJECT true PARENT_SCOPE)
+ endif()
+
message(STATUS "Setting up project ${NAME} for Ice version ${ICE_VERSION}")
# On Windows, IceBox C++ services must be compiled with some symbols exported;
commit dbb6feda7e756133e4bf3ca7eb6fc23a7644f788
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Mon Apr 25 17:51:27 2011 -0500
Remember the Ice 'library directory' for scripts that need it.
diff --git a/modules/FindIce.cmake b/modules/FindIce.cmake
index ccd7f7b..f0ffb20 100644
--- a/modules/FindIce.cmake
+++ b/modules/FindIce.cmake
@@ -75,6 +75,10 @@
#
# ICE_INCLUDE_DIR The directory containing C++ include files
#
+# ICE_LIBRARY_DIR The directory containing Ice libraries (note: this is not
+# set until after at least one Ice component has been located;
+# this script does not automatically locate *any* Ice components)
+#
# ICE_SLICE_DIR The directory containing Slice files for the
# libraries provided with Ice
#
@@ -189,6 +193,17 @@ function(_ice_adjust_lib_vars library)
if(ICE_${upper}_LIBRARY)
_ice_set_cache_string(ICE_${upper}_LIBRARY "${ICE_${upper}_LIBRARY}" "The Ice ${library} library")
endif()
+
+ if(NOT ICE_LIBRARY_DIR)
+ get_filename_component(_ice_lib_dir ${ICE_${upper}_LIBRARY_RELEASE} PATH)
+ _ice_set_cache_path(ICE_LIBRARY_DIR ${_ice_lib_dir} "Location of Ice libraries")
+ mark_as_advanced(ICE_LIBRARY_DIR)
+ if(Ice_DEBUG)
+ message(STATUS
+ "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "found Ice libraries at: ${ICE_LIBRARY_DIR}")
+ endif()
+ endif()
endfunction()
if(NOT ICE_DIR)
commit f913b54065d5ff67c6e7cdf5d2c45b8ca0357eeb
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Mon Apr 25 17:50:53 2011 -0500
Ensure that once IceBox is found, the search won't be performed again.
diff --git a/modules/FindIceBox.cmake b/modules/FindIceBox.cmake
index c014258..6c493e0 100644
--- a/modules/FindIceBox.cmake
+++ b/modules/FindIceBox.cmake
@@ -29,7 +29,7 @@
#
# Variables set by this module:
#
-# ICEBOX_FOUND Will be set if a compatible version of Ice was found
+# ICEBOX_FOUND Will be set if IceBox was found
#
# ICEBOX_EXECUTABLE The path to the located IceBox program
@@ -85,12 +85,17 @@ function(_ice_find_program program)
endif()
endfunction()
-_ice_find_program(icebox)
+if(NOT ICEBOX_FOUND)
+ _ice_find_program(icebox)
-if(CMAKE_BUILD_TYPE STREQUAL debug)
- _ice_set_cache_filepath(ICEBOX_EXECUTABLE "${ICE_ICEBOX_PROGRAM_DEBUG}" "Path to a program.")
-else()
- _ice_set_cache_filepath(ICEBOX_EXECUTABLE "${ICE_ICEBOX_PROGRAM_RELEASE}" "Path to a program.")
-endif()
+ if(CMAKE_BUILD_TYPE STREQUAL debug)
+ _ice_set_cache_filepath(ICEBOX_EXECUTABLE "${ICE_ICEBOX_PROGRAM_DEBUG}" "Path to a program.")
+ else()
+ _ice_set_cache_filepath(ICEBOX_EXECUTABLE "${ICE_ICEBOX_PROGRAM_RELEASE}" "Path to a program.")
+ endif()
-find_package_handle_standard_args(IceBox DEFAULT_MSG ICEBOX_EXECUTABLE)
+ find_package_handle_standard_args(IceBox DEFAULT_MSG ICEBOX_EXECUTABLE)
+ if(ICEBOX_FOUND)
+ _ice_set_cache_string(ICEBOX_FOUND ${ICEBOX_FOUND} "")
+ endif()
+endif()
commit ad1482b42618df6d86229adb635613e5b7d91e54
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Mon Apr 25 17:50:12 2011 -0500
Ensure that once Ice is found, the search won't be performed again.
diff --git a/modules/FindIce.cmake b/modules/FindIce.cmake
index 1892135..ccd7f7b 100644
--- a/modules/FindIce.cmake
+++ b/modules/FindIce.cmake
@@ -327,6 +327,9 @@ if(ICE_DIR)
_ice_adjust_lib_vars("${component}")
endif()
find_package_component_handle_standard_args(Ice "${component}" DEFAULT_MSG ICE_${upper}_LIBRARY)
+ if(ICE_FOUND)
+ _ice_set_cache_string(ICE_FOUND ${ICE_FOUND} "")
+ endif()
endif()
endforeach()
endif()
-----------------------------------------------------------------------
--
asterisk-scf/release/cmake.git
More information about the asterisk-scf-commits
mailing list