<commit_before># ****************
# * BLAHP daemon * 
# ****************
#
# $Id: $ 
#
# File:           CMakeLists.txt
#
# Author(s):      <NAME> ($Author: $)
#        e-mail: "<EMAIL>"
#
# Revision history:
#
# 26-Oct-2012  Created 

cmake_minimum_required(VERSION 2.6)

if(CONDOR_PACKAGE_NAME)
    set(BIN_DIR "${C_BIN}")
    set(SBIN_DIR "${C_SBIN}")
    set(LIBEXEC_DIR "${C_LIBEXEC_BLAHP}")

    set(ClassAd_LIBRARY "classads")
else()
    set(BIN_DIR "bin")
    set(SBIN_DIR "sbin")
    set(LIBEXEC_DIR "libexec")

    include(FindClassAd.cmake)
    include_directories(${ClassAd_INCLUDE_DIR})
    set(ClassAd_LIBRARY ${CLASSAD_FOUND})

    include(FindPkgConfig)

    pkg_check_modules(GLOBUS_COMMON globus-common)
    include_directories(${GLOBUS_COMMON_INCLUDE_DIRS})

    pkg_check_modules(GLOBUS_IO globus-io)
    pkg_check_modules(GLOBUS_GSSAPI_GSI globus-gssapi-gsi)
    pkg_check_modules(GLOBUS_GSS_ASSIST globus-gss-assist)
    pkg_check_modules(GLOBUS_GSI_CREDENTIAL globus-gsi-credential)
    pkg_check_modules(GLOBUS_GSI_PROXY_CORE globus-gsi-proxy-core)
endif()

include_directories(.)

add_library(libblahp STATIC
	blah_utils.c
	classad_binary_op_unwind.C
	classad_c_helper.C
	cmdbuffer.c
	commands.c
	config.c
	console.c
	env_helper.c
	job_registry.c
	job_registry_updater.c
	job_status.c
	mapped_exec.c
	md5.c
	proxy_hashcontainer.c 
	resbuffer.c
	server.c
)

# These are not actually libraies, but rather a cmake
# virtual holder of .o files
add_library(libbfunctions OBJECT Bfunctions.c)
add_library(libblfunctions OBJECT BLfunctions.c)

# programs for 'sbin'
add_executable(blahpd_daemon main_daemon.c)
target_link_libraries(blahpd_daemon libblahp)

if(NOT CONDOR_PACKAGE_NAME)
    set_target_properties(blahpd_daemon PROPERTIES COMPILE_FLAGS ${ClassAd_CXX_FLAGS})
endif()
target_link_libraries(blahpd_daemon -lpthread ${ClassAd_LIBRARY})
add_executable(blah_job_registry_add blah_job_registry_add.c)
target_link_libraries(blah_job_registry_add libblahp)

add_executable(blah_job_registry_lkup blah_job_registry_lkup.c)
target_link_libraries(blah_job_registry_lkup libblahp)

add_executable(blah_job_registry_scan_by_subject blah_job_registry_scan_by_subject.c)
target_link_libraries(blah_job_registry_scan_by_subject libblahp)

if(NOT CONDOR_PACKAGE_NAME)
    set_target_properties(blah_job_registry_scan_by_subject PROPERTIES COMPILE_FLAGS ${ClassAd_CXX_FLAGS})
endif()
target_link_libraries(blah_job_registry_scan_by_subject ${ClassAd_LIBRARY})
add_executable(blah_check_config blah_check_config.c)
target_link_libraries(blah_check_config $<TARGET_OBJECTS:libbfunctions> libblahp)

add_executable(blah_job_registry_dump blah_job_registry_dump.c)
target_link_libraries(blah_job_registry_dump libblahp)

add_executable(blah_job_registry_purge blah_job_registry_purge.c)
target_link_libraries(blah_job_registry_purge libblahp)

# programs for 'bin'
add_executable(blahpd main.c)
target_link_libraries(blahpd libblahp)

if(NOT CONDOR_PACKAGE_NAME)
    set_target_properties(blahpd PROPERTIES COMPILE_FLAGS ${ClassAd_CXX_FLAGS})
endif()
target_link_libraries(blahpd -lpthread ${ClassAd_LIBRARY})

# programs for 'libexec'
add_executable(BLClient BLClient.c)
target_link_libraries(BLClient $<TARGET_OBJECTS:libblfunctions> libblahp)

add_executable(BLParserLSF BLParserLSF.c)
target_link_libraries(BLParserLSF -lpthread)
target_link_libraries(BLParserLSF $<TARGET_OBJECTS:libblfunctions> libblahp)

add_executable(BLParserPBS BLParserPBS.c)
target_link_libraries(BLParserPBS -lpthread)
target_link_libraries(BLParserPBS $<TARGET_OBJECTS:libblfunctions> libblahp)

add_executable(BUpdaterCondor BUpdaterCondor.c)
target_link_libraries(BUpdaterCondor -lpthread)
target_link_libraries(BUpdaterCondor $<TARGET_OBJECTS:libbfunctions> libblahp)

add_executable(BNotifier BNotifier.c)
target_link_libraries(BNotifier -lpthread)
target_link_libraries(BNotifier $<TARGET_OBJECTS:libbfunctions> libblahp)

add_executable(BUpdaterLSF BUpdaterLSF.c)
target_link_libraries(BUpdaterLSF -lpthread -lm)
target_link_libraries(BUpdaterLSF $<TARGET_OBJECTS:libbfunctions> libblahp)

add_executable(BUpdaterPBS BUpdaterPBS.c)
target_link_libraries(BUpdaterPBS -lpthread -lm)
target_link_libraries(BUpdaterPBS $<TARGET_OBJECTS:libbfunctions> libblahp)

add_executable(BUpdaterSGE BUpdaterSGE.c)
target_link_libraries(BUpdaterSGE $<TARGET_OBJECTS:libbfunctions> libblahp)

add_executable(blparser_master blparser_master.c)
target_link_libraries(blparser_master libblahp)
target_link_libraries(blparser_master ${ClassAd_LIBRARY})

if(NOT CONDOR_PACKAGE_NAME)
    if (${GLOBUS_COMMON_FOUND} AND ${GLOBUS_IO_FOUND})
    add_executable(BPRclient BPRclient.c BPRcomm.c tokens.c)
    target_link_libraries(BPRclient 
      ${GLOBUS_GSI_PROXY_CORE_LDFLAGS}
      ${GLOBUS_GSI_CREDENTIALS_LDFLAGS}
      ${GLOBUS_GSS_ASSIST_LDFLAGS})
    add_executable(BPRserver BPRserver.c BPRcomm.c tokens.c)
    target_link_libraries(BPRserver
      ${GLOBUS_GSI_PROXY_CORE_LDFLAGS}
      ${GLOBUS_GSI_CREDENTIALS_LDFLAGS}
      ${GLOBUS_GSS_ASSIST_LDFLAGS})
    set_target_properties(BPRserver PROPERTIES COMPILE_FLAGS "-static") 
    endif (${GLOBUS_COMMON_FOUND} AND ${GLOBUS_IO_FOUND})
endif()<commit_msg>Fix blahp build dependencies. HTCONDOR-878<commit_after># ****************
# * BLAHP daemon * 
# ****************
#
# $Id: $ 
#
# File:           CMakeLists.txt
#
# Author(s):      <NAME> ($Author: $)
#        e-mail: "<EMAIL>"
#
# Revision history:
#
# 26-Oct-2012  Created 

cmake_minimum_required(VERSION 2.6)

if(CONDOR_PACKAGE_NAME)
    set(BIN_DIR "${C_BIN}")
    set(SBIN_DIR "${C_SBIN}")
    set(LIBEXEC_DIR "${C_LIBEXEC_BLAHP}")

    set(ClassAd_LIBRARY "classads")
else()
    set(BIN_DIR "bin")
    set(SBIN_DIR "sbin")
    set(LIBEXEC_DIR "libexec")

    include(FindClassAd.cmake)
    include_directories(${ClassAd_INCLUDE_DIR})
    set(ClassAd_LIBRARY ${CLASSAD_FOUND})

    include(FindPkgConfig)

    pkg_check_modules(GLOBUS_COMMON globus-common)
    include_directories(${GLOBUS_COMMON_INCLUDE_DIRS})

    pkg_check_modules(GLOBUS_IO globus-io)
    pkg_check_modules(GLOBUS_GSSAPI_GSI globus-gssapi-gsi)
    pkg_check_modules(GLOBUS_GSS_ASSIST globus-gss-assist)
    pkg_check_modules(GLOBUS_GSI_CREDENTIAL globus-gsi-credential)
    pkg_check_modules(GLOBUS_GSI_PROXY_CORE globus-gsi-proxy-core)
endif()

include_directories(.)

add_library(libblahp STATIC
	blah_utils.c
	classad_binary_op_unwind.C
	classad_c_helper.C
	cmdbuffer.c
	commands.c
	config.c
	console.c
	env_helper.c
	job_registry.c
	job_registry_updater.c
	job_status.c
	mapped_exec.c
	md5.c
	proxy_hashcontainer.c 
	resbuffer.c
	server.c
)

# These are not actually libraies, but rather a cmake
# virtual holder of .o files
add_library(libbfunctions STATIC Bfunctions.c)
add_library(libblfunctions STATIC BLfunctions.c)

# programs for 'sbin'
add_executable(blahpd_daemon main_daemon.c)
target_link_libraries(blahpd_daemon libblahp)

if(NOT CONDOR_PACKAGE_NAME)
    set_target_properties(blahpd_daemon PROPERTIES COMPILE_FLAGS ${ClassAd_CXX_FLAGS})
endif()
target_link_libraries(blahpd_daemon -lpthread ${ClassAd_LIBRARY})
add_executable(blah_job_registry_add blah_job_registry_add.c)
target_link_libraries(blah_job_registry_add libblahp)

add_executable(blah_job_registry_lkup blah_job_registry_lkup.c)
target_link_libraries(blah_job_registry_lkup libblahp)

add_executable(blah_job_registry_scan_by_subject blah_job_registry_scan_by_subject.c)
target_link_libraries(blah_job_registry_scan_by_subject libblahp)

if(NOT CONDOR_PACKAGE_NAME)
    set_target_properties(blah_job_registry_scan_by_subject PROPERTIES COMPILE_FLAGS ${ClassAd_CXX_FLAGS})
endif()
target_link_libraries(blah_job_registry_scan_by_subject ${ClassAd_LIBRARY})
add_executable(blah_check_config blah_check_config.c)
target_link_libraries(blah_check_config libbfunctions libblahp)

add_executable(blah_job_registry_dump blah_job_registry_dump.c)
target_link_libraries(blah_job_registry_dump libblahp)

add_executable(blah_job_registry_purge blah_job_registry_purge.c)
target_link_libraries(blah_job_registry_purge libblahp)

# programs for 'bin'
add_executable(blahpd main.c)
target_link_libraries(blahpd libblahp)

if(NOT CONDOR_PACKAGE_NAME)
    set_target_properties(blahpd PROPERTIES COMPILE_FLAGS ${ClassAd_CXX_FLAGS})
endif()
target_link_libraries(blahpd -lpthread ${ClassAd_LIBRARY})

# programs for 'libexec'
add_executable(BLClient BLClient.c)
target_link_libraries(BLClient libblfunctions libblahp)

add_executable(BLParserLSF BLParserLSF.c)
target_link_libraries(BLParserLSF -lpthread)
target_link_libraries(BLParserLSF libblfunctions libblahp)

add_executable(BLParserPBS BLParserPBS.c)
target_link_libraries(BLParserPBS -lpthread)
target_link_libraries(BLParserPBS libblfunctions libblahp)

add_executable(BUpdaterCondor BUpdaterCondor.c)
target_link_libraries(BUpdaterCondor -lpthread)
target_link_libraries(BUpdaterCondor libbfunctions libblahp)

add_executable(BNotifier BNotifier.c)
target_link_libraries(BNotifier -lpthread)
target_link_libraries(BNotifier libbfunctions libblahp)

add_executable(BUpdaterLSF BUpdaterLSF.c)
target_link_libraries(BUpdaterLSF -lpthread -lm)
target_link_libraries(BUpdaterLSF libbfunctions libblahp)

add_executable(BUpdaterPBS BUpdaterPBS.c)
target_link_libraries(BUpdaterPBS -lpthread -lm)
target_link_libraries(BUpdaterPBS libbfunctions libblahp)

add_executable(BUpdaterSGE BUpdaterSGE.c)
target_link_libraries(BUpdaterSGE libbfunctions libblahp)

add_executable(blparser_master blparser_master.c)
target_link_libraries(blparser_master libblahp)
target_link_libraries(blparser_master ${ClassAd_LIBRARY})

if(NOT CONDOR_PACKAGE_NAME)
    if (${GLOBUS_COMMON_FOUND} AND ${GLOBUS_IO_FOUND})
    add_executable(BPRclient BPRclient.c BPRcomm.c tokens.c)
    target_link_libraries(BPRclient 
      ${GLOBUS_GSI_PROXY_CORE_LDFLAGS}
      ${GLOBUS_GSI_CREDENTIALS_LDFLAGS}
      ${GLOBUS_GSS_ASSIST_LDFLAGS})
    add_executable(BPRserver BPRserver.c BPRcomm.c tokens.c)
    target_link_libraries(BPRserver
      ${GLOBUS_GSI_PROXY_CORE_LDFLAGS}
      ${GLOBUS_GSI_CREDENTIALS_LDFLAGS}
      ${GLOBUS_GSS_ASSIST_LDFLAGS})
    set_target_properties(BPRserver PROPERTIES COMPILE_FLAGS "-static") 
    endif (${GLOBUS_COMMON_FOUND} AND ${GLOBUS_IO_FOUND})
endif()
{'fraction_non_alphanumeric': 0.08474079859416186, 'fraction_numerical': 0.0020501806111490775, 'mean_word_length': 7.931124673060157, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '95841', 'n_tokens_mistral': 4076, 'n_tokens_neox': 3988, 'n_words': 509}