[asterisk-scf-commits] asterisk-scf/release/cmake.git branch "ice-package" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Tue Jan 18 14:11:45 CST 2011
branch "ice-package" has been updated
via e22c91701e8d09c15abbe415de98bf0534f4364f (commit)
via 2be5e7695ba548148bda85b6d5e3c7f8e8f93fad (commit)
via 24bd86dd2d62ac137d9d94db09dfa753f1928d30 (commit)
via 930f32143424f1acca2fbaaa7bdde03019e4a364 (commit)
via b57eaa40ab92627dc19911f2221b283be97e89ec (commit)
via 37932db35fa674b1124250d03ee268d1e88ee348 (commit)
from e9522c2a91dba539f31d867197e029a8ee3050d9 (commit)
Summary of changes:
AsteriskSCF.cmake | 83 ++++++++++++++++++++++++++++++++----------------
modules/FindIce.cmake | 60 ++++++++++++++++++++++++++---------
2 files changed, 99 insertions(+), 44 deletions(-)
- Log -----------------------------------------------------------------
commit e22c91701e8d09c15abbe415de98bf0534f4364f
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Tue Jan 18 14:11:16 2011 -0600
First attempt at finding Ice in 'standard' locations chosen by ZeroC's
Ice installer on Windows. Now on to testing...
diff --git a/modules/FindIce.cmake b/modules/FindIce.cmake
index 19b6d81..abb3555 100644
--- a/modules/FindIce.cmake
+++ b/modules/FindIce.cmake
@@ -13,12 +13,26 @@
# PATH or any other CMake-provided default paths; instead, it will only
# search in predefined locations, which are:
#
-# ENV{ICE_HOME} if the ICE_HOME environment variable is set,
-# only that location is checked
-# /opt/Ice-<version> on UNIX-type platforms, subdirectories
-# of /opt are checked
-# C:/Ice-<version> on Windows platforms, subdirectories of C: are
-# checked
+# ENV{ICE_HOME}
+# if the ICE_HOME environment variable is set,
+# only that location is checked
+#
+# /opt/Ice-<version>
+# on UNIX-type platforms, subdirectories
+# of /opt are checked
+#
+# C:/Ice-<version>
+# on Windows platforms, subdirectories of C: are
+# checked since this is the default location for
+# Ice installations made from the Ice source code
+#
+# ENV{ProgramFiles}/ZeroC/Ice-<version>
+# on 32-bit Windows platforms, the ZeroC Ice installer
+# places Ice here
+#
+# ENV{ProgramFiles(x86)}/ZeroC/Ice-<version>
+# on 64-bit Windows platforms, the ZeroC Ice installer
+# places Ice here
#
# These are the standard locations for Ice installations performed by the
# ZeroC Ice packages; if Ice is installed in a non-standard location, then
@@ -110,8 +124,21 @@ function(_ice_find_library library)
set(_ice_debug_suffix "${CMAKE_DEBUG_POSTFIX}")
- find_library(ICE_${upper}_LIBRARY_RELEASE NAMES "${library}" NO_DEFAULT_PATH HINTS "${ICE_DIR}" PATH_SUFFIXES "lib" "lib32" "lib64")
- find_library(ICE_${upper}_LIBRARY_DEBUG NAMES "${library}${_ice_debug_suffix}" NO_DEFAULT_PATH HINTS "${ICE_DIR}" PATH_SUFFIXES "lib" "lib32" "lib64")
+ if(WIN32)
+ set(_ice_libdir "lib")
+ if(MSVC10)
+ set(_ice_libdir "${_ice_libdir}/vc100")
+ endif()
+ if(CMAKE_CL_64)
+ set(_ice_libdir "${_ice_libdir}/x64")
+ endif()
+ list(APPEND _ice_libdirs "${_ice_libdir}")
+ elseif(UNIX)
+ list(APPEND _ice_libdirs "lib" "lib32" "lib64")
+ endif()
+
+ find_library(ICE_${upper}_LIBRARY_RELEASE NAMES "${library}" NO_DEFAULT_PATH HINTS "${ICE_DIR}" PATH_SUFFIXES ${_ice_libdirs})
+ find_library(ICE_${upper}_LIBRARY_DEBUG NAMES "${library}${_ice_debug_suffix}" NO_DEFAULT_PATH HINTS "${ICE_DIR}" PATH_SUFFIXES ${_ice_libdirs})
mark_as_advanced(ICE_${upper}_LIBRARY_RELEASE ICE_${upper}_LIBRARY_DEBUG)
@@ -195,11 +222,19 @@ if(NOT ICE_DIR)
foreach(version IN LISTS _ice_candidate_versions)
if(WIN32)
list(APPEND _ice_candidate_dirs "C:/Ice-${version}")
+ if(ENV{ProgramFiles})
+ list(APPEND _ice_candidate_dirs "$ENV{ProgramFiles}/ZeroC/Ice-${version}")
+ endif()
+ if(ENV{ProgramFiles(x86)})
+ list(APPEND _ice_candidate_dirs "$ENV{ProgramFiles(x86)}/ZeroC/Ice-${version}")
+ endif()
elseif(UNIX)
list(APPEND _ice_candidate_dirs "/opt/Ice-${version}")
endif()
endforeach()
+ list(REMOVE_DUPLICATES _ice_candidate_dirs)
+
endif()
if(Ice_DEBUG)
commit 2be5e7695ba548148bda85b6d5e3c7f8e8f93fad
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Tue Jan 18 14:02:41 2011 -0600
Don't set a 'source group' unless CMake is generating files for
the Visual Studio IDE.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 8382f59..d930bd6 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -458,9 +458,11 @@ function(asterisk_scf_component_add_one_slice COMPONENT SLICE)
endif()
endif()
- # This makes the Slice definitions display in their own folder in the IDE,
- # specifically Visual Studio
- source_group("Slice Definitions" REGULAR_EXPRESSION "\\.ice$")
+ if(MSVC_IDE)
+ # This makes the Slice definitions display in their own folder in the
+ # Visual Studio IDE
+ source_group("Slice Definitions" REGULAR_EXPRESSION "\\.ice$")
+ endif()
# Append the needed include directories for Slice definitions
foreach(include ${SLICE_INCLUDE_DIRECTORIES})
commit 24bd86dd2d62ac137d9d94db09dfa753f1928d30
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Tue Jan 18 13:30:31 2011 -0600
Follow CMake guidelines and use 'HINTS' instead of 'PATHS' for searching
directories that were determined to be candidates from previous results.
diff --git a/modules/FindIce.cmake b/modules/FindIce.cmake
index 4a4a500..19b6d81 100644
--- a/modules/FindIce.cmake
+++ b/modules/FindIce.cmake
@@ -110,8 +110,8 @@ function(_ice_find_library library)
set(_ice_debug_suffix "${CMAKE_DEBUG_POSTFIX}")
- find_library(ICE_${upper}_LIBRARY_RELEASE NAMES "${library}" NO_DEFAULT_PATH PATHS "${ICE_DIR}" PATH_SUFFIXES "lib" "lib32" "lib64")
- find_library(ICE_${upper}_LIBRARY_DEBUG NAMES "${library}${_ice_debug_suffix}" NO_DEFAULT_PATH PATHS "${ICE_DIR}" PATH_SUFFIXES "lib" "lib32" "lib64")
+ find_library(ICE_${upper}_LIBRARY_RELEASE NAMES "${library}" NO_DEFAULT_PATH HINTS "${ICE_DIR}" PATH_SUFFIXES "lib" "lib32" "lib64")
+ find_library(ICE_${upper}_LIBRARY_DEBUG NAMES "${library}${_ice_debug_suffix}" NO_DEFAULT_PATH HINTS "${ICE_DIR}" PATH_SUFFIXES "lib" "lib32" "lib64")
mark_as_advanced(ICE_${upper}_LIBRARY_RELEASE ICE_${upper}_LIBRARY_DEBUG)
@@ -266,7 +266,7 @@ if(NOT ICE_DIR)
if(ICE_DIR)
mark_as_advanced(FORCE ICE_INCLUDE_DIR)
- find_path(ICE_SLICE_DIR "Ice/Current.ice" PATHS "${ICE_DIR}" PATH_SUFFIXES "slice" NO_DEFAULT_PATH)
+ find_path(ICE_SLICE_DIR "Ice/Current.ice" HINTS "${ICE_DIR}" PATH_SUFFIXES "slice" NO_DEFAULT_PATH)
if(NOT ICE_SLICE_DIR)
message(WARNING "Ice installation located at ${ICE_DIR} is incomplete or broken (missing 'slice' directory)")
else()
commit 930f32143424f1acca2fbaaa7bdde03019e4a364
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Tue Jan 18 13:22:12 2011 -0600
Address review feedback from CR-ASTSCF-46:
Use the existing CMake mechanism for defining a 'system' include directory
instead of doing it manually.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 769efcf..8382f59 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -178,14 +178,20 @@ function(asterisk_scf_project NAME ICE_VERSION)
message(STATUS "Performing requirement checks for components")
find_package(Ice 3.4 REQUIRED Ice IceUtil)
+
# All components need the Ice library, and it needs the
# IceUtil library (as do most components), so link
# every component against those libraries at minimum
set(ASTERISK_SCF_ICE_LIBRARIES ICE ICEUTIL PARENT_SCOPE)
+
message(STATUS "Using Ice C++ headers from: ${ICE_INCLUDE_DIR}")
- include_directories("${ICE_INCLUDE_DIR}")
+ # We mark the Ice include directory as a 'system' directory so that
+ # the compiler will be less likely to generate warnings and/or errors
+ # for the code in the Ice header files.
+ include_directories(SYSTEM "${ICE_INCLUDE_DIR}")
+
message(STATUS "Using Ice Slice files from: ${ICE_SLICE_DIR}")
- # we can't use asterisk_scf_slice_include_directories here because
+ # We can't use asterisk_scf_slice_include_directories here because
# the variable it sets will only be local to this function
set(SLICE_INCLUDE_DIRECTORIES "${ICE_SLICE_DIR}" PARENT_SCOPE)
diff --git a/modules/FindIce.cmake b/modules/FindIce.cmake
index 1b93fba..4a4a500 100644
--- a/modules/FindIce.cmake
+++ b/modules/FindIce.cmake
@@ -273,13 +273,6 @@ if(NOT ICE_DIR)
mark_as_advanced(FORCE ICE_SLICE_DIR)
endif()
- # This block essentially tricks the GNU compiler into treating the Ice header files as system headers. This has
- # the benefit of having warnings emitted by the headers NOT treated as errors, even if the compiler has been told
- # to do so. This is being utilized so that Ice itself does not have to be updated to be C++0x safe.
- if(CMAKE_COMPILER_IS_GNUCXX)
- _ice_set_cache_string(ICE_CXX_FLAGS "-isystem ${ICE_INCLUDE_DIR}" "Ice-specific compiler flags")
- endif()
-
endif()
find_package_handle_standard_args(Ice DEFAULT_MSG ICE_DIR ICE_SLICE_DIR ICE_INCLUDE_DIR)
commit b57eaa40ab92627dc19911f2221b283be97e89ec
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Tue Jan 18 13:15:46 2011 -0600
Add FindThreads-generated flags for C compilation as well.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 19989de..769efcf 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -193,6 +193,7 @@ function(asterisk_scf_project NAME ICE_VERSION)
find_package(Threads REQUIRED)
if(CMAKE_THREAD_LIBS_INIT)
if(NOT CMAKE_HAVE_THREADS_LIBRARY)
+ list(APPEND c_flags "${CMAKE_THREAD_LIBS_INIT}")
list(APPEND cxx_flags "${CMAKE_THREAD_LIBS_INIT}")
else()
list(APPEND linker_flags "${CMAKE_THREAD_LIBS_INIT}")
commit 37932db35fa674b1124250d03ee268d1e88ee348
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Tue Jan 18 13:13:28 2011 -0600
Address comments from CR-ASTSCF-46:
* Automatically set ICE_SLICE_DIR as a common Slice include directory, rather than
adding it in each build.
* Always include the compiler flags that FindThreads generates, not just for GCC.
* Correct handling of lists of compiler flags being set into single variables.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 0cbc3eb..19989de 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -148,6 +148,14 @@ macro(set_cache_var)
set(${ARGV} CACHE INTERNAL Bob FORCE)
endmacro()
+macro(set_cache_var_list VAR LIST TYPE DESCRIPTION)
+ unset(_scvl)
+ foreach(item IN LISTS ${LIST})
+ set(_scvl "${_scvl} ${item}")
+ endforeach()
+ set(${VAR} "${_scvl}" CACHE ${TYPE} ${DESCRIPTION} FORCE)
+endmacro()
+
# Function which initializes project specific things
function(asterisk_scf_project NAME ICE_VERSION)
message(STATUS "Setting up project ${NAME} for Ice version ${ICE_VERSION}")
@@ -176,6 +184,10 @@ function(asterisk_scf_project NAME ICE_VERSION)
set(ASTERISK_SCF_ICE_LIBRARIES ICE ICEUTIL PARENT_SCOPE)
message(STATUS "Using Ice C++ headers from: ${ICE_INCLUDE_DIR}")
include_directories("${ICE_INCLUDE_DIR}")
+ message(STATUS "Using Ice Slice files from: ${ICE_SLICE_DIR}")
+ # we can't use asterisk_scf_slice_include_directories here because
+ # the variable it sets will only be local to this function
+ set(SLICE_INCLUDE_DIRECTORIES "${ICE_SLICE_DIR}" PARENT_SCOPE)
# threading support required
find_package(Threads REQUIRED)
@@ -205,31 +217,41 @@ function(asterisk_scf_project NAME ICE_VERSION)
endif()
if(CMAKE_COMPILER_IS_GNUC)
- set(CMAKE_C_FLAGS_DEBUG "-Werror -Wall -g3"
- CACHE STRING "Flags used by the compiler during debug builds." FORCE)
- set(CMAKE_C_FLAGS_PROFILE
- "${CMAKE_C_FLAGS_DEBUG} -ftest-coverage -fprofile-arcs"
- CACHE STRING "Flags used by the compiler during profile builds." FORCE)
- mark_as_advanced(CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_PROFILE)
+ list(APPEND c_flags_debug "-Werror" "-Wall" "-g3")
+ list(APPEND c_flags_profile "-ftest-coverage" "-fprofile-arcs")
endif()
if(CMAKE_COMPILER_IS_GNUCXX)
- set(CMAKE_CXX_FLAGS "${ICE_CXX_FLAGS} ${cxx_flags}"
- CACHE STRING "Flags used by the compiler during all builds." FORCE)
- set(CMAKE_CXX_FLAGS_DEBUG "-Werror -Wall -g3"
- CACHE STRING "Flags used by the compiler during debug builds." FORCE)
- set(CMAKE_CXX_FLAGS_PROFILE
- "${CMAKE_CXX_FLAGS_DEBUG} -ftest-coverage -fprofile-arcs"
- CACHE STRING "Flags used by the compiler during profile builds." FORCE)
- mark_as_advanced(CMAKE_C_FLAGS_PROFILE CMAKE_CXX_FLAGS_PROFILE CMAKE_EXE_LINKER_FLAGS_PROFILE)
+ list(APPEND cxx_flags ${ICE_CXX_FLAGS})
+ list(APPEND cxx_flags_debug "-Werror" "-Wall" "-g3")
+ list(APPEND cxx_flags_profile "-ftest-coverage" "-fprofile-arcs")
endif()
- set(CMAKE_EXE_LINKER_FLAGS "${linker_flags}"
- CACHE STRING "Flags used by the linker for standalone components during all builds." FORCE)
- set(CMAKE_MODULE_LINKER_FLAGS "${linker_flags}"
- CACHE STRING "Flags used by the linker for modules during all builds." FORCE)
- set(CMAKE_SHARED_LINKER_FLAGS "${linker_flags}"
- CACHE STRING "Flags used by the linker for shared libraries during all builds." FORCE)
+ list(APPEND c_flags_profile ${c_flags_debug})
+ set_cache_var_list(CMAKE_C_FLAGS c_flags STRING
+ "Flags used by the compiler during all builds.")
+ set_cache_var_list(CMAKE_C_FLAGS_DEBUG c_flags_debug STRING
+ "Flags used by the compiler during debug builds.")
+ set_cache_var_list(CMAKE_C_FLAGS_PROFILE c_flags_profile STRING
+ "Flags used by the compiler during profile builds.")
+ mark_as_advanced(CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_PROFILE)
+
+ list(APPEND cxx_flags_profile ${cxx_flags_debug})
+ set_cache_var_list(CMAKE_CXX_FLAGS cxx_flags STRING
+ "Flags used by the compiler during all builds.")
+ set_cache_var_list(CMAKE_CXX_FLAGS_DEBUG cxx_flags_debug STRING
+ "Flags used by the compiler during debug builds.")
+ set_cache_var_list(CMAKE_CXX_FLAGS_PROFILE cxx_flags_profile STRING
+ "Flags used by the compiler during profile builds.")
+ mark_as_advanced(CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_PROFILE)
+
+ set_cache_var_list(CMAKE_EXE_LINKER_FLAGS linker_flags STRING
+ "Flags used by the linker for standalone components during all builds.")
+ set_cache_var_list(CMAKE_MODULE_LINKER_FLAGS linker_flags STRING
+ "Flags used by the linker for modules during all builds.")
+ set_cache_var_list(CMAKE_SHARED_LINKER_FLAGS linker_flags STRING
+ "Flags used by the linker for shared libraries during all builds.")
+ mark_as_advanced(CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
message(STATUS "Passed requirement checks for CXX components")
endfunction()
@@ -434,10 +456,6 @@ function(asterisk_scf_component_add_one_slice COMPONENT SLICE)
source_group("Slice Definitions" REGULAR_EXPRESSION "\\.ice$")
# Append the needed include directories for Slice definitions
- # (global and the ones stored for this target)
- if(ICE_SLICE_DIR)
- list(APPEND slice_compiler_arguments "-I${ICE_SLICE_DIR}")
- endif()
foreach(include ${SLICE_INCLUDE_DIRECTORIES})
# Each directory in this list will be in the source tree,
# which is what the Slice compiler will need
-----------------------------------------------------------------------
--
asterisk-scf/release/cmake.git
More information about the asterisk-scf-commits
mailing list