Closed aroidzap closed 7 years ago
Přihodil bys screen/log, jak je dobrým zvykem? Je to build pomocí CMake nebo make rovnou?
cmake -DCMAKE_BUILD_TYPE=Release && make
co dělám jinak?
thejoeejoee@selene:/tmp/build$ /opt/clion-2017.2.2/bin/cmake/bin/cmake -DCMAKE_BUILD_TYPE=Release /home/thejoeejoee/projects/IFJ-VUT-BIT-2017-2018
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Downloading/updating googletest
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/build/googletest-download
Scanning dependencies of target googletest-download
[ 11%] Creating directories for 'googletest-download'
[ 22%] Performing download step (git clone) for 'googletest-download'
Cloning into 'googletest-src'...
Already on 'master'
Your branch is up-to-date with 'origin/master'.
[ 33%] No patch step for 'googletest-download'
[ 44%] Skipping update step for 'googletest-download'
[ 55%] No configure step for 'googletest-download'
[ 66%] No build step for 'googletest-download'
[ 77%] No install step for 'googletest-download'
[ 88%] No test step for 'googletest-download'
[100%] Completed 'googletest-download'
[100%] Built target googletest-download
-- Downloading/updating codecov
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/build/codecov-download
Scanning dependencies of target codecov-download
[ 11%] Creating directories for 'codecov-download'
[ 22%] Performing download step (git clone) for 'codecov-download'
Cloning into 'codecov-src'...
Already on 'master'
Your branch is up-to-date with 'origin/master'.
[ 33%] No patch step for 'codecov-download'
[ 44%] Skipping update step for 'codecov-download'
[ 55%] No configure step for 'codecov-download'
[ 66%] No build step for 'codecov-download'
[ 77%] No install step for 'codecov-download'
[ 88%] No test step for 'codecov-download'
[100%] Completed 'codecov-download'
[100%] Built target codecov-download
-- Found PythonInterp: /usr/bin/python (found version "2.7.12")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Downloading/updating googlebenchmark
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/build/googlebenchmark-download
Scanning dependencies of target googlebenchmark-download
[ 11%] Creating directories for 'googlebenchmark-download'
[ 22%] Performing download step (git clone) for 'googlebenchmark-download'
Cloning into 'googlebenchmark-src'...
Already on 'master'
Your branch is up-to-date with 'origin/master'.
[ 33%] No patch step for 'googlebenchmark-download'
[ 44%] Skipping update step for 'googlebenchmark-download'
[ 55%] No configure step for 'googlebenchmark-download'
[ 66%] No build step for 'googlebenchmark-download'
[ 77%] No install step for 'googlebenchmark-download'
[ 88%] No test step for 'googlebenchmark-download'
[100%] Completed 'googlebenchmark-download'
[100%] Built target googlebenchmark-download
-- Found Git: /usr/bin/git (found version "2.7.4")
-- git Version: v0.0.0
-- Version: 0.0.0
-- Performing Test HAVE_CXX_FLAG_STD_CXX11
-- Performing Test HAVE_CXX_FLAG_STD_CXX11 - Success
-- Performing Test HAVE_CXX_FLAG_WALL
-- Performing Test HAVE_CXX_FLAG_WALL - Success
-- Performing Test HAVE_CXX_FLAG_WEXTRA
-- Performing Test HAVE_CXX_FLAG_WEXTRA - Success
-- Performing Test HAVE_CXX_FLAG_WSHADOW
-- Performing Test HAVE_CXX_FLAG_WSHADOW - Success
-- Performing Test HAVE_CXX_FLAG_WERROR
-- Performing Test HAVE_CXX_FLAG_WERROR - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC
-- Performing Test HAVE_CXX_FLAG_PEDANTIC - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Failed
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL - Success
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WZERO_AS_NULL_POINTER_CONSTANT
-- Performing Test HAVE_CXX_FLAG_WZERO_AS_NULL_POINTER_CONSTANT - Success
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WD654
-- Performing Test HAVE_CXX_FLAG_WD654 - Failed
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Failed
-- Performing Test HAVE_CXX_FLAG_COVERAGE
-- Performing Test HAVE_CXX_FLAG_COVERAGE - Success
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX -- success
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/build
thejoeejoee@selene:/tmp/build$ make ifj2017
Scanning dependencies of target ifj2017
[ 0%] Building C object CMakeFiles/ifj2017.dir/src/char_stack.c.o
[ 4%] Building C object CMakeFiles/ifj2017.dir/src/code_constructor.c.o
[ 9%] Building C object CMakeFiles/ifj2017.dir/src/code_generator.c.o
[ 13%] Building C object CMakeFiles/ifj2017.dir/src/code_instruction.c.o
[ 18%] Building C object CMakeFiles/ifj2017.dir/src/code_instruction_operand.c.o
[ 18%] Building C object CMakeFiles/ifj2017.dir/src/common.c.o
[ 22%] Building C object CMakeFiles/ifj2017.dir/src/dynamic_string.c.o
[ 27%] Building C object CMakeFiles/ifj2017.dir/src/error.c.o
[ 31%] Building C object CMakeFiles/ifj2017.dir/src/ifj2017.c.o
[ 36%] Building C object CMakeFiles/ifj2017.dir/src/lexer.c.o
[ 36%] Building C object CMakeFiles/ifj2017.dir/src/lexer_fsm.c.o
[ 40%] Building C object CMakeFiles/ifj2017.dir/src/llist.c.o
[ 45%] Building C object CMakeFiles/ifj2017.dir/src/memory.c.o
[ 50%] Building C object CMakeFiles/ifj2017.dir/src/memory_debug.c.o
[ 54%] Building C object CMakeFiles/ifj2017.dir/src/parser.c.o
[ 54%] Building C object CMakeFiles/ifj2017.dir/src/parser_expr.c.o
[ 59%] Building C object CMakeFiles/ifj2017.dir/src/parser_expr_internal.c.o
[ 63%] Building C object CMakeFiles/ifj2017.dir/src/parser_expr_prec_table_data.c.o
[ 68%] Building C object CMakeFiles/ifj2017.dir/src/parser_expr_rules.c.o
[ 72%] Building C object CMakeFiles/ifj2017.dir/src/parser_semantic.c.o
[ 72%] Building C object CMakeFiles/ifj2017.dir/src/stack.c.o
[ 77%] Building C object CMakeFiles/ifj2017.dir/src/stack_code_label.c.o
[ 81%] Building C object CMakeFiles/ifj2017.dir/src/symbol_register.c.o
[ 86%] Building C object CMakeFiles/ifj2017.dir/src/symtable.c.o
[ 90%] Building C object CMakeFiles/ifj2017.dir/src/symtable_function.c.o
[ 90%] Building C object CMakeFiles/ifj2017.dir/src/symtable_variable.c.o
[ 95%] Building C object CMakeFiles/ifj2017.dir/src/token.c.o
[100%] Linking C executable ifj2017
[100%] Built target ifj2017
thejoeejoee@selene:/tmp/build$ ./ifj2017
scope
dim a as integer
a = 25
end scope
.IFJcode17
DEFVAR GF@%__temp_variable_1
DEFVAR GF@%__temp_variable_2
DEFVAR GF@%__temp_variable_3
JUMP %LABEL_000__DEPTH_000__main_scope
LABEL %LABEL_000__DEPTH_000__main_scope
CREATEFRAME
PUSHFRAME
DEFVAR LF@a
MOVE LF@a int@0
PUSHS int@25
POPS LF@a
thejoeejoee@selene:/tmp/build$
Zvláštní... tak na to se ještě budu muset pořádně podívat u mě.
a make
pomocí src/Makefile
Ti jede?
nejsem teď u PC, dám vědět odpoledne
sestav IFJ test
Release testu je trochu blbost, není s ním počítáno, když v testech testujeme ty Debug funkce pro memory manager.
Vyřešeno
Při release buildu nám to háže nějaké errory, asi chybí definice nějakých funkcí.