-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCMakeLists.txt
32 lines (25 loc) · 1.13 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright 2013 A. Douglas Gale
# Permission is granted to use the fastcoroutine implementation
# for any use (including commercial use), provided this copyright
# notice is present in the product source code.
cmake_minimum_required(VERSION 2.8)
project(fastcoroutine)
message("SystemProcessor=${CMAKE_SYSTEM_PROCESSOR}")
enable_language(ASM)
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,--msyntax=att -g")
set(CMAKE_LINK_FLAGS "${CMAKE_LINK_FLAGS} -g")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_RELEASE} -O2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_DEBUG} -O0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mtune=corei7")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=core2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
# Library
add_library(fastcoroutine STATIC fastcoroutine.cpp csasm.S)
# Tests
add_executable(fastcoroutine_tests tests.cpp)
target_link_libraries(fastcoroutine_tests fastcoroutine)
add_test(fastcoroutine_tests fastcoroutine_tests)