-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
89 lines (78 loc) · 3.22 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#___________________________________________________________________________________________________
#
# autor: Pedro Guarderas
# email: pedro.felipe.guarderas@gmail.com
# date: 11-05-2013
# file: CMakeLists.txt
#
# This program is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software Foundation;
# either version 2 of the License, or (at your option) any later version.
#___________________________________________________________________________________________________
#
#___________________________________________________________________________________________________
# Project definition
cmake_minimum_required( VERSION 3.0 )
set( CMAKE_MODULE_PATH
${CMAKE_CURRENT_SOURCE_DIR}/cmake
${CMAKE_MODULE_PATH} )
include( CMakeForceCompiler )
set( CMAKE_SYSTEM_NAME Generic )
#___________________________________________________________________________________________________
# Find LLVM
# find_package( LLVM )
#
# if( LLVM_FOUND )
# set( CMAKE_C_COMPILER ${CLANG} )
# set( CMAKE_C_FLAGS "-Wall")
# set( CMAKE_C_FLAGS_DEBUG "-g")
# set( CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG")
# set( CMAKE_C_FLAGS_RELEASE "-O4 -DNDEBUG")
# set( CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
#
# set( CMAKE_CXX_COMPILER ${CLANG_PLUS} )
# set( CMAKE_CXX_FLAGS "-Wall -std=c++11")
# set( CMAKE_CXX_FLAGS_DEBUG "-g")
# set( CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
# set( CMAKE_CXX_FLAGS_RELEASE "-O4 -DNDEBUG")
# set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
#
# set( CMAKE_AR "/usr/bin/llvm-ar" )
# set( CMAKE_LINKER "/usr/bin/llvm-ld" )
# set( CMAKE_RANLIB "/usr/bin/llvm-ranlib" )
# set( CMAKE_NM "/usr/bin/llvm-nm" )
# set( CMAKE_OBJDUMP "/usr/bin/llvm-objdump" )
# #set(CMAKE_C_LINKER ${LLVM_LD} )
# #set(CMAKE_CXX_LINKER ${LLVM_LD} )
#
# #set(CMAKE_C_LINK_EXECUTABLE "/usr/bin/llvm-ld <OBJECTS> -o <TARGET> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>")
# #set(CMAKE_CXX_LINK_EXECUTABLE "/usr/bin/llvm-ld <OBJECTS> -o <TARGET> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>")
#
# else( LLVM_FOUND )
# message( SEND_ERROR "LLVM don't work" )
# endif( LLVM_FOUND )
project( cag )
set( CMAKE_COLOR_MAKEFILE ON )
#CMAKE_FORCE_C_COMPILER ( /usr/bin/clang clang )
#CMAKE_FORCE_CXX_COMPILER ( /usr/bin/clang++ clang_plus )
#___________________________________________________________________________________________________
# Windows configuration
if( WIN32 )
if( MSVC )
add_definitions( "-DGUI_EXPORT=__declspec(dllimport)" )
add_definitions( "-DCORE_EXPORT=__declspec(dllimport)" )
else( MSVC )
add_definitions( "\"-DGUI_EXPORT=__declspec(dllimport)\"" )
add_definitions( "\"-DCORE_EXPORT=__declspec(dllimport)\"" )
endif( MSVC )
else( WIN32 )
add_definitions( -DGUI_EXPORT= )
add_definitions( -DCORE_EXPORT= )
endif( WIN32 )
if( CMAKE_BUILD_TYPE MATCHES Debug )
add_definitions( -DpolynomeDEBUG=1 )
endif( CMAKE_BUILD_TYPE MATCHES Debug )
add_definitions( -std=c++11 )
#___________________________________________________________________________________________________
# Include Subdirectories
subdirs( src test )