<commit_before>#############################################################################
#																			#
#		 			CMakeList created by ecore4CPP Generator				# 
#																			#
#############################################################################

# C++ project of model types.ecore, generated by Ecore4CPP

CMAKE_MINIMUM_REQUIRED(VERSION 3.9)


PROJECT(persistence)

IF(NOT CMAKE_BUILD_TYPE) 
    SET(CMAKE_BUILD_TYPE Debug)
ENDIF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_DEBUG_POSTFIX d)

SET(CMAKE_CXX_STANDARD 14)

IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
	SET(CMAKE_CXX_FLAGS "-Wall -Wno-overloaded-virtual -Wdeprecated-declarations -fmax-errors=5")
ELSE()
	SET(GCC_COVERAGE_LINK_FLAGS "-fopenmp")
	SET(CMAKE_CXX_FLAGS "-Wall -Wno-overloaded-virtual -Wdeprecated-declarations -fopenmp -fmax-errors=5")
ENDIF()

SET(CMAKE_CXX_FLAGS_DEBUG " -Og -ggdb -DACTIVITY_DEBUG_ON")
SET(CMAKE_CXX_FLAGS_RELEASE " -O3 -DNDEBUG")

string(REPLACE "\\" "/" MDE4CPP_HOME $ENV{MDE4CPP_HOME})

SET(SOURCE_FILES
	base/Persistence.cpp
	base/Load.cpp
	base/Save.cpp
	base/LoadHandler.cpp
	base/SaveHandler.cpp
	base/HandlerHelper.cpp
	xml/XMLPersistence.cpp
	xml/XMLLoad.cpp
	xml/XMLSave.cpp
	xml/XMLLoadHandler.cpp
	xml/XMLSaveHandler.cpp
	xml/xerces/DOMPrintErrorHandler.cpp
	xml/xerces/DOMPrintFilter.cpp
	xml/xerces/DOMTreeErrorReporter.cpp
	xml/xerces/WStr.cpp
	xml/xerces/XStr.cpp
)

INCLUDE_DIRECTORIES(
	../
 	$ENV{MDE4CPP_HOME}/application/include
)

# Apple specific stuff
if(APPLE)
  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined dynamic_lookup")
  set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -undefined dynamic_lookup")
endif(APPLE)

IF(UNIX AND NOT APPLE)
    # for Linux, BSD, Solaris, Minix
	IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
	ELSE()
	ENDIF()
ELSEIF(APPLE)
	IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
	ELSE()
	ENDIF()
ELSE()
	IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
		FIND_LIBRARY(PLUGINFRAMEWORK_DEBUG PluginFrameworkd ${MDE4CPP_HOME}/application/lib)
		FIND_LIBRARY(ECORE_DEBUG ecored ${MDE4CPP_HOME}/application/lib)
		FIND_LIBRARY(TYPES_DEBUG typesd ${MDE4CPP_HOME}/application/lib)
		FIND_LIBRARY(XERCES_DEBUG xerces-c ${MDE4CPP_HOME}/application/lib)
	ELSE()
		FIND_LIBRARY(PLUGINFRAMEWORK_RELEASE PluginFramework ${MDE4CPP_HOME}/application/lib)
		FIND_LIBRARY(ECORE_RELEASE ecore ${MDE4CPP_HOME}/application/lib)
		FIND_LIBRARY(TYPES_RELEASE types ${MDE4CPP_HOME}/application/lib)
		FIND_LIBRARY(XERCES_RELEASE xerces-c ${MDE4CPP_HOME}/application/lib)
	ENDIF()
ENDIF()

ADD_LIBRARY(${PROJECT_NAME} SHARED ${SOURCE_FILES})

IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
	TARGET_LINK_LIBRARIES(${PROJECT_NAME} 	
		debug ${ECORE_DEBUG}
		debug ${TYPES_DEBUG}
		debug ${PLUGINFRAMEWORK_DEBUG}
		debug ${XERCES_DEBUG}
	)
ELSE()
	TARGET_LINK_LIBRARIES(${PROJECT_NAME}
		optimized ${PLUGINFRAMEWORK_RELEASE}
		optimized ${ECORE_RELEASE}
		optimized ${TYPES_RELEASE}
		optimized ${PLUGINFRAMEWORK_RELEASE}
		optimized ${XERCES_RELEASE}
	)
ENDIF()

#-----------------------------------------------------
# DELIVERING binaries and header to ${MDE4CPP_HOME}
#-----------------------------------------------------

INSTALL(TARGETS ${PROJECT_NAME} 
	RUNTIME DESTINATION ${MDE4CPP_HOME}/application/bin
    LIBRARY DESTINATION ${MDE4CPP_HOME}/application/bin
    ARCHIVE DESTINATION ${MDE4CPP_HOME}/application/lib
)

INSTALL(DIRECTORY interfaces xml base DESTINATION ${MDE4CPP_HOME}/application/include/${PROJECT_NAME}
  FILES_MATCHING 
    PATTERN "interfaces/*.hpp"
    PATTERN "xml/XMLPersistence.hpp"
    PATTERN "base/Persistence.hpp"
    PATTERN "xerces" EXCLUDE
    PATTERN ".cmake" EXCLUDE
)<commit_msg>[persistence] search libraries depending on operation system<commit_after>#############################################################################
#																			#
#		 			CMakeList created by ecore4CPP Generator				# 
#																			#
#############################################################################

# C++ project of model types.ecore, generated by Ecore4CPP

CMAKE_MINIMUM_REQUIRED(VERSION 3.9)


PROJECT(persistence)

IF(NOT CMAKE_BUILD_TYPE) 
    SET(CMAKE_BUILD_TYPE Debug)
ENDIF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_DEBUG_POSTFIX d)

SET(CMAKE_CXX_STANDARD 14)

IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
	SET(CMAKE_CXX_FLAGS "-Wall -Wno-overloaded-virtual -Wdeprecated-declarations -fmax-errors=5")
ELSE()
	SET(GCC_COVERAGE_LINK_FLAGS "-fopenmp")
	SET(CMAKE_CXX_FLAGS "-Wall -Wno-overloaded-virtual -Wdeprecated-declarations -fopenmp -fmax-errors=5")
ENDIF()

SET(CMAKE_CXX_FLAGS_DEBUG " -Og -ggdb -DACTIVITY_DEBUG_ON")
SET(CMAKE_CXX_FLAGS_RELEASE " -O3 -DNDEBUG")

string(REPLACE "\\" "/" MDE4CPP_HOME $ENV{MDE4CPP_HOME})

SET(SOURCE_FILES
	base/Persistence.cpp
	base/Load.cpp
	base/Save.cpp
	base/LoadHandler.cpp
	base/SaveHandler.cpp
	base/HandlerHelper.cpp
	xml/XMLPersistence.cpp
	xml/XMLLoad.cpp
	xml/XMLSave.cpp
	xml/XMLLoadHandler.cpp
	xml/XMLSaveHandler.cpp
	xml/xerces/DOMPrintErrorHandler.cpp
	xml/xerces/DOMPrintFilter.cpp
	xml/xerces/DOMTreeErrorReporter.cpp
	xml/xerces/WStr.cpp
	xml/xerces/XStr.cpp
)

INCLUDE_DIRECTORIES(
	../
 	$ENV{MDE4CPP_HOME}/application/include
)

# Apple specific stuff
if(APPLE)
  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined dynamic_lookup")
  set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -undefined dynamic_lookup")
endif(APPLE)

IF(UNIX AND NOT APPLE)
    # for Linux, BSD, Solaris, Minix
	IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
		FIND_LIBRARY(PLUGINFRAMEWORK_DEBUG pluginFrameworkd.so ${MDE4CPP_HOME}/application/bin)
		FIND_LIBRARY(ECORE_DEBUG ecored.so ${MDE4CPP_HOME}/application/bin)
		FIND_LIBRARY(TYPES_DEBUG typesd.so ${MDE4CPP_HOME}/application/bin)
		FIND_LIBRARY(XERCES_DEBUG xerces-c ${MDE4CPP_HOME}/application/lib)
	ELSE()
		FIND_LIBRARY(PLUGINFRAMEWORK_RELEASE pluginFramework.so ${MDE4CPP_HOME}/application/bin)
		FIND_LIBRARY(ECORE_RELEASE ecore.so ${MDE4CPP_HOME}/application/bin)
		FIND_LIBRARY(TYPES_RELEASE types.so ${MDE4CPP_HOME}/application/bin)
		FIND_LIBRARY(XERCES_RELEASE xerces-c ${MDE4CPP_HOME}/application/lib)
	ENDIF()
ELSEIF(APPLE)
	IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
		FIND_LIBRARY(PLUGINFRAMEWORK_DEBUG pluginFrameworkd.dylib ${MDE4CPP_HOME}/application/bin)
		FIND_LIBRARY(ECORE_DEBUG ecored.dylib ${MDE4CPP_HOME}/application/bin)
		FIND_LIBRARY(TYPES_DEBUG typesd.dylib ${MDE4CPP_HOME}/application/bin)
		FIND_LIBRARY(XERCES_DEBUG xerces-c ${MDE4CPP_HOME}/application/lib)		
	ELSE()
		FIND_LIBRARY(PLUGINFRAMEWORK_RELEASE pluginFramework.dylib ${MDE4CPP_HOME}/application/bin)
		FIND_LIBRARY(ECORE_RELEASE ecore.dylib ${MDE4CPP_HOME}/application/bin)
		FIND_LIBRARY(TYPES_RELEASE types.dylib ${MDE4CPP_HOME}/application/lib)
		FIND_LIBRARY(XERCES_RELEASE xerces-c ${MDE4CPP_HOME}/application/lib)		
	ENDIF()
ELSE()
	IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
		FIND_LIBRARY(PLUGINFRAMEWORK_DEBUG pluginFrameworkd ${MDE4CPP_HOME}/application/lib)
		FIND_LIBRARY(ECORE_DEBUG ecored ${MDE4CPP_HOME}/application/lib)
		FIND_LIBRARY(TYPES_DEBUG typesd ${MDE4CPP_HOME}/application/lib)
		FIND_LIBRARY(XERCES_DEBUG xerces-c ${MDE4CPP_HOME}/application/lib)
	ELSE()
		FIND_LIBRARY(PLUGINFRAMEWORK_RELEASE pluginFramework ${MDE4CPP_HOME}/application/lib)
		FIND_LIBRARY(ECORE_RELEASE ecore ${MDE4CPP_HOME}/application/lib)
		FIND_LIBRARY(TYPES_RELEASE types ${MDE4CPP_HOME}/application/lib)
		FIND_LIBRARY(XERCES_RELEASE xerces-c ${MDE4CPP_HOME}/application/lib)
	ENDIF()
ENDIF()

ADD_LIBRARY(${PROJECT_NAME} SHARED ${SOURCE_FILES})

IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
	TARGET_LINK_LIBRARIES(${PROJECT_NAME} 	
		debug ${ECORE_DEBUG}
		debug ${TYPES_DEBUG}
		debug ${PLUGINFRAMEWORK_DEBUG}
		debug ${XERCES_DEBUG}
	)
ELSE()
	TARGET_LINK_LIBRARIES(${PROJECT_NAME}
		optimized ${ECORE_RELEASE}
		optimized ${TYPES_RELEASE}
		optimized ${PLUGINFRAMEWORK_RELEASE}
		optimized ${XERCES_RELEASE}
	)
ENDIF()

#-----------------------------------------------------
# DELIVERING binaries and header to ${MDE4CPP_HOME}
#-----------------------------------------------------

INSTALL(TARGETS ${PROJECT_NAME} 
	RUNTIME DESTINATION ${MDE4CPP_HOME}/application/bin
    LIBRARY DESTINATION ${MDE4CPP_HOME}/application/bin
    ARCHIVE DESTINATION ${MDE4CPP_HOME}/application/lib
)

INSTALL(DIRECTORY interfaces xml base DESTINATION ${MDE4CPP_HOME}/application/include/${PROJECT_NAME}
  FILES_MATCHING 
    PATTERN "interfaces/*.hpp"
    PATTERN "xml/XMLPersistence.hpp"
    PATTERN "base/Persistence.hpp"
    PATTERN "xerces" EXCLUDE
    PATTERN ".cmake" EXCLUDE
)
{'fraction_non_alphanumeric': 0.16215269670791502, 'fraction_numerical': 0.007704879757179547, 'mean_word_length': 5.230545454545455, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 24}, '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': '6170458', 'n_tokens_mistral': 3524, 'n_tokens_neox': 3182, 'n_words': 462}