Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CMake to generate Makefile and drop manual created Makefile #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build/
31 changes: 27 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ matrix:
include:
- os: linux
compiler: gcc
addons:
apt:
packages:
- cmake
script:
- mkdir -p build
- cd build
- cmake ..
- make

- os: linux
Expand All @@ -15,8 +22,12 @@ matrix:
- gcc-arm-linux-gnueabihf
- libc6-dev-armhf-cross
- qemu-user
- cmake
script:
- CFLAGS="-O2 -mfpu=neon -g -static -DMAXREPEATS=2 -DLATBENCH_COUNT=10000" make
- mkdir -p build
- cd build
- cmake -DCMAKE_C_FLAGS="-O2 -mfpu=neon -g -static -DMAXREPEATS=2 -DLATBENCH_COUNT=10000" ..
- make
- qemu-arm ./tinymembench

- os: linux
Expand All @@ -28,8 +39,12 @@ matrix:
- gcc-aarch64-linux-gnu
- libc6-dev-arm64-cross
- qemu-user
- cmake
script:
- CFLAGS="-O2 -g -static -DMAXREPEATS=2 -DLATBENCH_COUNT=10000" make
- mkdir -p build
- cd build
- cmake -DCMAKE_C_FLAGS="-O2 -g -static -DMAXREPEATS=2 -DLATBENCH_COUNT=10000" ..
- make
- qemu-aarch64 ./tinymembench

- os: linux
Expand All @@ -40,8 +55,12 @@ matrix:
- mingw32
- mingw32-binutils
- mingw32-runtime
- cmake
script:
- CFLAGS="-O2 -g -DMAXREPEATS=2 -DLATBENCH_COUNT=10000" make
- mkdir -p build
- cd build
- cmake -DCMAKE_C_FLAGS="-O2 -g -DMAXREPEATS=2 -DLATBENCH_COUNT=10000" ..
- make
- i586-mingw32msvc-objdump -d ./tinymembench
# Fails because of https://sourceware.org/bugzilla/show_bug.cgi?id=12687
# - wine ./tinymembench
Expand All @@ -56,6 +75,10 @@ matrix:
- gcc-mingw-w64-i686
- gcc-mingw-w64
- wine
- cmake
script:
- CFLAGS="-O2 -g -DMAXREPEATS=2 -DLATBENCH_COUNT=10000" make
- mkdir -p build
- cd build
- cmake -DCMAKE_C_FLAGS="-O2 -g -DMAXREPEATS=2 -DLATBENCH_COUNT=10000" ..
- make
- wine ./tinymembench
22 changes: 22 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
cmake_minimum_required(VERSION 3.0)
project(tinymembench ASM C)
set(CMAKE_C_STANDARD 11)

set(asm_files
aarch64-asm.S
arm-neon.S
mips-32.S
x86-sse2.S
)

set(sources_files
asm-opt.c
main.c
util.c
)

add_executable(tinymembench ${asm_files} ${sources_files})
target_include_directories(tinymembench PRIVATE .)
target_link_libraries(tinymembench m)

INSTALL(TARGETS tinymembench RUNTIME DESTINATION /usr/bin/)
31 changes: 0 additions & 31 deletions Makefile

This file was deleted.