Commit 9bb65c25 authored by Campagna's avatar Campagna
Browse files

added labo3

parent a1b3837e
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
algo2_labo_clase4
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/AyED2-Labo03-Memoria_dinamica.iml" filepath="$PROJECT_DIR$/.idea/AyED2-Labo03-Memoria_dinamica.iml" />
</modules>
</component>
</project>
\ No newline at end of file
cmake_minimum_required(VERSION 3.5)
project(algo2_labo_clase4)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -std=gnu++11 -ggdb3 -g")
add_library(gtest STATIC tests/gtest-1.8.1/gtest-all.cc)
add_library(gtest_main STATIC tests/gtest-1.8.1/gtest_main.cc)
set(SOURCE_FILES src/Internet.cpp src/ConexionJugador.cpp)
message("Test:" ${SOURCE_FILES})
# Ejercicios
add_executable(ej1 tests/sdm_tests.cpp src/SistemaDeMensajes.cpp ${SOURCE_FILES})
add_executable(ej3 tests/sdm_tests.cpp src/SistemaDeMensajes.cpp ${SOURCE_FILES})
add_executable(ej4 tests/sdm_tests.cpp src/SistemaDeMensajes.cpp src/Proxy.cpp ${SOURCE_FILES})
add_executable(ej6 tests/sdm_tests.cpp src/SistemaDeMensajes.cpp src/Proxy2.cpp ${SOURCE_FILES})
add_executable(ej7 tests/sdm_tests_bonus.cpp src/SistemaDeMensajes.cpp ${SOURCE_FILES})
# Definiciones por target
target_compile_definitions(ej1 PUBLIC EJ=1)
target_compile_definitions(ej3 PUBLIC EJ=3)
target_compile_definitions(ej4 PUBLIC EJ=4)
target_compile_definitions(ej6 PUBLIC EJ=6)
target_compile_definitions(ej7 PUBLIC EJ=7)
# Necesitamos asociar los archivos del framework de testing
target_link_libraries(ej1 gtest gtest_main)
target_link_libraries(ej3 gtest gtest_main)
target_link_libraries(ej4 gtest gtest_main)
target_link_libraries(ej6 gtest gtest_main)
target_link_libraries(ej7 gtest gtest_main)
# Targets para correr valgrind
add_custom_target(ej2_correrValgrind
valgrind --leak-check=full -v ./ej1 2>&1
DEPENDS ej1)
add_custom_target(ej3_correrValgrind
valgrind --leak-check=full -v ./ej3 2>&1
DEPENDS ej3)
add_custom_target(ej5_correrValgrind
valgrind --leak-check=full -v ./ej4 2>&1
DEPENDS ej4)
{
"configurations" :
[
{
"directories" :
[
{
"build" : ".",
"jsonFile" : "directory-.-Debug-f5ebdc15457944623624.json",
"minimumCMakeVersion" :
{
"string" : "3.5"
},
"projectIndex" : 0,
"source" : ".",
"targetIndexes" :
[
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
}
],
"name" : "Debug",
"projects" :
[
{
"directoryIndexes" :
[
0
],
"name" : "algo2_labo_clase4",
"targetIndexes" :
[
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
]
}
],
"targets" :
[
{
"directoryIndex" : 0,
"id" : "ej1::@6890427a1f51a3e7e1df",
"jsonFile" : "target-ej1-Debug-0731fa45fba1a352a89c.json",
"name" : "ej1",
"projectIndex" : 0
},
{
"directoryIndex" : 0,
"id" : "ej2_correrValgrind::@6890427a1f51a3e7e1df",
"jsonFile" : "target-ej2_correrValgrind-Debug-5fca1a8c788d5978cfb3.json",
"name" : "ej2_correrValgrind",
"projectIndex" : 0
},
{
"directoryIndex" : 0,
"id" : "ej3::@6890427a1f51a3e7e1df",
"jsonFile" : "target-ej3-Debug-9bed19e4a248c4e213df.json",
"name" : "ej3",
"projectIndex" : 0
},
{
"directoryIndex" : 0,
"id" : "ej3_correrValgrind::@6890427a1f51a3e7e1df",
"jsonFile" : "target-ej3_correrValgrind-Debug-41bae1b4f267404a0692.json",
"name" : "ej3_correrValgrind",
"projectIndex" : 0
},
{
"directoryIndex" : 0,
"id" : "ej4::@6890427a1f51a3e7e1df",
"jsonFile" : "target-ej4-Debug-aed3ffb45037cf730fb6.json",
"name" : "ej4",
"projectIndex" : 0
},
{
"directoryIndex" : 0,
"id" : "ej5_correrValgrind::@6890427a1f51a3e7e1df",
"jsonFile" : "target-ej5_correrValgrind-Debug-0980b5506e73cdb1d1f0.json",
"name" : "ej5_correrValgrind",
"projectIndex" : 0
},
{
"directoryIndex" : 0,
"id" : "ej6::@6890427a1f51a3e7e1df",
"jsonFile" : "target-ej6-Debug-f330125f3a1eef023a8b.json",
"name" : "ej6",
"projectIndex" : 0
},
{
"directoryIndex" : 0,
"id" : "ej7::@6890427a1f51a3e7e1df",
"jsonFile" : "target-ej7-Debug-b68fdc051561243576b2.json",
"name" : "ej7",
"projectIndex" : 0
},
{
"directoryIndex" : 0,
"id" : "gtest::@6890427a1f51a3e7e1df",
"jsonFile" : "target-gtest-Debug-e84cd8a733a69a3a6921.json",
"name" : "gtest",
"projectIndex" : 0
},
{
"directoryIndex" : 0,
"id" : "gtest_main::@6890427a1f51a3e7e1df",
"jsonFile" : "target-gtest_main-Debug-38271a6ae05088126cb8.json",
"name" : "gtest_main",
"projectIndex" : 0
}
]
}
],
"kind" : "codemodel",
"paths" :
{
"build" : "/home/clinux01/Documentos/Agustin/AyED2-Labo03-Memoria_dinamica(1)/AyED2-Labo03-Memoria_dinamica/cmake-build-debug",
"source" : "/home/clinux01/Documentos/Agustin/AyED2-Labo03-Memoria_dinamica(1)/AyED2-Labo03-Memoria_dinamica"
},
"version" :
{
"major" : 2,
"minor" : 4
}
}
{
"backtraceGraph" :
{
"commands" : [],
"files" : [],
"nodes" : []
},
"installers" : [],
"paths" :
{
"build" : ".",
"source" : "."
}
}
{
"cmake" :
{
"generator" :
{
"multiConfig" : false,
"name" : "Ninja"
},
"paths" :
{
"cmake" : "/snap/clion/206/bin/cmake/linux/bin/cmake",
"cpack" : "/snap/clion/206/bin/cmake/linux/bin/cpack",
"ctest" : "/snap/clion/206/bin/cmake/linux/bin/ctest",
"root" : "/snap/clion/206/bin/cmake/linux/share/cmake-3.23"
},
"version" :
{
"isDirty" : false,
"major" : 3,
"minor" : 23,
"patch" : 2,
"string" : "3.23.2",
"suffix" : ""
}
},
"objects" :
[
{
"jsonFile" : "codemodel-v2-9088f6faf86bcbddbd91.json",
"kind" : "codemodel",
"version" :
{
"major" : 2,
"minor" : 4
}
},
{
"jsonFile" : "cache-v2-a1cf2dd06a3fb45bcfe0.json",
"kind" : "cache",
"version" :
{
"major" : 2,
"minor" : 0
}
},
{
"jsonFile" : "cmakeFiles-v1-3a744819ec5c6209b7a6.json",
"kind" : "cmakeFiles",
"version" :
{
"major" : 1,
"minor" : 0
}
},
{
"jsonFile" : "toolchains-v1-ee5ca47e57a615ee224c.json",
"kind" : "toolchains",
"version" :
{
"major" : 1,
"minor" : 0
}
}
],
"reply" :
{
"cache-v2" :
{
"jsonFile" : "cache-v2-a1cf2dd06a3fb45bcfe0.json",
"kind" : "cache",
"version" :
{
"major" : 2,
"minor" : 0
}
},
"cmakeFiles-v1" :
{
"jsonFile" : "cmakeFiles-v1-3a744819ec5c6209b7a6.json",
"kind" : "cmakeFiles",
"version" :
{
"major" : 1,
"minor" : 0
}
},
"codemodel-v2" :
{
"jsonFile" : "codemodel-v2-9088f6faf86bcbddbd91.json",
"kind" : "codemodel",
"version" :
{
"major" : 2,
"minor" : 4
}
},
"toolchains-v1" :
{
"jsonFile" : "toolchains-v1-ee5ca47e57a615ee224c.json",
"kind" : "toolchains",
"version" :
{
"major" : 1,
"minor" : 0
}
}
}
}
{
"artifacts" :
[
{
"path" : "ej1"
}
],
"backtrace" : 1,
"backtraceGraph" :
{
"commands" :
[
"add_executable",
"target_link_libraries",
"target_compile_definitions"
],
"files" :
[
"CMakeLists.txt"
],
"nodes" :
[
{
"file" : 0
},
{
"command" : 0,
"file" : 0,
"line" : 16,
"parent" : 0
},
{
"command" : 1,
"file" : 0,
"line" : 30,
"parent" : 0
},
{
"command" : 2,
"file" : 0,
"line" : 23,
"parent" : 0
}
]
},
"compileGroups" :
[
{
"compileCommandFragments" :
[
{
"fragment" : " -pthread -std=gnu++11 -ggdb3 -g -g"
},
{
"fragment" : "-std=gnu++11"
}
],
"defines" :
[
{
"backtrace" : 3,
"define" : "EJ=1"
}
],
"language" : "CXX",
"languageStandard" :
{
"backtraces" :
[
1
],
"standard" : "11"
},
"sourceIndexes" :
[
0,
1,
2,
3
]
}
],
"dependencies" :
[
{
"backtrace" : 2,
"id" : "gtest::@6890427a1f51a3e7e1df"
},
{
"backtrace" : 2,
"id" : "gtest_main::@6890427a1f51a3e7e1df"
}
],
"id" : "ej1::@6890427a1f51a3e7e1df",
"link" :
{
"commandFragments" :
[
{
"fragment" : "-pthread -std=gnu++11 -ggdb3 -g -g",
"role" : "flags"
},
{
"fragment" : "",
"role" : "flags"
},
{
"backtrace" : 2,
"fragment" : "libgtest.a",
"role" : "libraries"
},
{
"backtrace" : 2,
"fragment" : "libgtest_main.a",
"role" : "libraries"
}
],
"language" : "CXX"
},
"name" : "ej1",
"nameOnDisk" : "ej1",
"paths" :
{
"build" : ".",
"source" : "."
},
"sourceGroups" :
[
{
"name" : "Source Files",
"sourceIndexes" :
[
0,
1,
2,
3
]
}
],
"sources" :
[
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "tests/sdm_tests.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "src/SistemaDeMensajes.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "src/Internet.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "src/ConexionJugador.cpp",
"sourceGroupIndex" : 0
}
],
"type" : "EXECUTABLE"
}
{
"backtrace" : 1,
"backtraceGraph" :
{
"commands" :
[
"add_custom_target"
],
"files" :
[
"CMakeLists.txt"
],
"nodes" :
[
{
"file" : 0
},
{
"command" : 0,
"file" : 0,
"line" : 38,
"parent" : 0
}
]
},
"dependencies" :
[
{
"id" : "ej1::@6890427a1f51a3e7e1df"
}
],
"id" : "ej2_correrValgrind::@6890427a1f51a3e7e1df",
"name" : "ej2_correrValgrind",
"paths" :
{
"build" : ".",
"source" : "."
},
"sourceGroups" :
[
{
"name" : "",
"sourceIndexes" :
[
0
]
},
{
"name" : "CMake Rules",
"sourceIndexes" :
[
1
]
}
],
"sources" :
[
{
"backtrace" : 1,
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/ej2_correrValgrind",
"sourceGroupIndex" : 0
},
{
"backtrace" : 0,
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/ej2_correrValgrind.rule",
"sourceGroupIndex" : 1
}
],
"type" : "UTILITY"
}
{
"artifacts" :
[
{
"path" : "ej3"
}
],
"backtrace" : 1,
"backtraceGraph" :
{
"commands" :
[
"add_executable",
"target_link_libraries",
"target_compile_definitions"
],
"files" :
[
"CMakeLists.txt"
],
"nodes" :
[
{
"file" : 0
},
{
"command" : 0,
"file" : 0,
"line" : 17,
"parent" : 0
},
{
"command" : 1,
"file" : 0,
"line" : 31,
"parent" : 0
},
{
"command" : 2,
"file" : 0,
"line" : 24,
"parent" : 0
}
]
},
"compileGroups" :
[
{
"compileCommandFragments" :
[
{
"fragment" : " -pthread -std=gnu++11 -ggdb3 -g -g"
},
{
"fragment" : "-std=gnu++11"
}
],
"defines" :
[
{
"backtrace" : 3,
"define" : "EJ=3"
}
],
"language" : "CXX",
"languageStandard" :
{
"backtraces" :
[
1
],
"standard" : "11"
},
"sourceIndexes" :
[
0,
1,
2,
3
]
}
],
"dependencies" :
[
{
"backtrace" : 2,
"id" : "gtest::@6890427a1f51a3e7e1df"
},
{
"backtrace" : 2,
"id" : "gtest_main::@6890427a1f51a3e7e1df"
}
],
"id" : "ej3::@6890427a1f51a3e7e1df",
"link" :
{
"commandFragments" :
[
{
"fragment" : "-pthread -std=gnu++11 -ggdb3 -g -g",
"role" : "flags"
},
{
"fragment" : "",
"role" : "flags"
},
{
"backtrace" : 2,
"fragment" : "libgtest.a",
"role" : "libraries"
},
{
"backtrace" : 2,
"fragment" : "libgtest_main.a",
"role" : "libraries"
}
],
"language" : "CXX"
},
"name" : "ej3",
"nameOnDisk" : "ej3",
"paths" :
{
"build" : ".",
"source" : "."
},
"sourceGroups" :
[
{
"name" : "Source Files",
"sourceIndexes" :
[
0,
1,
2,
3
]
}
],
"sources" :
[
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "tests/sdm_tests.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "src/SistemaDeMensajes.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "src/Internet.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "src/ConexionJugador.cpp",
"sourceGroupIndex" : 0
}
],
"type" : "EXECUTABLE"
}
{
"backtrace" : 1,
"backtraceGraph" :
{
"commands" :
[
"add_custom_target"
],
"files" :
[
"CMakeLists.txt"
],
"nodes" :
[
{
"file" : 0
},
{
"command" : 0,
"file" : 0,
"line" : 42,
"parent" : 0
}
]
},
"dependencies" :
[
{
"id" : "ej3::@6890427a1f51a3e7e1df"
}
],
"id" : "ej3_correrValgrind::@6890427a1f51a3e7e1df",
"name" : "ej3_correrValgrind",
"paths" :
{
"build" : ".",
"source" : "."
},
"sourceGroups" :
[
{
"name" : "",
"sourceIndexes" :
[
0
]
},
{
"name" : "CMake Rules",
"sourceIndexes" :
[
1
]
}
],
"sources" :
[
{
"backtrace" : 1,
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/ej3_correrValgrind",
"sourceGroupIndex" : 0
},
{
"backtrace" : 0,
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/ej3_correrValgrind.rule",
"sourceGroupIndex" : 1
}
],
"type" : "UTILITY"
}
{
"artifacts" :
[
{
"path" : "ej4"
}
],
"backtrace" : 1,
"backtraceGraph" :
{
"commands" :
[
"add_executable",
"target_link_libraries",
"target_compile_definitions"
],
"files" :
[
"CMakeLists.txt"
],
"nodes" :
[
{
"file" : 0
},
{
"command" : 0,
"file" : 0,
"line" : 18,
"parent" : 0
},
{
"command" : 1,
"file" : 0,
"line" : 32,
"parent" : 0
},
{
"command" : 2,
"file" : 0,
"line" : 25,
"parent" : 0
}
]
},
"compileGroups" :
[
{
"compileCommandFragments" :
[
{
"fragment" : " -pthread -std=gnu++11 -ggdb3 -g -g"
},
{
"fragment" : "-std=gnu++11"
}
],
"defines" :
[
{
"backtrace" : 3,
"define" : "EJ=4"
}
],
"language" : "CXX",
"languageStandard" :
{
"backtraces" :
[
1
],
"standard" : "11"
},
"sourceIndexes" :
[
0,
1,
2,
3,
4
]
}
],
"dependencies" :
[
{
"backtrace" : 2,
"id" : "gtest::@6890427a1f51a3e7e1df"
},
{
"backtrace" : 2,
"id" : "gtest_main::@6890427a1f51a3e7e1df"
}
],
"id" : "ej4::@6890427a1f51a3e7e1df",
"link" :
{
"commandFragments" :
[
{
"fragment" : "-pthread -std=gnu++11 -ggdb3 -g -g",
"role" : "flags"
},
{
"fragment" : "",
"role" : "flags"
},
{
"backtrace" : 2,
"fragment" : "libgtest.a",
"role" : "libraries"
},
{
"backtrace" : 2,
"fragment" : "libgtest_main.a",
"role" : "libraries"
}
],
"language" : "CXX"
},
"name" : "ej4",
"nameOnDisk" : "ej4",
"paths" :
{
"build" : ".",
"source" : "."
},
"sourceGroups" :
[
{
"name" : "Source Files",
"sourceIndexes" :
[
0,
1,
2,
3,
4
]
}
],
"sources" :
[
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "tests/sdm_tests.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "src/SistemaDeMensajes.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "src/Proxy.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "src/Internet.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "src/ConexionJugador.cpp",
"sourceGroupIndex" : 0
}
],
"type" : "EXECUTABLE"
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment