CMakeLists.txt

Tue, 22 Jul 2014 04:40:33 +0300

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Tue, 22 Jul 2014 04:40:33 +0300
changeset 137
73d057b030d0
parent 136
1c40bb4f8221
child 139
cf11621ae422
permissions
-rw-r--r--

- a bit more refactoring, adjusted the main commandline interface

82
841562f5a32f - added the public-domain updaterevision so I can have access to git stuff
Teemu Piippo <crimsondusk64@gmail.com>
parents: 75
diff changeset
1 cmake_minimum_required (VERSION 2.8)
841562f5a32f - added the public-domain updaterevision so I can have access to git stuff
Teemu Piippo <crimsondusk64@gmail.com>
parents: 75
diff changeset
2
109
6572803cd0ca - added named enumerations to botc source, this should help with debugging
Teemu Piippo <crimsondusk64@gmail.com>
parents: 105
diff changeset
3 set (BOTC_HEADERS
119
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
4 src/botStuff.h
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
5 src/commands.h
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
6 src/list.h
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
7 src/dataBuffer.h
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
8 src/events.h
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
9 src/expression.h
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
10 src/format.h
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
11 src/lexer.h
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
12 src/lexerScanner.h
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
13 src/macros.h
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
14 src/main.h
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
15 src/parser.h
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
16 src/property.h
135
8b9132fea327 - massive refactoring continues (doesn't compile yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents: 120
diff changeset
17 src/stringClass.h
119
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
18 src/stringTable.h
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
19 src/tokens.h
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
20 src/types.h
109
6572803cd0ca - added named enumerations to botc source, this should help with debugging
Teemu Piippo <crimsondusk64@gmail.com>
parents: 105
diff changeset
21 )
6572803cd0ca - added named enumerations to botc source, this should help with debugging
Teemu Piippo <crimsondusk64@gmail.com>
parents: 105
diff changeset
22
6572803cd0ca - added named enumerations to botc source, this should help with debugging
Teemu Piippo <crimsondusk64@gmail.com>
parents: 105
diff changeset
23 set (BOTC_SOURCES
119
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
24 src/commands.cpp
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
25 src/dataBuffer.cpp
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
26 src/events.cpp
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
27 src/expression.cpp
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
28 src/format.cpp
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
29 src/lexer.cpp
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
30 src/lexerScanner.cpp
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
31 src/main.cpp
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
32 src/parser.cpp
135
8b9132fea327 - massive refactoring continues (doesn't compile yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents: 120
diff changeset
33 src/stringClass.cpp
119
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
34 src/stringTable.cpp
72
03e4d9db3fd9 - major refactoring begins
Teemu Piippo <crimsondusk64@gmail.com>
parents: 71
diff changeset
35 )
03e4d9db3fd9 - major refactoring begins
Teemu Piippo <crimsondusk64@gmail.com>
parents: 71
diff changeset
36
109
6572803cd0ca - added named enumerations to botc source, this should help with debugging
Teemu Piippo <crimsondusk64@gmail.com>
parents: 105
diff changeset
37 add_subdirectory (updaterevision)
6572803cd0ca - added named enumerations to botc source, this should help with debugging
Teemu Piippo <crimsondusk64@gmail.com>
parents: 105
diff changeset
38 add_subdirectory (namedenums)
82
841562f5a32f - added the public-domain updaterevision so I can have access to git stuff
Teemu Piippo <crimsondusk64@gmail.com>
parents: 75
diff changeset
39 get_target_property (UPDATEREVISION_EXE updaterevision LOCATION)
135
8b9132fea327 - massive refactoring continues (doesn't compile yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents: 120
diff changeset
40 get_target_property (NAMEDENUMS_EXE namedenums LOCATION)
82
841562f5a32f - added the public-domain updaterevision so I can have access to git stuff
Teemu Piippo <crimsondusk64@gmail.com>
parents: 75
diff changeset
41
841562f5a32f - added the public-domain updaterevision so I can have access to git stuff
Teemu Piippo <crimsondusk64@gmail.com>
parents: 75
diff changeset
42 add_custom_target (revision_check ALL
135
8b9132fea327 - massive refactoring continues (doesn't compile yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents: 120
diff changeset
43 COMMAND ${UPDATEREVISION_EXE} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}/hginfo.h
82
841562f5a32f - added the public-domain updaterevision so I can have access to git stuff
Teemu Piippo <crimsondusk64@gmail.com>
parents: 75
diff changeset
44 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
841562f5a32f - added the public-domain updaterevision so I can have access to git stuff
Teemu Piippo <crimsondusk64@gmail.com>
parents: 75
diff changeset
45 DEPENDS updaterevision)
841562f5a32f - added the public-domain updaterevision so I can have access to git stuff
Teemu Piippo <crimsondusk64@gmail.com>
parents: 75
diff changeset
46
135
8b9132fea327 - massive refactoring continues (doesn't compile yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents: 120
diff changeset
47 add_custom_target (enumstrings ALL
8b9132fea327 - massive refactoring continues (doesn't compile yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents: 120
diff changeset
48 COMMAND ${NAMEDENUMS_EXE} ${BOTC_HEADERS}
8b9132fea327 - massive refactoring continues (doesn't compile yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents: 120
diff changeset
49 ${CMAKE_BINARY_DIR}/enumstrings.h
8b9132fea327 - massive refactoring continues (doesn't compile yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents: 120
diff changeset
50 ${CMAKE_BINARY_DIR}/enumstrings.cpp
109
6572803cd0ca - added named enumerations to botc source, this should help with debugging
Teemu Piippo <crimsondusk64@gmail.com>
parents: 105
diff changeset
51 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
6572803cd0ca - added named enumerations to botc source, this should help with debugging
Teemu Piippo <crimsondusk64@gmail.com>
parents: 105
diff changeset
52 DEPENDS namedenums)
6572803cd0ca - added named enumerations to botc source, this should help with debugging
Teemu Piippo <crimsondusk64@gmail.com>
parents: 105
diff changeset
53
135
8b9132fea327 - massive refactoring continues (doesn't compile yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents: 120
diff changeset
54 add_executable (botc ${BOTC_SOURCES} ${CMAKE_BINARY_DIR}/enumstrings.cpp)
8b9132fea327 - massive refactoring continues (doesn't compile yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents: 120
diff changeset
55 add_dependencies (botc revision_check enumstrings)
8b9132fea327 - massive refactoring continues (doesn't compile yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents: 120
diff changeset
56 include_directories (${CMAKE_BINARY_DIR})
8b9132fea327 - massive refactoring continues (doesn't compile yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents: 120
diff changeset
57 include_directories (${CMAKE_SOURCE_DIR}/src)
82
841562f5a32f - added the public-domain updaterevision so I can have access to git stuff
Teemu Piippo <crimsondusk64@gmail.com>
parents: 75
diff changeset
58
135
8b9132fea327 - massive refactoring continues (doesn't compile yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents: 120
diff changeset
59 if (NOT MSVC)
136
1c40bb4f8221 - major refactoring pretty much done, compiles now
Teemu Piippo <crimsondusk64@gmail.com>
parents: 135
diff changeset
60 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -W -Wall -Og")
135
8b9132fea327 - massive refactoring continues (doesn't compile yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents: 120
diff changeset
61
136
1c40bb4f8221 - major refactoring pretty much done, compiles now
Teemu Piippo <crimsondusk64@gmail.com>
parents: 135
diff changeset
62 if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
135
8b9132fea327 - massive refactoring continues (doesn't compile yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents: 120
diff changeset
63 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG")
8b9132fea327 - massive refactoring continues (doesn't compile yet)
Teemu Piippo <crimsondusk64@gmail.com>
parents: 120
diff changeset
64 endif()
119
bdf8d46c145f - renamed source files to camelCase
Teemu Piippo <crimsondusk64@gmail.com>
parents: 109
diff changeset
65 endif()

mercurial