<commit_before># =================================================================================================
# ADOBE SYSTEMS INCORPORATED
# Copyright 2013 Adobe Systems Incorporated
# All Rights Reserved
#
# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
# of the Adobe license agreement accompanying it.
# =================================================================================================

# ==============================================================================
# define minimum cmake version
cmake_minimum_required(VERSION 2.8.6)

# ==============================================================================
# Shared config for mac
# ==============================================================================
DetectXCodeVersion()

if(${CMAKE_INSTALLED_XCODE_VERSION} LESS 4.3.0)
	if(NOT DEFINED ${COMPONENT}_DEVELOPER_ROOT)
		set(${COMPONENT}_DEVELOPER_ROOT "/Developer")
	endif()
	
	set(CMAKE_OSX_DEPLOYMENT_TARGET 	${${COMPONENT}_OSX_TARGET})
else()
	# get xcode installation path
	execute_process(
			  COMMAND xcode-select -print-path
			  OUTPUT_VARIABLE ${COMPONENT}_DEVELOPER_ROOT
			  OUTPUT_STRIP_TRAILING_WHITESPACE
	)
	set(CMAKE_OSX_DEPLOYMENT_TARGET 	${${COMPONENT}_OSX_TARGET})
   	set(${COMPONENT}_DEVELOPER_ROOT "${${COMPONENT}_DEVELOPER_ROOT}/Platforms/MacOSX.platform/Developer")
endif()

set(CMAKE_OSX_SYSROOT "${${COMPONENT}_DEVELOPER_ROOT}/SDKs/MacOSX${${COMPONENT}_OSX_SDK}.sdk")



#
# shared flags
#
set(COMMON_SHARED_COMPILE_FLAGS "${${COMPONENT}_SHARED_COMPILE_FLAGS} -Wno-unused-variable -Wno-unused-function -Wno-unused-parameter")
set(COMMON_SHARED_COMPILE_DEBUG_FLAGS "-O0 -DDEBUG=1 -D_DEBUG=1")
set(COMMON_SHARED_COMPILE_RELEASE_FLAGS "-O3 -DNDEBUG=1 -D_NDEBUG=1")

set(CMAKE_C_FLAGS "${COMMON_SHARED_COMPILE_FLAGS} ${COMMON_EXTRA_C_COMPILE_FLAGS}")
set(CMAKE_C_FLAGS_DEBUG "${COMMON_SHARED_COMPILE_DEBUG_FLAGS}")
set(CMAKE_C_FLAGS_RELEASE "${COMMON_SHARED_COMPILE_RELEASE_FLAGS}")

set(COMMON_SHARED_CXX_COMPILE_FLAGS "${${COMPONENT}_SHARED_CXX_COMPILE_FLAGS} -Wnon-virtual-dtor -Woverloaded-virtual -Wno-unused-variable -Wno-unused-function -Wno-unused-parameter")
set(CMAKE_CXX_FLAGS "-funsigned-char -fshort-enums -fno-common ${COMMON_SHARED_CXX_COMPILE_FLAGS} ${COMMON_EXTRA_CXX_COMPILE_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "${COMMON_SHARED_COMPILE_DEBUG_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "${COMMON_SHARED_COMPILE_RELEASE_FLAGS}")

if(${COMPONENT}_ENABLE_SECURE_SETTINGS)
	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector -D_FORTIFY_SOURCE=2")
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector")
endif()
set(COMMON_PLATFORM_BEGIN_WHOLE_ARCHIVE "")
set(COMMON_PLATFORM_END_WHOLE_ARCHIVE "")
set(COMMON_DYLIBEXTENSION	"dylib")


find_program(GCCTOOL gcc HINTS "/usr/bin" "${OSX_DEVELOPER_ROOT}/usr/bin")
if (${GCCTOOL} STREQUAL "GCCTOOL-NOTFOUND")
	message(SEND_ERROR "Can't find gcc in ${OSX_DEVELOPER_ROOT}/usr/bin")
endif()

SetupCompilerFlags()
SetupGeneralDirectories()

# ==============================================================================
# Functions
# ==============================================================================

# ==============================================================================<commit_msg>We don't care about gcc, clang is fine<commit_after># =================================================================================================
# ADOBE SYSTEMS INCORPORATED
# Copyright 2013 Adobe Systems Incorporated
# All Rights Reserved
#
# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
# of the Adobe license agreement accompanying it.
# =================================================================================================

# ==============================================================================
# define minimum cmake version
cmake_minimum_required(VERSION 2.8.6)

# ==============================================================================
# Shared config for mac
# ==============================================================================
DetectXCodeVersion()

if(${CMAKE_INSTALLED_XCODE_VERSION} LESS 4.3.0)
	if(NOT DEFINED ${COMPONENT}_DEVELOPER_ROOT)
		set(${COMPONENT}_DEVELOPER_ROOT "/Developer")
	endif()
	
	set(CMAKE_OSX_DEPLOYMENT_TARGET 	${${COMPONENT}_OSX_TARGET})
else()
	# get xcode installation path
	execute_process(
			  COMMAND xcode-select -print-path
			  OUTPUT_VARIABLE ${COMPONENT}_DEVELOPER_ROOT
			  OUTPUT_STRIP_TRAILING_WHITESPACE
	)
	set(CMAKE_OSX_DEPLOYMENT_TARGET 	${${COMPONENT}_OSX_TARGET})
   	set(${COMPONENT}_DEVELOPER_ROOT "${${COMPONENT}_DEVELOPER_ROOT}/Platforms/MacOSX.platform/Developer")
endif()

set(CMAKE_OSX_SYSROOT "${${COMPONENT}_DEVELOPER_ROOT}/SDKs/MacOSX${${COMPONENT}_OSX_SDK}.sdk")



#
# shared flags
#
set(COMMON_SHARED_COMPILE_FLAGS "${${COMPONENT}_SHARED_COMPILE_FLAGS} -Wno-unused-variable -Wno-unused-function -Wno-unused-parameter")
set(COMMON_SHARED_COMPILE_DEBUG_FLAGS "-O0 -DDEBUG=1 -D_DEBUG=1")
set(COMMON_SHARED_COMPILE_RELEASE_FLAGS "-O3 -DNDEBUG=1 -D_NDEBUG=1")

set(CMAKE_C_FLAGS "${COMMON_SHARED_COMPILE_FLAGS} ${COMMON_EXTRA_C_COMPILE_FLAGS}")
set(CMAKE_C_FLAGS_DEBUG "${COMMON_SHARED_COMPILE_DEBUG_FLAGS}")
set(CMAKE_C_FLAGS_RELEASE "${COMMON_SHARED_COMPILE_RELEASE_FLAGS}")

set(COMMON_SHARED_CXX_COMPILE_FLAGS "${${COMPONENT}_SHARED_CXX_COMPILE_FLAGS} -Wnon-virtual-dtor -Woverloaded-virtual -Wno-unused-variable -Wno-unused-function -Wno-unused-parameter")
set(CMAKE_CXX_FLAGS "-funsigned-char -fshort-enums -fno-common ${COMMON_SHARED_CXX_COMPILE_FLAGS} ${COMMON_EXTRA_CXX_COMPILE_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "${COMMON_SHARED_COMPILE_DEBUG_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "${COMMON_SHARED_COMPILE_RELEASE_FLAGS}")

if(${COMPONENT}_ENABLE_SECURE_SETTINGS)
	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector -D_FORTIFY_SOURCE=2")
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector")
endif()
set(COMMON_PLATFORM_BEGIN_WHOLE_ARCHIVE "")
set(COMMON_PLATFORM_END_WHOLE_ARCHIVE "")
set(COMMON_DYLIBEXTENSION	"dylib")


#find_program(GCCTOOL gcc HINTS "/usr/bin" "${OSX_DEVELOPER_ROOT}/usr/bin")
#if (${GCCTOOL} STREQUAL "GCCTOOL-NOTFOUND")
#	message(SEND_ERROR "Can't find gcc in ${OSX_DEVELOPER_ROOT}/usr/bin")
#endif()

SetupCompilerFlags()
SetupGeneralDirectories()

# ==============================================================================
# Functions
# ==============================================================================

# ==============================================================================
{'fraction_non_alphanumeric': 0.2962513279708605, 'fraction_numerical': 0.005160115343754742, 'mean_word_length': 10.20748299319728, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3204882', 'n_tokens_mistral': 2331, 'n_tokens_neox': 2120, 'n_words': 301}