This repository has been archived by the owner on Mar 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCMakeLists.txt
39 lines (34 loc) · 1.98 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
33
34
35
36
37
38
cmake_minimum_required(VERSION 2.6)
project(PluginParameters)
set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
include_directories(${CMAKE_SOURCE_DIR}/include)
include_directories(${CMAKE_SOURCE_DIR}/include/tinythread)
include_directories(${CMAKE_SOURCE_DIR}/include/readerwriterqueue)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
add_definitions(-DLINUX=1)
set(CMAKE_C_FLAGS "-fmessage-length=0 -m32 -pipe -Wno-trigraphs -std=c99 -O3 -Wmissing-field-initializers -Wall -Wreturn-type -Wunused-variable -pedantic -Wshadow -Wsign-compare -D__cdecl=\"\" -D_POSIX_C_SOURCE=200809L")
set(CMAKE_CXX_FLAGS "-fmessage-length=0 -m32 -pipe -Wno-trigraphs -std=c++11 -O3 -Wmissing-field-initializers -Wall -Wreturn-type -Wunused-variable -pedantic -Wshadow -Wsign-compare -D__cdecl=\"\"")
set(CMAKE_EXE_LINKER_FLAGS "-m32")
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_C_COMPILER "clang")
set(CMAKE_CXX_COMPILER "clang++")
add_definitions(-DMACOSX=1)
set(CMAKE_C_FLAGS "-arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -std=c99 -Wmissing-field-initializers -Wall -Wmissing-prototypes -Wreturn-type -Wunused-variable -pedantic -Wshadow -Wsign-compare -Wnewline-eof -Wshorten-64-to-32 -fasm-blocks -mmacosx-version-min=10.7")
set(CMAKE_CXX_FLAGS "-arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -stdlib=libc++ -std=c++11 -Wmissing-field-initializers -Wall -Wmissing-prototypes -Wreturn-type -Wunused-variable -pedantic -Wshadow -Wsign-compare -Wnewline-eof -Wshorten-64-to-32 -fasm-blocks -mmacosx-version-min=10.7")
set(CMAKE_EXE_LINKER_FLAGS "-arch i386 -framework Carbon -framework CoreFoundation")
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
add_definitions(/DWIN32=1)
set(CMAKE_C_FLAGS "")
# /EHsc is needed
set(CMAKE_CXX_FLAGS "/EHsc")
endif()
if("${UNIX}")
if(CMAKE_BUILD_TYPE MATCHES "Debug")
add_definitions("-O0")
add_definitions("-g")
add_definitions("-DDEBUG=1")
else()
add_definitions("-O2")
endif()
endif("${UNIX}")
add_subdirectory(test)