-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
46 lines (40 loc) · 1.6 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
cmake_minimum_required (VERSION 2.8.6)
find_package(Java)
project(MSMB Java)
include(UseJava)
include(JarHelperMSMB.cmake)
# the java source files
set(SRC
${MSMB_SOURCE_DIR}/src/msmb/gui/*.java
${MSMB_SOURCE_DIR}/src/msmb/model/*.java
${MSMB_SOURCE_DIR}/src/msmb/commonUtilities/*.java
${MSMB_SOURCE_DIR}/src/msmb/commonUtilities/tables/*.java
${MSMB_SOURCE_DIR}/src/msmb/debugTab/*.java
${MSMB_SOURCE_DIR}/src/msmb/testing/*.java
${MSMB_SOURCE_DIR}/src/msmb/utility/*.java
${MSMB_SOURCE_DIR}/src/msmb/parsers/chemicalReaction/*.java
${MSMB_SOURCE_DIR}/src/msmb/parsers/chemicalReaction/syntaxtree/*.java
${MSMB_SOURCE_DIR}/src/msmb/parsers/chemicalReaction/visitor/*.java
${MSMB_SOURCE_DIR}/src/msmb/parsers/mathExpression/*.java
${MSMB_SOURCE_DIR}/src/msmb/parsers/mathExpression/syntaxtree/*.java
${MSMB_SOURCE_DIR}/src/msmb/parsers/mathExpression/visitor/*.java
${MSMB_SOURCE_DIR}/src/msmb/parsers/multistateSpecies/*.java
${MSMB_SOURCE_DIR}/src/msmb/parsers/multistateSpecies/syntaxtree/*.java
${MSMB_SOURCE_DIR}/src/msmb/parsers/multistateSpecies/visitor/*.java
${MSMB_SOURCE_DIR}/src/msmb/runManager/*.java
)
#git describe --always --> short id of last commit
#git rev-parse HEAD --> long id of last commit
set (git_cmd "git")
set (git_arg1 "describe")
set (git_arg2 "--tags")
execute_process(COMMAND ${git_cmd} ${git_arg1} ${git_arg2}
WORKING_DIRECTORY ${MSMB_SOURCE_DIR}
RESULT_VARIABLE git_result
OUTPUT_VARIABLE git_ver
)
file(WRITE version.txt "commit=${git_ver}\n")
file(APPEND version.txt "major=2\n")
file(APPEND version.txt "minor=0\n")
# create an executable jar
create_jar(JCMSMB ${SRC})