Loading thirdparty/atl/atl/CMakeLists.txt +21 −23 Original line number Diff line number Diff line cmake_minimum_required(VERSION 3.0) project(ATL C) set(ATL_VERSION_MAJOR 2) set(ATL_VERSION_MINOR 2) set(ATL_VERSION_PATCH 1) set(ATL_VERSION ${ATL_VERSION_MAJOR}.${ATL_VERSION_MINOR}.${ATL_VERSION_PATCH}) project(ATL VERSION 2.2.1 LANGUAGES C) # Some boilerplate to setup nice output directories set(CMAKE_INSTALL_BINDIR bin CACHE STRING "Installation runtime subdirectory") Loading Loading @@ -95,23 +90,17 @@ mark_as_advanced(ATL_ATOM_SERVER_HOST) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) # Set up include-directories include_directories( "${PROJECT_SOURCE_DIR}" # to find foo/foo.h "${PROJECT_BINARY_DIR}") # to find foo/config.h set(ATL_LIBRARY_PREFIX "" CACHE STRING "Prefix to prepend to the output library name") mark_as_advanced(ATL_LIBRARY_PREFIX) add_library(atl atom.c attr.c lookup3.c tclHash.c) add_library(atl::atl ALIAS atl) set_target_properties(atl PROPERTIES OUTPUT_NAME ${ATL_LIBRARY_PREFIX}atl VERSION ${ATL_VERSION} SOVERSION ${ATL_VERSION_MAJOR} PUBLIC_HEADER atl.h) add_library(atl::atl ALIAS atl) target_include_directories(atl PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}> Loading Loading @@ -174,24 +163,33 @@ if(BUILD_TESTING) endif() # Setup packaging and configs include(CMakePackageConfigHelpers) write_basic_package_version_file( "${PROJECT_BINARY_DIR}/atl-config-version.cmake" COMPATIBILITY SameMajorVersion) configure_file( atl-config.cmake.in "${PROJECT_BINARY_DIR}/atl-config.cmake" @ONLY) # Add all targets to the build-tree export set export(TARGETS atl NAMESPACE atl:: FILE "${PROJECT_BINARY_DIR}/atl-targets.cmake") configure_file(atl-config.cmake.in "${PROJECT_BINARY_DIR}/atl-config.cmake" @ONLY) configure_file(atl-config-version.cmake.in "${PROJECT_BINARY_DIR}/atl-config-version.cmake" @ONLY) # Install the atl-config.cmake and atl-config-version.cmake install(FILES install( FILES "${PROJECT_BINARY_DIR}/atl-config.cmake" "${PROJECT_BINARY_DIR}/atl-config-version.cmake" DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" COMPONENT dev) DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" COMPONENT dev) # Install the export set for use with the install-tree install(EXPORT atl-targets NAMESPACE atl:: DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" COMPONENT dev) install( EXPORT atl-targets NAMESPACE atl:: DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" COMPONENT dev) set(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE ${CMAKE_CURRENT_SOURCE_DIR}/atl.supp) Loading thirdparty/atl/atl/atl-config-version.cmake.indeleted 100644 → 0 +0 −15 Original line number Diff line number Diff line set(PACKAGE_VERSION_MAJOR @ATL_VERSION_MAJOR@) set(PACKAGE_VERSION_MINOR @ATL_VERSION_MINOR@) set(PACKAGE_VERSION_PATCH @ATL_VERSION_PATCH@) set(PACKAGE_VERSION @ATL_VERSION@) # Check whether the requested PACKAGE_FIND_VERSION is compatible if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION OR PACKAGE_VERSION_MAJOR GREATER PACKAGE_FIND_VERSION_MAJOR) set(PACKAGE_VERSION_COMPATIBLE FALSE) else() set(PACKAGE_VERSION_COMPATIBLE TRUE) if(PACKAGE_VERSION VERSION_EQUAL PACKAGE_FIND_VERSION) set(PACKAGE_VERSION_EXACT TRUE) endif() endif() thirdparty/atl/atl/atl-config.cmake.in +1 −13 Original line number Diff line number Diff line # - Config file for the Atl package # # It defines the following variables # ATL_INCLUDE_DIRS - include directories for Atl # ATL_LIBRARIES - libraries to link against # # And the following imported targets: # atl::atl # include("${CMAKE_CURRENT_LIST_DIR}/atl-config-version.cmake") include(FindPackageHandleStandardArgs) set(${CMAKE_FIND_PACKAGE_NAME}_CONFIG "${CMAKE_CURRENT_LIST_FILE}") set(${CMAKE_FIND_PACKAGE_NAME}_CONFIG ${CMAKE_CURRENT_LIST_FILE}) find_package_handle_standard_args(${CMAKE_FIND_PACKAGE_NAME} CONFIG_MODE) if(NOT TARGET atl::atl) Loading thirdparty/atl/atl/atl.h +3 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,9 @@ extern atom_server init_atom_server (atom_cache_type cache_style); extern void free_atom_server(atom_server as); extern char * get_server_id (atom_server as); Loading thirdparty/atl/atl/atom.c +20 −0 Original line number Diff line number Diff line Loading @@ -9,7 +9,9 @@ # include <malloc.h> # endif # include <stdio.h> #ifdef HAVE_UNISTD_H # include <unistd.h> #endif # include <errno.h> # include <sys/types.h> # ifndef HAVE_WINDOWS_H Loading Loading @@ -573,6 +575,24 @@ preload_in_use_atoms(atom_server as) (void) atom_from_string(as, in_use_values[i++]); } } void free_atom_server(atom_server as) { Tcl_HashSearch search; Tcl_HashEntry * entry = Tcl_FirstHashEntry(&as->string_hash_table, &search); while (entry) { send_get_atom_msg_ptr stored; stored = Tcl_GetHashValue(entry); free(stored->atom_string); free(stored); entry = Tcl_NextHashEntry(&search); } Tcl_DeleteHashTable(&as->string_hash_table); Tcl_DeleteHashTable(&as->value_hash_table); free(as); } atom_server init_atom_server(cache_style) atom_cache_type cache_style; Loading Loading
thirdparty/atl/atl/CMakeLists.txt +21 −23 Original line number Diff line number Diff line cmake_minimum_required(VERSION 3.0) project(ATL C) set(ATL_VERSION_MAJOR 2) set(ATL_VERSION_MINOR 2) set(ATL_VERSION_PATCH 1) set(ATL_VERSION ${ATL_VERSION_MAJOR}.${ATL_VERSION_MINOR}.${ATL_VERSION_PATCH}) project(ATL VERSION 2.2.1 LANGUAGES C) # Some boilerplate to setup nice output directories set(CMAKE_INSTALL_BINDIR bin CACHE STRING "Installation runtime subdirectory") Loading Loading @@ -95,23 +90,17 @@ mark_as_advanced(ATL_ATOM_SERVER_HOST) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) # Set up include-directories include_directories( "${PROJECT_SOURCE_DIR}" # to find foo/foo.h "${PROJECT_BINARY_DIR}") # to find foo/config.h set(ATL_LIBRARY_PREFIX "" CACHE STRING "Prefix to prepend to the output library name") mark_as_advanced(ATL_LIBRARY_PREFIX) add_library(atl atom.c attr.c lookup3.c tclHash.c) add_library(atl::atl ALIAS atl) set_target_properties(atl PROPERTIES OUTPUT_NAME ${ATL_LIBRARY_PREFIX}atl VERSION ${ATL_VERSION} SOVERSION ${ATL_VERSION_MAJOR} PUBLIC_HEADER atl.h) add_library(atl::atl ALIAS atl) target_include_directories(atl PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}> Loading Loading @@ -174,24 +163,33 @@ if(BUILD_TESTING) endif() # Setup packaging and configs include(CMakePackageConfigHelpers) write_basic_package_version_file( "${PROJECT_BINARY_DIR}/atl-config-version.cmake" COMPATIBILITY SameMajorVersion) configure_file( atl-config.cmake.in "${PROJECT_BINARY_DIR}/atl-config.cmake" @ONLY) # Add all targets to the build-tree export set export(TARGETS atl NAMESPACE atl:: FILE "${PROJECT_BINARY_DIR}/atl-targets.cmake") configure_file(atl-config.cmake.in "${PROJECT_BINARY_DIR}/atl-config.cmake" @ONLY) configure_file(atl-config-version.cmake.in "${PROJECT_BINARY_DIR}/atl-config-version.cmake" @ONLY) # Install the atl-config.cmake and atl-config-version.cmake install(FILES install( FILES "${PROJECT_BINARY_DIR}/atl-config.cmake" "${PROJECT_BINARY_DIR}/atl-config-version.cmake" DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" COMPONENT dev) DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" COMPONENT dev) # Install the export set for use with the install-tree install(EXPORT atl-targets NAMESPACE atl:: DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" COMPONENT dev) install( EXPORT atl-targets NAMESPACE atl:: DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" COMPONENT dev) set(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE ${CMAKE_CURRENT_SOURCE_DIR}/atl.supp) Loading
thirdparty/atl/atl/atl-config-version.cmake.indeleted 100644 → 0 +0 −15 Original line number Diff line number Diff line set(PACKAGE_VERSION_MAJOR @ATL_VERSION_MAJOR@) set(PACKAGE_VERSION_MINOR @ATL_VERSION_MINOR@) set(PACKAGE_VERSION_PATCH @ATL_VERSION_PATCH@) set(PACKAGE_VERSION @ATL_VERSION@) # Check whether the requested PACKAGE_FIND_VERSION is compatible if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION OR PACKAGE_VERSION_MAJOR GREATER PACKAGE_FIND_VERSION_MAJOR) set(PACKAGE_VERSION_COMPATIBLE FALSE) else() set(PACKAGE_VERSION_COMPATIBLE TRUE) if(PACKAGE_VERSION VERSION_EQUAL PACKAGE_FIND_VERSION) set(PACKAGE_VERSION_EXACT TRUE) endif() endif()
thirdparty/atl/atl/atl-config.cmake.in +1 −13 Original line number Diff line number Diff line # - Config file for the Atl package # # It defines the following variables # ATL_INCLUDE_DIRS - include directories for Atl # ATL_LIBRARIES - libraries to link against # # And the following imported targets: # atl::atl # include("${CMAKE_CURRENT_LIST_DIR}/atl-config-version.cmake") include(FindPackageHandleStandardArgs) set(${CMAKE_FIND_PACKAGE_NAME}_CONFIG "${CMAKE_CURRENT_LIST_FILE}") set(${CMAKE_FIND_PACKAGE_NAME}_CONFIG ${CMAKE_CURRENT_LIST_FILE}) find_package_handle_standard_args(${CMAKE_FIND_PACKAGE_NAME} CONFIG_MODE) if(NOT TARGET atl::atl) Loading
thirdparty/atl/atl/atl.h +3 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,9 @@ extern atom_server init_atom_server (atom_cache_type cache_style); extern void free_atom_server(atom_server as); extern char * get_server_id (atom_server as); Loading
thirdparty/atl/atl/atom.c +20 −0 Original line number Diff line number Diff line Loading @@ -9,7 +9,9 @@ # include <malloc.h> # endif # include <stdio.h> #ifdef HAVE_UNISTD_H # include <unistd.h> #endif # include <errno.h> # include <sys/types.h> # ifndef HAVE_WINDOWS_H Loading Loading @@ -573,6 +575,24 @@ preload_in_use_atoms(atom_server as) (void) atom_from_string(as, in_use_values[i++]); } } void free_atom_server(atom_server as) { Tcl_HashSearch search; Tcl_HashEntry * entry = Tcl_FirstHashEntry(&as->string_hash_table, &search); while (entry) { send_get_atom_msg_ptr stored; stored = Tcl_GetHashValue(entry); free(stored->atom_string); free(stored); entry = Tcl_NextHashEntry(&search); } Tcl_DeleteHashTable(&as->string_hash_table); Tcl_DeleteHashTable(&as->value_hash_table); free(as); } atom_server init_atom_server(cache_style) atom_cache_type cache_style; Loading