[asterisk-scf-commits] asterisk-scf/integration/cmake.git branch "boostctl" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Fri Dec 3 15:05:06 CST 2010
branch "boostctl" has been updated
via b2e65856c63343cc3f7f14338e14eeb41c04d0d5 (commit)
from d2670821ede9f2bb3df11839b81fca9980d972cc (commit)
Summary of changes:
AsteriskSCF.cmake | 26 ++++++++------------------
AsteriskSCF.cmake => AsteriskSCF.cmake~ | 26 ++++++++------------------
2 files changed, 16 insertions(+), 36 deletions(-)
copy AsteriskSCF.cmake => AsteriskSCF.cmake~ (98%)
- Log -----------------------------------------------------------------
commit b2e65856c63343cc3f7f14338e14eeb41c04d0d5
Author: Ken Hunt <ken.hunt at digium.com>
Date: Fri Dec 3 15:05:06 2010 -0600
Simplified setting of boost definitions to common, centralized defaults.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 71e6e01..d607797 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -281,8 +281,6 @@ function(asterisk_scf_project NAME ICE_VERSION)
if(WIN32)
message(STATUS "Setting ASTERISK_SCF_ICEBOX_EXPORT definition for Windows IceBox services")
add_definitions(-DASTERISK_SCF_ICEBOX_EXPORT=__declspec\(dllexport\))
- # Disable auto-linker for boost on windows
- add_definitions(-DBOOST_ALL_NO_LIB)
else()
add_definitions(-DASTERISK_SCF_ICEBOX_EXPORT=)
endif()
@@ -354,15 +352,11 @@ function(asterisk_scf_add_boost_libraries)
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})
- if (lib MATCHES "[-]DBOOST.*")
- # Common params: -DBOOST_ALL_DYN_LINK, -DBOOST_TEST_DYN_LINK
- add_definitions(${lib})
- message(STATUS "Definition added for ${lib}")
- else()
- find_Boost_library(${lib})
- list(APPEND libs ${lib})
- endif()
+ find_Boost_library(${lib})
+ list(APPEND libs ${lib})
endforeach()
list(REMOVE_DUPLICATES libs)
set(ASTERISK_SCF_BOOST_LIBRARIES ${libs} PARENT_SCOPE)
@@ -783,20 +777,16 @@ function(asterisk_scf_component_add_boost_libraries COMPONENT)
message(FATAL_ERROR "You must pass at least one library to this function")
endif()
set(libs ${${COMPONENT}_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})
set(lang ${ASTERISK_SCF_${COMPONENT}_LANG})
if(lang STREQUAL "CXX")
else()
message(FATAL_ERROR "Boost libraries cannot be used with components in the ${lang} language")
endif()
- if (lib MATCHES "[-]DBOOST.*")
- # Common params: -DBOOST_ALL_DYN_LINK, -DBOOST_TEST_DYN_LINK
- add_definitions(${lib})
- message(STATUS "Definition added for ${lib}")
- else()
- find_Boost_library(${lib})
- list(APPEND libs ${lib})
- endif()
+ find_Boost_library(${lib})
+ list(APPEND libs ${lib})
endforeach()
list(REMOVE_DUPLICATES libs)
set(${COMPONENT}_BOOST_LIBRARIES ${libs} PARENT_SCOPE)
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake~
similarity index 98%
copy from AsteriskSCF.cmake
copy to AsteriskSCF.cmake~
index 71e6e01..d607797 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake~
@@ -281,8 +281,6 @@ function(asterisk_scf_project NAME ICE_VERSION)
if(WIN32)
message(STATUS "Setting ASTERISK_SCF_ICEBOX_EXPORT definition for Windows IceBox services")
add_definitions(-DASTERISK_SCF_ICEBOX_EXPORT=__declspec\(dllexport\))
- # Disable auto-linker for boost on windows
- add_definitions(-DBOOST_ALL_NO_LIB)
else()
add_definitions(-DASTERISK_SCF_ICEBOX_EXPORT=)
endif()
@@ -354,15 +352,11 @@ function(asterisk_scf_add_boost_libraries)
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})
- if (lib MATCHES "[-]DBOOST.*")
- # Common params: -DBOOST_ALL_DYN_LINK, -DBOOST_TEST_DYN_LINK
- add_definitions(${lib})
- message(STATUS "Definition added for ${lib}")
- else()
- find_Boost_library(${lib})
- list(APPEND libs ${lib})
- endif()
+ find_Boost_library(${lib})
+ list(APPEND libs ${lib})
endforeach()
list(REMOVE_DUPLICATES libs)
set(ASTERISK_SCF_BOOST_LIBRARIES ${libs} PARENT_SCOPE)
@@ -783,20 +777,16 @@ function(asterisk_scf_component_add_boost_libraries COMPONENT)
message(FATAL_ERROR "You must pass at least one library to this function")
endif()
set(libs ${${COMPONENT}_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})
set(lang ${ASTERISK_SCF_${COMPONENT}_LANG})
if(lang STREQUAL "CXX")
else()
message(FATAL_ERROR "Boost libraries cannot be used with components in the ${lang} language")
endif()
- if (lib MATCHES "[-]DBOOST.*")
- # Common params: -DBOOST_ALL_DYN_LINK, -DBOOST_TEST_DYN_LINK
- add_definitions(${lib})
- message(STATUS "Definition added for ${lib}")
- else()
- find_Boost_library(${lib})
- list(APPEND libs ${lib})
- endif()
+ find_Boost_library(${lib})
+ list(APPEND libs ${lib})
endforeach()
list(REMOVE_DUPLICATES libs)
set(${COMPONENT}_BOOST_LIBRARIES ${libs} PARENT_SCOPE)
-----------------------------------------------------------------------
--
asterisk-scf/integration/cmake.git
More information about the asterisk-scf-commits
mailing list