Skip to content
Snippets Groups Projects
Commit 84b5399b authored by Jan Trávníček's avatar Jan Trávníček
Browse files

allow cmake + gcc compilation on gitlab

parent 1de267e1
No related branches found
No related tags found
No related merge requests found
Pipeline #21474 passed
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
*~ *~
*.swp *.swp
   
debug/*
release/*
bin/* bin/*
bin-release/* bin-release/*
bin-debug/* bin-debug/*
...@@ -39,6 +41,8 @@ doc/* ...@@ -39,6 +41,8 @@ doc/*
**/bin **/bin
**/bin-release **/bin-release
**/bin-debug **/bin-debug
**/release
**/debug
**/doc **/doc
**/obj **/obj
**/obj-release **/obj-release
......
...@@ -125,7 +125,10 @@ test-clang: ...@@ -125,7 +125,10 @@ test-clang:
# coreutils are needed because of timeout command used in tests. # coreutils are needed because of timeout command used in tests.
EXTRA_PKGS: bc coreutils python3 EXTRA_PKGS: bc coreutils python3
script: script:
- for test in $(ls tests.*.sh); do ./${test} release/bin ${JOBS}; touch release/bin/log_tests.txt; cat release/bin/log_tests.txt; done - cd release
- for test in $(ls */test-alib2*); do ./${test} || exit 1; done
- cd ..
- for test in $(ls tests.*.sh); do ./${test} release/bin ${JOBS} || exit 1; touch release/bin/log_tests.txt; cat release/bin/log_tests.txt; done
stage: test stage: test
   
test-cmake-gcc: test-cmake-gcc:
......
...@@ -47,6 +47,8 @@ set(ALIB_BUILD_FLAGS_COMMON -Wall -pedantic -pipe -Wextra -Werror -Wshadow -Wpoi ...@@ -47,6 +47,8 @@ set(ALIB_BUILD_FLAGS_COMMON -Wall -pedantic -pipe -Wextra -Werror -Wshadow -Wpoi
set(ALIB_BUILD_FLAGS_DEBUG ${{ALIB_BUILD_FLAGS_COMMON}} -Og) set(ALIB_BUILD_FLAGS_DEBUG ${{ALIB_BUILD_FLAGS_COMMON}} -Og)
set(ALIB_BUILD_FLAGS_RELEASE ${{ALIB_BUILD_FLAGS_COMMON}} -O3) set(ALIB_BUILD_FLAGS_RELEASE ${{ALIB_BUILD_FLAGS_COMMON}} -O3)
   
set(CMAKE_EXE_LINKER_FLAGS "${{CMAKE_EXE_LINKER_FLAGS}} -Wl,-no-as-needed")
if (${{CMAKE_CXX_COMPILER_ID}} STREQUAL "Clang") if (${{CMAKE_CXX_COMPILER_ID}} STREQUAL "Clang")
set(ALIB_BUILD_FLAGS_DEBUG ${{ALIB_BUILD_FLAGS_COMMON}} -O0) set(ALIB_BUILD_FLAGS_DEBUG ${{ALIB_BUILD_FLAGS_COMMON}} -O0)
endif () endif ()
......
...@@ -24,6 +24,10 @@ fi ...@@ -24,6 +24,10 @@ fi
   
CXX=clang++ make -j${THREADS} || exit 1 CXX=clang++ make -j${THREADS} || exit 1
   
for test in $(ls */test-alib2*); do \
./${test} || exit 1; \
done
if [ ! -d bin ]; then if [ ! -d bin ]; then
mkdir bin mkdir bin
fi fi
......
...@@ -24,6 +24,10 @@ fi ...@@ -24,6 +24,10 @@ fi
   
CXX=clang++ make -j${THREADS} || exit 1 CXX=clang++ make -j${THREADS} || exit 1
   
for test in $(ls */test-alib2*); do \
./${test} || exit 1; \
done
if [ ! -d bin ]; then if [ ! -d bin ]; then
mkdir bin mkdir bin
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment