Skip to content

Commit ebbae40

Browse files
committed
Reverse ASM mode for Linux
1 parent 590ea4a commit ebbae40

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,16 @@
2525
#
2626

2727
cmake_minimum_required(VERSION 2.8)
28-
project(native ASM C CXX)
28+
project(native C CXX)
29+
30+
# Only enable GNU Assembly for Linux amd64
31+
# Please careful when you would like to optimize any function in ASM
32+
# ASM implementation must be GNU Assembly for Linux amd x64
33+
# C implementation must be implemented first for __APPLE__
34+
# Keep human readable for __APPLE__ - no need to optimize for testing
35+
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
36+
enable_language(ASM)
37+
endif ()
2938

3039
# Enable runtime search path support for dynamic libraries on OSX
3140
if (APPLE)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ $ ./native
9090
To test third parties we need to setup a server to mock http request from them.
9191
By running `make server`, it will serve in http://localhost:9999. You will see `Hi guys!` in there.
9292
Please keep this terminal running during your development.
93-
```bash
93+
```bash
9494
$ make server
9595
```
9696

0 commit comments

Comments
 (0)