[asterisk-scf-commits] asterisk-scf/integration/cmake.git branch "single-build-dir" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Apr 26 09:07:12 CDT 2011


branch "single-build-dir" has been created
        at  20915be35f2cfb3ce65aaf6bc155a6241f9bc6e4 (commit)

- Log -----------------------------------------------------------------
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

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/cmake.git



More information about the asterisk-scf-commits mailing list