[asterisk-scf-commits] asterisk-scf/integration/cmake.git branch "disintegrated-build" created.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Thu Jun 2 13:28:28 CDT 2011
branch "disintegrated-build" has been created
at ec38712437f096a79e60c198b092da3c785139b8 (commit)
- Log -----------------------------------------------------------------
commit ec38712437f096a79e60c198b092da3c785139b8
Merge: 5a1de20 6ccba81
Author: Joshua Colp <jcolp at digium.com>
Date: Tue May 10 17:03:55 2011 -0300
Merge branch 'master' of git.asterisk.org:asterisk-scf/release/cmake
commit 5a1de206a9b427871189c29f16bc3b67ee634191
Author: Joshua Colp <jcolp at digium.com>
Date: Tue May 10 17:02:20 2011 -0300
Do not explicit disable SSL support when configuring pjproject.
diff --git a/modules/pjproject.cmake b/modules/pjproject.cmake
index 2185143..5bd04f5 100644
--- a/modules/pjproject.cmake
+++ b/modules/pjproject.cmake
@@ -28,7 +28,7 @@ if (CMAKE_SIZEOF_VOID_P MATCHES 8)
set(ADDITIONAL_CONFIGURE_ARGUMENTS "CFLAGS=-fPIC")
endif()
-add_custom_command(OUTPUT "${CMAKE_SOURCE_DIR}/pjproject/build.mak" COMMAND "./configure" "--disable-sound" "--disable-ssl" ${ADDITIONAL_CONFIGURE_ARGUMENTS} WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/pjproject" COMMENT "Configuring pjproject")
+add_custom_command(OUTPUT "${CMAKE_SOURCE_DIR}/pjproject/build.mak" COMMAND "./configure" "--disable-sound" ${ADDITIONAL_CONFIGURE_ARGUMENTS} WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/pjproject" COMMENT "Configuring pjproject")
add_custom_command(OUTPUT "${CMAKE_SOURCE_DIR}/pjproject/pjlib/include/pj/config_site.h" COMMAND "make" "dep" "TARGET_NAME=asteriskscf" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/pjproject" COMMENT "Dependency generating pjproject" DEPENDS "${CMAKE_SOURCE_DIR}/pjproject/build.mak")
add_custom_target(pjproject-clean COMMAND "make" "clean" "TARGET_NAME=asteriskscf" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/pjproject" COMMENT "Cleaning pjproject")
add_custom_target(pjproject-distclean COMMAND "make" "distclean" "TARGET_NAME=asteriskscf" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/pjproject" COMMENT "Deep cleaning pjproject")
commit 6ccba8133c57ab68078e17ef445973ce93064b51
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Tue May 10 14:31:24 2011 -0500
Change the test results file naming scheme to put all the result files
into a single directory for easier parsing and conversion.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index dba221f..0766521 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -799,7 +799,7 @@ 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)
+ file(TO_NATIVE_PATH "${project_test_results}-${NAME}.xml" project_test_results)
set_test_props("${NAME}" "${project_test_results}")
endfunction()
@@ -808,6 +808,6 @@ function(asterisk_scf_test_icebox NAME CONFIG)
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)
+ file(TO_NATIVE_PATH "${project_test_results}-${NAME}.xml" project_test_results)
set_test_props("${NAME}" "${project_test_results}")
endfunction()
commit 3b96c49972b8f8384c399183a6f5f1e004112dfb
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Mon May 9 17:51:47 2011 -0500
When computing paths to be included in PATH for tests to be able to run,
account for the 'Debug' and 'Release' subdirectories created when a build
is made using Visual Studio project files.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index edd9277..dba221f 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -134,22 +134,25 @@ if(WIN32 AND ${CMAKE_BUILD_TYPE} STREQUAL profile)
endif()
if(WIN32)
+ if(MSVC_IDE)
# The <config>.in files and any other script that reference binary
- # directories need to account for the /Debug and /Release subdirectories for Windows.
- set(binsubdir "/${CMAKE_BUILD_TYPE}" CACHE INTERNAL "Subfolder for binary output. Only set on Windows.")
-
- #
- # On 64 bit builds on Windows (Windows x64), projects that include
- # pjproject header files need to define the architecture to allow
- # the appropriate definitions to be compiled in. Note that this may
- # not be entirely accurate as its not clear whether CMake defines this
- # as 1 when IA64 is the target. Seeing as IA64 is not common and our
- # projects don't have support for it anyway, we'll go with the
- # assumption that this is an x64 type platform.
- #
- if(${CMAKE_CL_64})
- add_definitions(-D__amd64)
- endif()
+ # directories need to account for the /Debug and /Release subdirectories for Visual Studio
+ # project file based builds.
+ set(BINARY_SUBDIR "/${CMAKE_BUILD_TYPE}" CACHE INTERNAL "Subfolder for binary output. Only set for Visual Studio project file based builds.")
+ endif()
+
+ #
+ # On 64 bit builds on Windows (Windows x64), projects that include
+ # pjproject header files need to define the architecture to allow
+ # the appropriate definitions to be compiled in. Note that this may
+ # not be entirely accurate as its not clear whether CMake defines this
+ # as 1 when IA64 is the target. Seeing as IA64 is not common and our
+ # projects don't have support for it anyway, we'll go with the
+ # assumption that this is an x64 type platform.
+ #
+ if(${CMAKE_CL_64})
+ add_definitions(-D__amd64)
+ endif()
endif()
if(UNIX)
@@ -207,7 +210,7 @@ macro(compute_test_paths)
endforeach()
# Add the project's binary directories for tests and components
- file(TO_NATIVE_PATH "${PROJECT_BINARY_DIR}/bin" foo)
+ file(TO_NATIVE_PATH "${PROJECT_BINARY_DIR}/bin${BINARY_SUBDIR}" foo)
list(APPEND test_path_dirs "${foo}")
# Add the Ice directory that contains executables
@@ -216,7 +219,7 @@ macro(compute_test_paths)
# On Windows, we also need some additional directories
if(WIN32)
- file(TO_NATIVE_PATH "${PROJECT_BINARY_DIR}/lib" foo)
+ file(TO_NATIVE_PATH "${PROJECT_BINARY_DIR}/lib${BINARY_SUBDIR}" foo)
list(APPEND test_path_dirs "${foo}")
foreach(test_path_dir ${Boost_LIBRARY_DIRS})
file(TO_NATIVE_PATH "${test_path_dir}" foo)
commit c4c4b18e8ed2fa8747d0ee8bacdc5122f04d3165
Author: David M. Lee <dlee at digium.com>
Date: Thu May 5 13:31:01 2011 -0500
CMAKE_CURRENT_LIST_DIR -> CMAKE_CURRENT_SOURCE_DIR
CMAKE_CURRENT_LIST_DIR is only supported in cmake-2.8.3 or newer.
CMAKE_CURRENT_SOURCE_DIR seems to have the same value for our scripts,
and is supported in older versions of CMake.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index fd8f140..edd9277 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -272,7 +272,7 @@ function(asterisk_scf_project NAME ICE_VERSION)
# 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)
+ set(ASTERISK_SCF_PROJECT_DIR "${CMAKE_CURRENT_SOURCE_DIR}" PARENT_SCOPE)
return()
else()
set(ASTERISK_SCF_PROJECT "MASTER" PARENT_SCOPE)
commit b94c27f58b914d64464ed73b6f1763c87790b95e
Author: David M. Lee <dlee at digium.com>
Date: Thu May 5 10:42:53 2011 -0500
-Werror has returned.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 12bfc44..fd8f140 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -360,7 +360,7 @@ function(asterisk_scf_project NAME ICE_VERSION)
if(HAVE_W_LOGICAL_OP)
list(APPEND cxx_flags_debug "-Wlogical-op")
endif()
- #list(APPEND cxx_flags_debug "-Werror")
+ list(APPEND cxx_flags_debug "-Werror")
list(APPEND cxx_flags_profile "-ftest-coverage" "-fprofile-arcs")
endif()
commit 71502cdc65df424bcc5137844be33189fb7ef285
Author: David M. Lee <dlee at digium.com>
Date: Tue May 3 10:12:16 2011 -0500
Fix -isystem flag for Mac OS X
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 52a5430..12bfc44 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -49,6 +49,12 @@
set(MIN_BOOST_VERSION 1.40)
set(TEST_TIMEOUT_SEC 60)
+# CMake mistakenly thinks that GCC on OS X doesn't support -isystem.
+# See http://public.kitware.com/Bug/view.php?id=10837
+if(APPLE)
+ set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
+endif()
+
if(CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
message(FATAL_ERROR "This project must not be built in the source directory")
endif()
commit fbeb05989f3b1fe4ef06be4cb587c87b6d00a947
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Wed Apr 27 13:55:46 2011 -0500
Remove support for adding Boost and/or Ice libraries to all components in a
directory and its children; it's easy enough to add them to the components
that need them, so the shotgun approach doesn't save much time and it results
in components being linked to libraries they don't actually use.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 78a975f..52a5430 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -405,26 +405,6 @@ function(find_Boost_library LIBRARY)
endif()
endfunction()
-# Function which adds Boost libraries to all components in the current
-# directory and below
-function(asterisk_scf_add_boost_libraries)
- if(NOT ARGN)
- message(FATAL_ERROR "You must pass at least one library to this function")
- endif()
- set(libs ${ASTERISK_SCF_BOOST_LIBRARIES})
- # By default we are disabling boost auto-linking and specifying dynamic linking.
- add_definitions(-DBOOST_ALL_NO_LIB -DBOOST_ALL_DYN_LINK)
- foreach(lib ${ARGN})
- find_Boost_library(${lib})
- string(TOUPPER "${lib}" lib)
- list(APPEND libs ${lib})
- endforeach()
- list(REMOVE_DUPLICATES libs)
- set(ASTERISK_SCF_BOOST_LIBRARIES ${libs} PARENT_SCOPE)
- include_directories(SYSTEM ${Boost_INCLUDE_DIR})
- link_directories(${Boost_LIBRARY_DIRS})
-endfunction()
-
# Function which adds Boost libraries needed by a component
function(asterisk_scf_component_add_boost_libraries COMPONENT)
if(NOT ARGN)
@@ -509,23 +489,7 @@ function(asterisk_scf_component_add_file COMPONENT)
set(${COMPONENT}_SOURCES ${file_list} PARENT_SCOPE)
endfunction()
-# Function which adds Ice libraries to all components in the current
-# directory and below
-function(asterisk_scf_add_ice_libraries)
- if(NOT ARGN)
- message(FATAL_ERROR "You must pass at least one library to this function")
- endif()
- set(libs ${ASTERISK_SCF_ICE_LIBRARIES})
- foreach(lib ${ARGN})
- find_package(Ice REQUIRED ${lib})
- string(TOUPPER "${lib}" lib)
- list(APPEND libs ${lib})
- endforeach()
- list(REMOVE_DUPLICATES libs)
- set(ASTERISK_SCF_ICE_LIBRARIES ${libs} PARENT_SCOPE)
-endfunction()
-
-# Function which adds Ice libraries needed by a component
+# Function which remembers Ice libraries needed by a component
function(asterisk_scf_component_add_ice_libraries COMPONENT)
if(NOT ARGN)
message(FATAL_ERROR "You must pass at least one library to this function")
commit 8e78a92dc7e126ef2770fbf3c5952abfae69d99b
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Wed Apr 27 11:10:48 2011 -0500
CMakeLists.txt cleanup across the entire tree.
* Consistent formatting.
* Removed old non-integrated build stuff.
* Organized include_directories() calls since they affect every component in
the directory they are executed in.
* Keep all scripts lines for each component together.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index c97179e..78a975f 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -279,6 +279,8 @@ function(asterisk_scf_project NAME ICE_VERSION)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib" PARENT_SCOPE)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin" PARENT_SCOPE)
+ set(CMAKE_INCLUDE_CURRENT_DIR true)
+
# 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 698a7ad108ed398c10cbfe82768b6bb8fa811b87
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Wed Apr 27 09:51:07 2011 -0500
Use a CMake global property to let it automatically search lib64 directories
on UNIX-type platforms when a 64-bit build is being done.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index e568b5a..c97179e 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -146,6 +146,10 @@ if(WIN32)
endif()
endif()
+if(UNIX)
+ set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS true)
+endif()
+
if(${CMAKE_BUILD_TYPE} STREQUAL profile)
message(STATUS "Disabling shared libs.")
set(BUILD_SHARED_LIBS false
diff --git a/modules/FindIce.cmake b/modules/FindIce.cmake
index f0ffb20..a300d39 100644
--- a/modules/FindIce.cmake
+++ b/modules/FindIce.cmake
@@ -143,7 +143,7 @@ function(_ice_find_library library)
# if it's not there, try just lib. that's where make install puts it
list(APPEND _ice_libdirs "${_ice_libdir}" "lib")
elseif(UNIX)
- list(APPEND _ice_libdirs "lib" "lib32" "lib64")
+ list(APPEND _ice_libdirs "lib")
endif()
find_library(ICE_${upper}_LIBRARY_RELEASE NAMES "${library}" NO_DEFAULT_PATH HINTS "${ICE_DIR}" PATH_SUFFIXES ${_ice_libdirs})
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()
commit d5da796c0242e9fe5e93145a398e38199c173220
Author: Brent Eagles <beagles at digium.com>
Date: Thu Apr 21 16:26:29 2011 -0230
It appears, that in my cmake on Windows at least, that the FindBoost does not
automatically look for 1.44 versions of Boost. I've added the appropriate entries.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 8eab9ad..b6c3c4f 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -299,7 +299,7 @@ function(find_Boost_library LIBRARY)
# Only specify those versions that are not "known" by default for
# the oldest version of cmake supported.
#
- set(Boost_ADDITIONAL_VERSIONS "1.45" "1.45.0" "1.46" "1.46.0" "1.46.1")
+ 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")
commit a6ac4e1250366094c75509ff261fd4c45a499745
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Wed Apr 20 09:14:44 2011 -0500
Use the CheckCXXCompilerFlag macro included with Cmake to test for
C++0x support and -Wlogical-op support.
Re-enable -Wunused-parameter now that we have disabled -Werror; when we get
all the warnings resolved, -Werror will return.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index be09ffd..8eab9ad 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -236,20 +236,16 @@ function(asterisk_scf_project NAME ICE_VERSION)
endif()
endif()
- # Use a compile test to see if shared_ptr is supported. If present then C++0x support exists.
+ # Use a compiler test for GCC to see if C++0x is supported; enable it if found.
if(CMAKE_COMPILER_IS_GNUCXX)
- try_compile(SHARED_PTR_PRESENT
- ${CMAKE_BINARY_DIR}
- ${CMAKE_SOURCE_DIR}/cmake/tests/SharedPtr.cpp
- COMPILE_DEFINITIONS "-std=c++0x"
- OUTPUT_VARIABLE OUTPUT
- )
- if(SHARED_PTR_PRESENT)
- message(STATUS "Support for C++0x Enabled")
- add_definitions("-DCPP_ZEROX_SUPPORT")
- list(APPEND cxx_flags "-std=c++0x")
+ include(CheckCXXCompilerFlag)
+ CHECK_CXX_COMPILER_FLAG(-std=c++0x HAVE_STD_CPP0X)
+ if(HAVE_STD_CPP0X)
+ add_definitions("-DCPP_ZEROX_SUPPORT")
+ list(APPEND cxx_flags "-std=c++0x")
+ message(STATUS "Support for C++0x Enabled")
else()
- message(STATUS "Support for C++0x Disabled")
+ message(STATUS "Support for C++0x Disabled")
endif()
endif()
@@ -260,9 +256,14 @@ function(asterisk_scf_project NAME ICE_VERSION)
if(CMAKE_COMPILER_IS_GNUCXX)
list(APPEND cxx_flags ${ICE_CXX_FLAGS})
- # TODO - add -Wlogical-op if and only if supported
- # TODO - remove -Wno-unused-parameter when we get the Ice headers straightened out
- list(APPEND cxx_flags_debug "-Wshadow" "-Wmissing-format-attribute" "-Wformat=2" "-Wall" "-Wextra" "-Wpointer-arith" "-Wconversion" "-Wno-unused-parameter" "-g3")
+ list(APPEND cxx_flags_debug "-Wall" "-Wextra" "-g3")
+ list(APPEND cxx_flags_debug "-Wshadow" "-Wmissing-format-attribute" "-Wformat=2" "-Wpointer-arith" "-Wconversion")
+ include(CheckCXXCompilerFlag)
+ CHECK_CXX_COMPILER_FLAG(-Wlogical-op HAVE_W_LOGICAL_OP)
+ if(HAVE_W_LOGICAL_OP)
+ list(APPEND cxx_flags_debug "-Wlogical-op")
+ endif()
+ #list(APPEND cxx_flags_debug "-Werror")
list(APPEND cxx_flags_profile "-ftest-coverage" "-fprofile-arcs")
endif()
commit ab619613d15ba05480c2f5b8fb811f21779afd60
Author: Brent Eagles <beagles at digium.com>
Date: Tue Apr 19 10:23:59 2011 -0230
Temporarily disabling the "treat warnings as error flag" until we can
sort out the shadow warnings for AMD related generated code.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index c1d1d55..be09ffd 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -254,7 +254,7 @@ function(asterisk_scf_project NAME ICE_VERSION)
endif()
if(CMAKE_COMPILER_IS_GNUC)
- list(APPEND c_flags_debug "-Werror" "-Wall" "-g3")
+ list(APPEND c_flags_debug "-Wall" "-g3")
list(APPEND c_flags_profile "-ftest-coverage" "-fprofile-arcs")
endif()
@@ -262,7 +262,7 @@ function(asterisk_scf_project NAME ICE_VERSION)
list(APPEND cxx_flags ${ICE_CXX_FLAGS})
# TODO - add -Wlogical-op if and only if supported
# TODO - remove -Wno-unused-parameter when we get the Ice headers straightened out
- list(APPEND cxx_flags_debug "-Werror" "-Wshadow" "-Wmissing-format-attribute" "-Wformat=2" "-Wall" "-Wextra" "-Wpointer-arith" "-Wconversion" "-Wno-unused-parameter" "-g3")
+ list(APPEND cxx_flags_debug "-Wshadow" "-Wmissing-format-attribute" "-Wformat=2" "-Wall" "-Wextra" "-Wpointer-arith" "-Wconversion" "-Wno-unused-parameter" "-g3")
list(APPEND cxx_flags_profile "-ftest-coverage" "-fprofile-arcs")
endif()
commit 09b5396de4a65eb8686d91919722e558aee51467
Author: David M. Lee <dlee at digium.com>
Date: Sun Apr 17 20:22:46 2011 -0500
Create config_site.h, if it does not exist.
This used to happen in the gitall script, but I got tired of it being
missing whenever I cleaned out the pjproject directory.
diff --git a/modules/pjproject.cmake b/modules/pjproject.cmake
index 77d0847..2185143 100644
--- a/modules/pjproject.cmake
+++ b/modules/pjproject.cmake
@@ -35,6 +35,13 @@ add_custom_target(pjproject-distclean COMMAND "make" "distclean" "TARGET_NAME=as
# Function which adds build targets for the following supported pjproject components: pjlib, pjlib-util, pjnath, pjmedia, pjsip.
function(pjproject_build PJPROJECT_COMPONENT)
+ # Make sure that config_site.h exists.
+ # Only touch it if you have to to avoid triggering needless builds.
+ if(NOT EXISTS "${CMAKE_SOURCE_DIR}/pjproject/pjlib/include/pj/config_site.h")
+ message(STATUS "pjproject: Creating config_site.h")
+ file(WRITE "${CMAKE_SOURCE_DIR}/pjproject/pjlib/include/pj/config_site.h" "")
+ endif()
+
if(UNIX)
if(${PJPROJECT_COMPONENT} STREQUAL "third_party")
add_custom_target("pjproject-third_party" COMMAND "make" "TARGET_NAME=asteriskscf" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/pjproject/third_party/build" COMMENT "Building pjproject third party components" DEPENDS "${CMAKE_SOURCE_DIR}/pjproject/pjlib/include/pj/config_site.h")
commit 0a5d9aff2a5af208afe3736e2d674ed73138c160
Author: David M. Lee <dlee at digium.com>
Date: Fri Apr 15 13:39:45 2011 -0500
Removed two -W flags that are causing problems.
* -Wlogical-op - unsupported in older GCC's
* -Wunused-parameter - Ice is still generating some unused params
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 6d22fd8..c1d1d55 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -260,7 +260,9 @@ function(asterisk_scf_project NAME ICE_VERSION)
if(CMAKE_COMPILER_IS_GNUCXX)
list(APPEND cxx_flags ${ICE_CXX_FLAGS})
- list(APPEND cxx_flags_debug "-Werror" "-Wshadow" "-Wmissing-format-attribute" "-Wformat=2" "-Wall" "-Wextra" "-Wpointer-arith" "-Wconversion" "-Wlogical-op" "-g3")
+ # TODO - add -Wlogical-op if and only if supported
+ # TODO - remove -Wno-unused-parameter when we get the Ice headers straightened out
+ list(APPEND cxx_flags_debug "-Werror" "-Wshadow" "-Wmissing-format-attribute" "-Wformat=2" "-Wall" "-Wextra" "-Wpointer-arith" "-Wconversion" "-Wno-unused-parameter" "-g3")
list(APPEND cxx_flags_profile "-ftest-coverage" "-fprofile-arcs")
endif()
commit f497f9c0235bf0037cbc95f7c42b6c3d24b5840a
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Thu Apr 14 13:16:01 2011 -0500
Enable a few more useful GCC warning messages for various suspect (or downright
broken) code constructs.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 48aaa53..6d22fd8 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -260,7 +260,7 @@ function(asterisk_scf_project NAME ICE_VERSION)
if(CMAKE_COMPILER_IS_GNUCXX)
list(APPEND cxx_flags ${ICE_CXX_FLAGS})
- list(APPEND cxx_flags_debug "-Werror" "-Wall" "-g3")
+ list(APPEND cxx_flags_debug "-Werror" "-Wshadow" "-Wmissing-format-attribute" "-Wformat=2" "-Wall" "-Wextra" "-Wpointer-arith" "-Wconversion" "-Wlogical-op" "-g3")
list(APPEND cxx_flags_profile "-ftest-coverage" "-fprofile-arcs")
endif()
commit abe903d9fedf8ed43a7d6473ede1f7d430b0bc1a
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Thu Apr 14 13:15:25 2011 -0500
Mark pjproject include directory as a 'system' directory so that the compiler
won't generate warnings for constructs in those headers.
diff --git a/modules/pjproject.cmake b/modules/pjproject.cmake
index 1ce4a82..77d0847 100644
--- a/modules/pjproject.cmake
+++ b/modules/pjproject.cmake
@@ -78,7 +78,7 @@ function(pjproject_build PJPROJECT_COMPONENT)
if(${PJPROJECT_COMPONENT} STREQUAL "pjmedia")
link_directories("${CMAKE_SOURCE_DIR}/pjproject/third_party/lib")
endif()
- include_directories("${CMAKE_SOURCE_DIR}/pjproject/${PJPROJECT_COMPONENT}/include")
+ include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/pjproject/${PJPROJECT_COMPONENT}/include")
link_directories("${CMAKE_SOURCE_DIR}/pjproject/${PJPROJECT_COMPONENT}/lib")
endfunction()
commit df39a18da3e617f8ee16a559143d6ac72f312063
Author: David M. Lee <dlee at digium.com>
Date: Wed Apr 13 08:48:21 2011 -0500
Added default test timeout of 60 seconds.
This change prevents a hanging test from hanging the build.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 990b117..48aaa53 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -47,6 +47,7 @@
#
set(MIN_BOOST_VERSION 1.40)
+set(TEST_TIMEOUT_SEC 60)
if(CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
message(FATAL_ERROR "This project must not be built in the source directory")
@@ -725,9 +726,11 @@ function(boost_add_test EXE)
"--report_sink=${CMAKE_BINARY_DIR}/${EXE}-result.xml"
"--report_format=XML"
"--report_level=detailed")
+ set_tests_properties("${EXE}" PROPERTIES TIMEOUT ${TEST_TIMEOUT_SEC})
endfunction()
function(icebox_add_test 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})
endfunction()
commit 7a90d1536f85845e1a0005b29b72a51e12def2f5
Author: Brent Eagles <beagles at digium.com>
Date: Fri Apr 8 15:10:20 2011 -0230
- Add support for newer versions of Boost.
- Add support for x64 builds that include pjproject on Windows.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 2eff59c..990b117 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -126,10 +126,23 @@ if(WIN32 AND ${CMAKE_BUILD_TYPE} STREQUAL profile)
message(FATAL_ERROR "Profile builds not supported")
endif()
-# The <config>.in files and any other script that reference binary
-# directories need to account for the /Debug and /Release subdirectories for Windows.
if(WIN32)
- set(binsubdir "/${CMAKE_BUILD_TYPE}" CACHE INTERNAL "Subfolder for binary output. Only set on Windows.")
+ # The <config>.in files and any other script that reference binary
+ # directories need to account for the /Debug and /Release subdirectories for Windows.
+ set(binsubdir "/${CMAKE_BUILD_TYPE}" CACHE INTERNAL "Subfolder for binary output. Only set on Windows.")
+
+ #
+ # On 64 bit builds on Windows (Windows x64), projects that include
+ # pjproject header files need to define the architecture to allow
+ # the appropriate definitions to be compiled in. Note that this may
+ # not be entirely accurate as its not clear whether CMake defines this
+ # as 1 when IA64 is the target. Seeing as IA64 is not common and our
+ # projects don't have support for it anyway, we'll go with the
+ # assumption that this is an x64 type platform.
+ #
+ if(${CMAKE_CL_64})
+ add_definitions(-D__amd64)
+ endif()
endif()
if(${CMAKE_BUILD_TYPE} STREQUAL profile)
@@ -278,7 +291,11 @@ endfunction()
# Find a Boost library.
function(find_Boost_library LIBRARY)
if(NOT Boost_FOUND)
- set(Boost_ADDITIONAL_VERSIONS "1.39" "1.39.0" "1.40" "1.40.0" "1.41" "1.41.0" "1.42" "1.42.0" "1.44" "1.44.0")
+ #
+ # Only specify those versions that are not "known" by default for
+ # the oldest version of cmake supported.
+ #
+ set(Boost_ADDITIONAL_VERSIONS "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")
diff --git a/modules/pjproject.cmake b/modules/pjproject.cmake
index d60c484..1ce4a82 100644
--- a/modules/pjproject.cmake
+++ b/modules/pjproject.cmake
@@ -108,46 +108,57 @@ function(pjproject_link COMPONENT PJPROJECT_COMPONENT)
endif()
elseif(MSVC80 OR MSVC90 OR MSVC10)
if(MSVC10)
- set(MSVC_VERSION "vc10")
+ set(MSVC_VERSION "v100")
else()
set(MSVC_VERSION "vc8")
endif()
+ if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86")
+ if(${CMAKE_CL_64})
+ set(X_CPU "amd64")
+ set(X_TARG "x64")
+ else()
+ set(X_CPU "x86")
+ set(X_TARG "Win32")
+ endif()
+ endif()
if(${PJPROJECT_COMPONENT} STREQUAL "pjsip")
- if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86")
- target_link_libraries(${COMPONENT} debug "pjsip-core-i386-Win32-${MSVC_VERSION}-Debug")
- target_link_libraries(${COMPONENT} optimized "pjsip-core-i386-Win32-${MSVC_VERSION}-Release")
- target_link_libraries(${COMPONENT} debug "pjsip-simple-i386-Win32-${MSVC_VERSION}-Debug")
- target_link_libraries(${COMPONENT} optimized "pjsip-simple-i386-Win32-${MSVC_VERSION}-Release")
- target_link_libraries(${COMPONENT} debug "pjsip-ua-i386-Win32-${MSVC_VERSION}-Debug")
- target_link_libraries(${COMPONENT} optimized "pjsip-ua-i386-Win32-${MSVC_VERSION}-Release")
- target_link_libraries(${COMPONENT} debug "pjsua-lib-i386-Win32-${MSVC_VERSION}-Debug")
- target_link_libraries(${COMPONENT} optimized "pjsua-lib-i386-Win32-${MSVC_VERSION}-Release")
- endif()
+ target_link_libraries(${COMPONENT} debug "pjsip-core-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Debug")
+ target_link_libraries(${COMPONENT} optimized "pjsip-core-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Release")
+ target_link_libraries(${COMPONENT} debug "pjsip-simple-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Debug")
+ target_link_libraries(${COMPONENT} optimized "pjsip-simple-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Release")
+ target_link_libraries(${COMPONENT} debug "pjsip-ua-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Debug")
+ target_link_libraries(${COMPONENT} optimized "pjsip-ua-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Release")
+ target_link_libraries(${COMPONENT} debug "pjsua-lib-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Debug")
+ target_link_libraries(${COMPONENT} optimized "pjsua-lib-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Release")
add_dependencies(${COMPONENT} pjsip_core pjsip_simple pjsip_ua pjsua_lib)
elseif(${PJPROJECT_COMPONENT} STREQUAL "pjlib-util")
add_dependencies(${COMPONENT} pjlib_util)
- if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86")
- target_link_libraries(${COMPONENT} debug "pjlib-util-i386-Win32-${MSVC_VERSION}-Debug")
- target_link_libraries(${COMPONENT} optimized "pjlib-util-i386-Win32-${MSVC_VERSION}-Release")
- endif()
+ target_link_libraries(${COMPONENT} debug "pjlib-util-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Debug")
+ target_link_libraries(${COMPONENT} optimized "pjlib-util-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Release")
elseif(${PJPROJECT_COMPONENT} STREQUAL "pjmedia")
- if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86")
- target_link_libraries(${COMPONENT} debug "pjmedia-i386-Win32-${MSVC_VERSION}-Debug")
- target_link_libraries(${COMPONENT} optimized "pjmedia-i386-Win32-${MSVC_VERSION}-Release")
- target_link_libraries(${COMPONENT} debug "pjmedia-audiodev-i386-Win32-${MSVC_VERSION}-Debug")
- target_link_libraries(${COMPONENT} optimized "pjmedia-audiodev-i386-Win32-${MSVC_VERSION}-Release")
- target_link_libraries(${COMPONENT} debug "libsrtp-i386-Win32-${MSVC_VERSION}-Debug")
- target_link_libraries(${COMPONENT} optimized "libsrtp-i386-Win32-${MSVC_VERSION}-Release")
- endif()
+ target_link_libraries(${COMPONENT} debug "pjmedia-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Debug")
+ target_link_libraries(${COMPONENT} optimized "pjmedia-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Release")
+ target_link_libraries(${COMPONENT} debug "pjmedia-audiodev-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Debug")
+ target_link_libraries(${COMPONENT} optimized "pjmedia-audiodev-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Release")
+ target_link_libraries(${COMPONENT} debug "libsrtp-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Debug")
+ target_link_libraries(${COMPONENT} optimized "libsrtp-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Release")
add_dependencies(${COMPONENT} pjmedia)
else()
- if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86")
+ if(${CMAKE_CL_64})
+ if(${PJPROJECT_COMPONENT} STREQUAL "pjlib")
+ # pjlib has the additional requirement of winsock2
+ target_link_libraries(${COMPONENT} "ws2_32")
+ endif()
+ target_link_libraries(${COMPONENT} debug "${PJPROJECT_COMPONENT}-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Debug")
+ target_link_libraries(${COMPONENT} optimized "${PJPROJECT_COMPONENT}-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Release")
+ add_dependencies(${COMPONENT} ${PJPROJECT_COMPONENT})
+ elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86")
if(${PJPROJECT_COMPONENT} STREQUAL "pjlib")
# pjlib has the additional requirement of winsock2
target_link_libraries(${COMPONENT} "ws2_32")
endif()
- target_link_libraries(${COMPONENT} debug "${PJPROJECT_COMPONENT}-i386-Win32-${MSVC_VERSION}-Debug")
- target_link_libraries(${COMPONENT} optimized "${PJPROJECT_COMPONENT}-i386-Win32-${MSVC_VERSION}-Release")
+ target_link_libraries(${COMPONENT} debug "${PJPROJECT_COMPONENT}-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Debug")
+ target_link_libraries(${COMPONENT} optimized "${PJPROJECT_COMPONENT}-${X_CPU}-${X_TARG}-${MSVC_VERSION}-Release")
add_dependencies(${COMPONENT} ${PJPROJECT_COMPONENT})
endif()
endif()
commit 373e081ef8278f0489cd59014ffab0010a1bc5c9
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Fri Apr 1 15:19:49 2011 -0500
FindBoost.cmake doesn't cause the script to fail if a library component isn't
found, even if REQUIRED is specified. In order to abort the script when this
happens, the script will now issue a FATAL_ERROR message if a required Boost
library could not be found.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 3c20b08..2eff59c 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -290,6 +290,9 @@ function(find_Boost_library LIBRARY)
if(NOT Boost_${libtag}_FOUND)
find_package(Boost REQUIRED ${LIBRARY})
endif()
+ if(NOT Boost_${libtag}_FOUND)
+ message(FATAL_ERROR "Boost library ${LIBRARY} not found")
+ endif()
endfunction()
# Function which adds Boost libraries to all components in the current
commit d5f4736580b310e3cd5a0b399498be8b8dcd3ace
Merge: 4af2764 63294fa
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Tue Mar 22 14:58:01 2011 -0500
Merge branch 'icebox-package'
commit 63294faf382dbb3be3cdd68e6debfedeacf9b760
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Tue Mar 22 14:01:07 2011 -0500
Add a package for locating IceBox, and ensure it gets found when needed
by tests for components.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 576b6bd..34be413 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -186,6 +186,7 @@ function(asterisk_scf_project NAME ICE_VERSION)
endif()
message(STATUS "Performing requirement checks for components")
+ # set(Ice_DEBUG on)
find_package(Ice 3.4 REQUIRED Ice IceUtil)
# All components need the Ice library, and it needs the
@@ -694,11 +695,13 @@ endfunction()
# 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)
+ add_test(NAME "${EXE}" COMMAND "${EXE}"
+ "--report_sink=${CMAKE_BINARY_DIR}/${EXE}-result.xml"
+ "--report_format=XML"
+ "--report_level=detailed")
endfunction()
function(icebox_add_test NAME CONFIG)
- add_test(NAME ${NAME} COMMAND ${ICEBOX} --Ice.Config=${CONFIG})
+ find_package(IceBox REQUIRED)
+ add_test(NAME "${NAME}" COMMAND "${ICEBOX_EXECUTABLE}" "--Ice.Config=${CONFIG}")
endfunction()
diff --git a/modules/FindIceBox.cmake b/modules/FindIceBox.cmake
new file mode 100644
index 0000000..c014258
--- /dev/null
+++ b/modules/FindIceBox.cmake
@@ -0,0 +1,96 @@
+#
+# FindIceBox.cmake - a CMake module for using ZeroC IceBox
+#
+# Copyright (C) 2010-2011, Digium, Inc.
+#
+# This program is free software, distributed under the terms of
+# the GNU General Public License Version 2.
+#
+# Usage:
+#
+# This module supports the standard find_package() syntax, including
+# REQUIRED and QUIET. It requires that Ice has been previously found
+# and will fail otherwise. It uses the ICE_DIR set by FindIce.cmake
+# to locate IceBox.
+#
+# Syntax:
+#
+# find_package(IceBox [...])
+#
+# Variables used by this module:
+#
+# Ice_DEBUG If this is set to any value, the module will emit
+# debugging messages as each step of its operations
+# are performed.
+#
+# CMAKE_DEBUG_POSTFIX If this is set to any value, it will be used as a
+# a suffix when searching for a 'debug' version
+# of IceBox.
+#
+# Variables set by this module:
+#
+# ICEBOX_FOUND Will be set if a compatible version of Ice was found
+#
+# ICEBOX_EXECUTABLE The path to the located IceBox program
+
+find_package(PackageHandleStandardArgs)
+find_package(Ice REQUIRED)
+
+function(_ice_set_cache_path var value reason)
+ set("${var}" "${value}" CACHE PATH "${reason}" FORCE)
+ mark_as_advanced(FORCE "${var}")
+endfunction()
+
+function(_ice_set_cache_filepath var value reason)
+ set("${var}" "${value}" CACHE FILEPATH "${reason}" FORCE)
+ mark_as_advanced(FORCE "${var}")
+endfunction()
+
+function(_ice_set_cache_string var value reason)
+ set("${var}" "${value}" CACHE STRING "${reason}" FORCE)
+ mark_as_advanced(FORCE "${var}")
+endfunction()
+
+function(_ice_find_program program)
+ string(TOUPPER "${program}" upper)
+
+ set(_ice_debug_suffix "${CMAKE_DEBUG_POSTFIX}")
+
+ if(WIN32)
+ set(_ice_progdir "bin")
+ if(CMAKE_CL_64)
+ set(_ice_progdir "${_ice_progdir}/x64")
+ endif()
+ # first search the more specified progdir, as used by the .msi installer
+ # if it's not there, try just lib. that's where make install puts it
+ list(APPEND _ice_progdirs "${_ice_progdir}" "bin")
+ elseif(UNIX)
+ list(APPEND _ice_progdirs "bin")
+ endif()
+
+ find_program(ICE_${upper}_PROGRAM_RELEASE NAMES "${program}" NO_DEFAULT_PATH HINTS "${ICE_DIR}" PATH_SUFFIXES ${_ice_progdirs})
+ find_program(ICE_${upper}_PROGRAM_DEBUG NAMES "${program}${_ice_debug_suffix}" NO_DEFAULT_PATH HINTS "${ICE_DIR}" PATH_SUFFIXES ${_ice_progdirs})
+
+ mark_as_advanced(ICE_${upper}_PROGRAM_RELEASE ICE_${upper}_PROGRAM_DEBUG)
+
+ if(ICE_${upper}_PROGRAM_DEBUG OR ICE_${upper}_PROGRAM_RELEASE)
+ _ice_set_cache_string(ICE_${upper}_FOUND ON "The Ice ${program} program was found")
+ endif()
+
+ if(Ice_DEBUG)
+ message(STATUS
+ "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ "${program} program (release) found at ${ICE_${upper}_PROGRAM_RELEASE} "
+ "${program} program (debug) found at ${ICE_${upper}_PROGRAM_DEBUG} ")
+ endif()
+endfunction()
+
+_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()
+
+find_package_handle_standard_args(IceBox DEFAULT_MSG ICEBOX_EXECUTABLE)
commit 4af2764093ea2a710426efdcd96b0b752e7bf1f7
Author: Ken Hunt <ken.hunt at digium.com>
Date: Tue Mar 22 13:52:31 2011 -0500
Added variable 'binsubdir' for binary subdirectory which is only set on Windows. All cmake script
that references a binary directory (such as the <config>.in files) should use this variable
to account for the /Debug, /Release, etc. subfolder where Windows binaries are output.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 576b6bd..0781a41 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -126,6 +126,12 @@ if(WIN32 AND ${CMAKE_BUILD_TYPE} STREQUAL profile)
message(FATAL_ERROR "Profile builds not supported")
endif()
+# The <config>.in files and any other script that reference binary
+# directories need to account for the /Debug and /Release subdirectories for Windows.
+if(WIN32)
+ set(binsubdir "/${CMAKE_BUILD_TYPE}" CACHE INTERNAL "Subfolder for binary output. Only set on Windows.")
+endif()
+
if(${CMAKE_BUILD_TYPE} STREQUAL profile)
message(STATUS "Disabling shared libs.")
set(BUILD_SHARED_LIBS false
commit a220f984fea748c185c00c4a13abe5043651f83c
Author: Ken Hunt <ken.hunt at digium.com>
Date: Wed Mar 9 13:38:29 2011 -0600
Added back a dependency on slice2cpp for slice generated code. This was inadvertantly removed.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 0b4e3b9..576b6bd 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -585,7 +585,7 @@ function(asterisk_scf_component_add_one_slice COMPONENT SLICE)
COMMAND ${SLICE_COMPILER} ${slice_compiler_arguments} ${SLICE}
--output-dir ${slice_out_dir}
COMMENT "slice2cpp translating ${SLICE}"
- DEPENDS ${sources})
+ DEPENDS ${sources} ${SLICE_COMPILER})
# the Slice and generated_files are sources for the component
list(APPEND ${COMPONENT}_SOURCES ${SLICE} ${generated_files})
commit 08021a0ed0d4eeb3a2daed9e243f70721424dbe8
Author: Ken Hunt <ken.hunt at digium.com>
Date: Wed Mar 9 12:40:06 2011 -0600
Made VS10 the default build target for Windows.
diff --git a/init-cmake.sh b/init-cmake.sh
index 5ccc698..bf71a55 100755
--- a/init-cmake.sh
+++ b/init-cmake.sh
@@ -58,8 +58,8 @@ case $(uname -s)-$(uname -m) in
esac
case $platform in
- win*) # for windows, default to VS9
- cmake_output="Visual Studio 9 2008"
+ win*) # for windows, default to VS10
+ cmake_output="Visual Studio 10"
;;
esac
commit d4d49f5c2496c13ea85561bc6ec4254554c338aa
Author: Ken Hunt <ken.hunt at digium.com>
Date: Wed Mar 9 12:38:28 2011 -0600
Changed slice dependency creation to support spaces and paths, and Drive Letter: paths for Windows.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 40a0d3b..0b4e3b9 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -546,12 +546,21 @@ function(asterisk_scf_component_add_one_slice COMPONENT SLICE)
list(APPEND targets ${dep_targets})
# parse sources
- string(REGEX MATCHALL "[^:]+$" dep_sources "${dep}")
+ string(REGEX MATCHALL "^[^:]+" targstart "${dep}")
+ string(REGEX REPLACE "^${targstart}:" "" dep_sources "${dep}")
+ # replace the escaped spaces, leave the space separater.
+ string(REPLACE "\\ " "%20%" dep_sources "${dep_sources}")
string(REGEX MATCHALL "[^ ]+" dep_sources "${dep_sources}")
- list(APPEND sources ${dep_sources})
+ list(APPEND expsources ${dep_sources})
endforeach()
endif()
+ foreach(source ${expsources})
+ # put the spaces back in.
+ string(REPLACE "%20%" " " source ${source})
+ list(APPEND sources ${source})
+ endforeach()
+
# prepend the slice_out_dir to the targets
foreach(target ${targets})
list(APPEND generated_files "${slice_out_dir}/${target}")
@@ -576,7 +585,7 @@ function(asterisk_scf_component_add_one_slice COMPONENT SLICE)
COMMAND ${SLICE_COMPILER} ${slice_compiler_arguments} ${SLICE}
--output-dir ${slice_out_dir}
COMMENT "slice2cpp translating ${SLICE}"
- DEPENDS ${sources} ${SLICE_COMPILER})
+ DEPENDS ${sources})
# the Slice and generated_files are sources for the component
list(APPEND ${COMPONENT}_SOURCES ${SLICE} ${generated_files})
commit 2e337eb160277d12ca39fb90b7964d6c1f88d2b7
Merge: 3481fad 639375c
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Tue Feb 8 01:42:35 2011 +0100
Merge branch 'master' of git.asterisk.org:asterisk-scf/release/cmake
commit 3481fad304fb7b1beaeb2bc641e822018c7b8332
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Mon Feb 7 19:35:42 2011 +0100
Ensure that all Slice translations include
support for streaming, checksums and underscores
in identifiers.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 08a29a6..9223bea 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -480,6 +480,12 @@ function(asterisk_scf_component_add_one_slice COMPONENT SLICE)
list(APPEND slice_compiler_arguments "-I${include}")
endforeach()
+ # Set some common Slice translator options:
+ # - generate support for the Ice streaming interface
+ # - generate checksums for definitions
+ # - allow underscores to be used in identifiers
+ list(APPEND slice_compiler_arguments "--stream" "--checksum" "--underscore")
+
# If any Slice plugins are to be used, include them in the
# compiler arguments
if(SLICE_PLUGINS)
commit 639375c8195ee691db95dfa038de828b0a8bc08d
Author: David M. Lee <dlee at digium.com>
Date: Mon Feb 7 11:43:16 2011 -0600
Partial fix for Solaris build.
Solaris requires the -pthreads option for compilation. This doesn't fix
all of the problems, but at least it's better.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 08a29a6..d6f0e55 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -243,6 +243,10 @@ function(asterisk_scf_project NAME ICE_VERSION)
list(APPEND cxx_flags_profile "-ftest-coverage" "-fprofile-arcs")
endif()
+ if(CMAKE_SYSTEM MATCHES "SunOS.*")
+ list(APPEND cxx_flags "-pthreads")
+ endif()
+
append_to_var(CMAKE_C_FLAGS ${c_flags})
append_to_var(CMAKE_C_FLAGS_DEBUG ${c_flags_debug})
append_to_var(CMAKE_C_FLAGS_PROFILE ${c_flags_profile} ${c_flags_debug})
commit 594a2ff1a1acac8329b3f4c528ea6a2595db4696
Author: David M. Lee <dlee at digium.com>
Date: Tue Jan 25 23:15:26 2011 -0600
Install .lib files on Windows.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 0f12400..08a29a6 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -635,10 +635,12 @@ endfunction()
function(asterisk_scf_component_install COMPONENT)
if(${COMPONENT}_TYPE STREQUAL "icebox")
install(TARGETS ${COMPONENT}
+ ARCHIVE DESTINATION ${ASTERISK_SCF_INSTALL_LIB_DIR}
LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_ICEBOX_DIR}
RUNTIME DESTINATION ${ASTERISK_SCF_INSTALL_ICEBOX_DIR})
else()
install(TARGETS ${COMPONENT}
+ ARCHIVE DESTINATION ${ASTERISK_SCF_INSTALL_LIB_DIR}
LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_LIB_DIR}
RUNTIME DESTINATION ${ASTERISK_SCF_INSTALL_BIN_DIR})
endif()
commit 08e1c49e418082e11de9f47d1f13dc6161ce4b5f
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Thu Jan 20 15:35:08 2011 -0600
Ensure that Slice files will be re-translated if the Slice compiler
changes.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 02ec5ac..0f12400 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -566,7 +566,7 @@ function(asterisk_scf_component_add_one_slice COMPONENT SLICE)
COMMAND ${SLICE_COMPILER} ${slice_compiler_arguments} ${SLICE}
--output-dir ${slice_out_dir}
COMMENT "slice2cpp translating ${SLICE}"
- DEPENDS ${sources})
+ DEPENDS ${sources} ${SLICE_COMPILER})
# the Slice and generated_files are sources for the component
list(APPEND ${COMPONENT}_SOURCES ${SLICE} ${generated_files})
commit 528c1225b6cf70d78a53d1e0080ee57d8d0d23a4
Author: David M. Lee <dlee at digium.com>
Date: Thu Jan 20 12:33:26 2011 -0600
Refactored out several install functions for installation.
* asterisk_scf_component_install - Install a component
* asterisk_scf_headers_install - Install .h files
* asterisk_scf_slice_headers_install - Install generated .h files
* asterisk_scf_slice_install - Install .ice files
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 8bb0792..02ec5ac 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -593,6 +593,7 @@ endfunction()
# Function which builds a component as an IceBox service
function(asterisk_scf_component_build_icebox COMPONENT)
message(STATUS "Building component ${COMPONENT} as an IceBox service")
+ set(${COMPONENT}_TYPE icebox PARENT_SCOPE)
find_package(Ice REQUIRED IceBox)
list(APPEND icelibs ${${COMPONENT}_ICE_LIBRARIES} ICEBOX)
asterisk_scf_component_libraries(${COMPONENT})
@@ -606,6 +607,7 @@ endfunction()
# Function which builds a component standalone
function(asterisk_scf_component_build_standalone COMPONENT)
message(STATUS "Building component ${COMPONENT} as a standalone executable")
+ set(${COMPONENT}_TYPE standalone PARENT_SCOPE)
asterisk_scf_component_libraries(${COMPONENT})
# Now we actually create the component
@@ -620,6 +622,7 @@ endfunction()
function(asterisk_scf_component_build_library COMPONENT)
message(STATUS "Building component ${COMPONENT} as a ${${COMPONENT}_LIBTYPE} library")
+ set(${COMPONENT}_TYPE library PARENT_SCOPE)
asterisk_scf_component_libraries(${COMPONENT})
# Now we actually create the component
@@ -628,15 +631,38 @@ function(asterisk_scf_component_build_library COMPONENT)
target_link_libraries(${COMPONENT} ${component_libs})
endfunction()
-# Function which adds information for installing a component
-function(asterisk_scf_component_install COMPONENTNAME TYPE DIR DESC GROUP)
- install(TARGETS ${COMPONENTNAME} ${TYPE} DESTINATION ${DIR} COMPONENT ${COMPONENTNAME} ${ARGN})
-
- if(ASTERISKSCF_CPACK)
- asterisk_scf_component_package(${COMPONENTNAME} ${DESC} ${GROUP})
+# Install the given component to their proper location
+function(asterisk_scf_component_install COMPONENT)
+ if(${COMPONENT}_TYPE STREQUAL "icebox")
+ install(TARGETS ${COMPONENT}
+ LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_ICEBOX_DIR}
+ RUNTIME DESTINATION ${ASTERISK_SCF_INSTALL_ICEBOX_DIR})
+ else()
+ install(TARGETS ${COMPONENT}
+ LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_LIB_DIR}
+ RUNTIME DESTINATION ${ASTERISK_SCF_INSTALL_BIN_DIR})
endif()
endfunction()
+# Install generated Slice header files to their proper location
+function(asterisk_scf_slice_headers_install)
+ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/generated/
+ DESTINATION ${ASTERISK_SCF_INSTALL_INCLUDE_DIR}
+ FILES_MATCHING PATTERN "*.h")
+endfunction()
+
+# Install Slice files to their proper location
+function(asterisk_scf_slice_install DIR)
+ install(DIRECTORY ${DIR}
+ DESTINATION ${ASTERISK_SCF_INSTALL_SLICE_DIR}
+ FILES_MATCHING PATTERN "*.ice")
+endfunction()
+
+# Install header files to their proper location
+function(asterisk_scf_headers_install DIR)
+ install(DIRECTORY ${DIR} DESTINATION ${ASTERISK_SCF_INSTALL_INCLUDE_DIR})
+endfunction()
+
# Adds a component to the packager. COMPONENTNAME must have been previously defined
# via the install command.
function(asterisk_scf_component_package COMPONENTNAME DESC GROUPNAME)
commit 39a22b6e9aa90751277527ef5ca684671d1e764c
Author: David M. Lee <dlee at digium.com>
Date: Thu Jan 20 09:38:00 2011 -0600
Properly specify the CMake project.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index acf6ad3..8bb0792 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -169,7 +169,6 @@ 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}")
- project("${NAME}" CXX)
# 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 ef6b7876cdaba286e76adc99a1088375b58f7686
Author: David M. Lee <dlee at digium.com>
Date: Thu Jan 20 08:47:02 2011 -0600
Ensure that system and generated includes are marked SYSTEM
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 48bf5e9..acf6ad3 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -298,7 +298,7 @@ function(asterisk_scf_add_boost_libraries)
endforeach()
list(REMOVE_DUPLICATES libs)
set(ASTERISK_SCF_BOOST_LIBRARIES ${libs} PARENT_SCOPE)
- include_directories(${Boost_INCLUDE_DIR})
+ include_directories(SYSTEM ${Boost_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIRS})
endfunction()
@@ -317,7 +317,7 @@ function(asterisk_scf_component_add_boost_libraries COMPONENT)
endforeach()
list(REMOVE_DUPLICATES libs)
set(${COMPONENT}_BOOST_LIBRARIES ${libs} PARENT_SCOPE)
- include_directories(${Boost_INCLUDE_DIR})
+ include_directories(SYSTEM ${Boost_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIRS})
endfunction()
@@ -501,10 +501,11 @@ function(asterisk_scf_component_add_one_slice COMPONENT SLICE)
endif()
get_filename_component(slice_basename "${SLICE}" NAME_WE)
# headers are generated, so add them to the include path
- include_directories("${CMAKE_CURRENT_BINARY_DIR}/generated")
+ # since we can't control them, treat them as system includes
+ include_directories(SYSTEM "${CMAKE_CURRENT_BINARY_DIR}/generated")
# generated .cpp files #include <.h> directly, which requires the out_dir
# itself to be in the include path
- include_directories("${slice_out_dir}")
+ include_directories(SYSTEM "${slice_out_dir}")
# fully specify SLICE's path
set(SLICE "${CMAKE_CURRENT_SOURCE_DIR}/${SLICE}")
commit 84fdbeadea2fa938a77241c65ab4b3b799136b1e
Author: David M. Lee <dlee at digium.com>
Date: Mon Jan 17 14:11:26 2011 -0600
INSTALL variables are PATH, not FILEPATH.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index c3e16e8..48bf5e9 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -60,45 +60,45 @@ endif()
message(STATUS "Installation prefix set to ${CMAKE_INSTALL_PREFIX}")
# installation directories (these are all relative to ${CMAKE_INSTALL_PREFIX})
-set(INSTALL_SYS_CONF_DIR etc CACHE FILEPATH
+set(INSTALL_SYS_CONF_DIR etc CACHE PATH
"read-only data files that pertain to a single machine")
-set(INSTALL_BIN_DIR bin CACHE FILEPATH
+set(INSTALL_BIN_DIR bin CACHE PATH
"executable programs that users can run")
-set(INSTALL_LIB_DIR lib CACHE FILEPATH
+set(INSTALL_LIB_DIR lib CACHE PATH
"object files and libraries of object code")
-set(INSTALL_DATA_ROOT_DIR share CACHE FILEPATH
+set(INSTALL_DATA_ROOT_DIR share CACHE PATH
"read-only architecture-independent data files")
-set(INSTALL_DATA_DIR ${INSTALL_DATA_ROOT_DIR} CACHE FILEPATH
+set(INSTALL_DATA_DIR ${INSTALL_DATA_ROOT_DIR} CACHE PATH
"idiosyncratic read-only architecture-independent data files for this program")
-set(INSTALL_INCLUDE_DIR include CACHE FILEPATH
+set(INSTALL_INCLUDE_DIR include CACHE PATH
"directory for installing header files")
-set(INSTALL_LOCAL_STATE_DIR var CACHE FILEPATH
+set(INSTALL_LOCAL_STATE_DIR var CACHE PATH
"data files which the programs modify while they run, and that pertain to one specific machine")
set(ASTERISK_SCF_INSTALL_CONF_DIR
- ${INSTALL_SYS_CONF_DIR}/asterisk-scf CACHE FILEPATH
+ ${INSTALL_SYS_CONF_DIR}/asterisk-scf CACHE PATH
"Asterisk SCF files")
set(ASTERISK_SCF_INSTALL_BIN_DIR
- ${INSTALL_BIN_DIR} CACHE FILEPATH
+ ${INSTALL_BIN_DIR} CACHE PATH
"Asterisk SCF executable programs")
set(ASTERISK_SCF_INSTALL_LIB_DIR
- ${INSTALL_LIB_DIR} CACHE FILEPATH
+ ${INSTALL_LIB_DIR} CACHE PATH
"Asterisk SCF libraries")
set(ASTERISK_SCF_INSTALL_ICEBOX_DIR
${INSTALL_LIB_DIR}/asterisk-scf/icebox
- CACHE FILEPATH
+ CACHE PATH
"Asterisk SCF IceBox modules")
set(ASTERISK_SCF_INSTALL_LOCAL_STATE_DIR
- ${INSTALL_LOCAL_STATE_DIR}/lib/asterisk-scf CACHE FILEPATH
+ ${INSTALL_LOCAL_STATE_DIR}/lib/asterisk-scf CACHE PATH
"Asterisk SCF local state files")
set(ASTERISK_SCF_INSTALL_LOG_FILE
- ${INSTALL_LOCAL_STATE_DIR}/log/asterisk-scf.log CACHE FILEPATH
+ ${INSTALL_LOCAL_STATE_DIR}/log/asterisk-scf.log CACHE PATH
"Asterisk SCF logfile")
set(ASTERISK_SCF_INSTALL_INCLUDE_DIR
- ${INSTALL_INCLUDE_DIR} CACHE FILEPATH
+ ${INSTALL_INCLUDE_DIR} CACHE PATH
"Directory for installed Asterisk SCF API C++ header files")
set(ASTERISK_SCF_INSTALL_SLICE_DIR
- ${INSTALL_DATA_DIR}/asterisk-scf/slice CACHE FILEPATH
+ ${INSTALL_DATA_DIR}/asterisk-scf/slice CACHE PATH
"Directory for installed Asterisk SCF API Slice files")
mark_as_advanced(
commit b13c01c4f586c2b82c368c9d085adcb44715bc51
Author: David M. Lee <dlee at digium.com>
Date: Fri Jan 14 13:01:54 2011 -0600
Fixed some library linkage nitpicks.
* Build icebox modules as modules instead of shared libraries. Ice has
been patched to address the original issue that caused us to switch to
shared libs in the first place.
* Add capability to specify the library type (SHARED or STATIC) for an
individual library.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index f980a89..c3e16e8 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -597,11 +597,8 @@ function(asterisk_scf_component_build_icebox COMPONENT)
list(APPEND icelibs ${${COMPONENT}_ICE_LIBRARIES} ICEBOX)
asterisk_scf_component_libraries(${COMPONENT})
- # Now we actually create the library
- # while one would think that MODULE would be the right setting, it
- # has to be shared due to how icebox finds these libraries on a Mac
- # (it loads .dylib instead of loading .so)
- add_library(${COMPONENT} SHARED ${${COMPONENT}_SOURCES})
+ # Now we actually create the shared module
+ add_library(${COMPONENT} MODULE ${${COMPONENT}_SOURCES})
# Link required libraries
target_link_libraries(${COMPONENT} ${component_libs})
endfunction()
@@ -617,12 +614,16 @@ function(asterisk_scf_component_build_standalone COMPONENT)
target_link_libraries(${COMPONENT} ${component_libs})
endfunction()
+function(asterisk_scf_set_libtype COMPONENT TYPE)
+ set("${COMPONENT}_LIBTYPE" ${TYPE} PARENT_SCOPE)
+endfunction()
+
function(asterisk_scf_component_build_library COMPONENT)
- message(STATUS "Building component ${COMPONENT} as a library")
+ message(STATUS "Building component ${COMPONENT} as a ${${COMPONENT}_LIBTYPE} library")
asterisk_scf_component_libraries(${COMPONENT})
# Now we actually create the component
- add_library(${COMPONENT} ${${COMPONENT}_SOURCES})
+ add_library(${COMPONENT} ${${COMPONENT}_LIBTYPE} ${${COMPONENT}_SOURCES})
# Link required libraries
target_link_libraries(${COMPONENT} ${component_libs})
endfunction()
commit a7e7b7d2e766af7d7a437441cfabfa9fe8b394d1
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Thu Jan 20 07:21:00 2011 -0600
Don't set compiler/linker flags variables in the cache; they should be
set in the current directory scope to preserve any values that the platform
code (included with CMake) stored in them.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index e85b9a5..f980a89 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -150,6 +150,14 @@ macro(set_cache_var)
set(${ARGV} CACHE INTERNAL Bob FORCE)
endmacro()
+macro(append_to_var VAR)
+ unset(_altv)
+ foreach(item ${ARGN})
+ set(_altv "${_altv} ${item}")
+ endforeach()
+ set(${VAR} "${${VAR}} ${_altv}" PARENT_SCOPE)
+endmacro()
+
macro(set_cache_var_list VAR LIST TYPE DESCRIPTION)
unset(_scvl)
foreach(item IN LISTS ${LIST})
@@ -236,31 +244,17 @@ function(asterisk_scf_project NAME ICE_VERSION)
list(APPEND cxx_flags_profile "-ftest-coverage" "-fprofile-arcs")
endif()
- 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)
+ append_to_var(CMAKE_C_FLAGS ${c_flags})
+ append_to_var(CMAKE_C_FLAGS_DEBUG ${c_flags_debug})
+ append_to_var(CMAKE_C_FLAGS_PROFILE ${c_flags_profile} ${c_flags_debug})
+
+ append_to_var(CMAKE_CXX_FLAGS ${cxx_flags})
+ append_to_var(CMAKE_CXX_FLAGS_DEBUG ${cxx_flags_debug})
+ append_to_var(CMAKE_CXX_FLAGS_PROFILE ${cxx_flags_profile} ${cxx_flags_debug})
+
+ append_to_var(CMAKE_EXE_LINKER_FLAGS ${linker_flags})
+ append_to_var(CMAKE_MODULE_LINKER_FLAGS ${linker_flags})
+ append_to_var(CMAKE_SHARED_LINKER_FLAGS ${linker_flags})
message(STATUS "Passed requirement checks for CXX components")
endfunction()
commit 66640ddef1ebc5209a2f4cf4660b30ec9c21b77a
Merge: 604a139 02faccc
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Wed Jan 19 16:59:26 2011 -0600
Merge branch 'master' into slice-plugins
Conflicts:
AsteriskSCF.cmake
diff --cc AsteriskSCF.cmake
index 3abbeb5,1fd2add..e85b9a5
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@@ -436,12 -349,6 +349,20 @@@ function(asterisk_scf_slice_include_dir
set(SLICE_INCLUDE_DIRECTORIES ${paths} PARENT_SCOPE)
endfunction()
- # Function which remembers definitions needed by a Slice target
- function(asterisk_scf_slice_compile_definitions SLICE_FILE)
- get_filename_component(SLICE ${SLICE_FILE} NAME_WE)
- set(SLICE_COMPILE_DEFINITIONS_${SLICE} ${ARGN} PARENT_SCOPE)
++# Function which remembers Slice plugins to be used for all targets in the
++# current directory and below
++function(asterisk_scf_slice_plugins)
++ if(NOT ARGN)
++ message(FATAL_ERROR "You must pass at least one plugin to this function")
++ endif()
++ set(plugins ${SLICE_PLUGINS})
++ foreach(plugin ${ARGN})
++ list(APPEND plugins ${plugin})
++ endforeach()
++ list(REMOVE_DUPLICATES plugins)
++ set(SLICE_PLUGINS ${plugins} PARENT_SCOPE)
+endfunction()
+
# Function which remembers Ice libraries needed by a Slice target
function(asterisk_scf_slice_add_ice_libraries TARGET)
if(NOT ARGN)
@@@ -856,135 -406,209 +420,217 @@@ function(asterisk_scf_component_add_ice
list(APPEND libs ${lib})
endforeach()
list(REMOVE_DUPLICATES libs)
- set(${COMPONENT}_BOOST_LIBRARIES ${libs} PARENT_SCOPE)
- include_directories(${Boost_INCLUDE_DIR})
- link_directories(${Boost_LIBRARY_DIRS})
+ set(${COMPONENT}_ICE_LIBRARIES ${libs} PARENT_SCOPE)
endfunction()
- # Function which builds a component as an IceBox service
- function(asterisk_scf_component_build_icebox COMPONENT)
- set(lang ${ASTERISK_SCF_${COMPONENT}_LANG})
- message(STATUS "Building component ${COMPONENT} (${lang}) as IceBox service")
- if(lang STREQUAL "CXX")
- find_ICE_CXX_library(IceBox)
- elseif(lang STREQUAL "CSharp")
- find_ICE_CSharp_library(IceBox)
- elseif(lang STREQUAL "Java")
- find_ICE_Java_library(IceBox)
- else()
- message(FATAL_ERROR "IceBox services are not supported in the ${lang} language")
- endif()
- list(APPEND icelibs IceBox ${ASTERISK_SCF_ICE_LIBRARIES_${lang}} ${${COMPONENT}_ICE_LIBRARIES})
- list(REMOVE_DUPLICATES icelibs)
- foreach(lib ${icelibs})
- if(UNIX)
- list(APPEND target_libs "${lib}")
+ # Adds Slice files to a target. This handles all the magic of creating the
+ # rules to run slice2cpp, adding the generated headers to the include path,
+ # adding the generated .cpp file to the component, etc. The generated files
+ # are placed in ${CMAKE_CURRENT_BINARY_DIR}/generated.
+ #
+ # The Slice files are passed in as a list of globs, relative to
+ # the current source directory. The globs default to regular non-recursive
+ # globs. If you want to include subdirectories in you glob search, also
+ # pass in GLOB_RECURSE.
+ #
+ # For example:
+ # asterisk_scf_component_add_slice(comp-name GLOB_RECURSE "*.ice")
+ #
... 26282 lines suppressed ...
--
asterisk-scf/integration/cmake.git
More information about the asterisk-scf-commits
mailing list