File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -63,13 +63,16 @@ if (NOT ${git_build_exit_status} MATCHES "0")
6363 set (GIT_BUILD "unknown-build-number" )
6464endif ()
6565
66- if (NOT ${GIT_BUILD} MATCHES "0 " )
66+ if (NOT ${GIT_BUILD} MATCHES "^0$ " )
6767 set (CSEVRSN_META "+${GIT_BRANCH} .${GIT_SHA} .${GIT_BUILD} " )
6868else ()
6969 set (CSEVRSN_META "" )
7070endif ()
7171
72+ message ("Building CSE ${CSEVRSN_MAJOR} .${CSEVRSN_MINOR} .${CSEVRSN_PATCH}${CSEVRSN_META} " )
73+
7274configure_file (
7375 "${PROJECT_SOURCE_DIR} /src/csevrsn.h.in"
7476 "${PROJECT_SOURCE_DIR} /src/csevrsn.h"
7577)
78+
Original file line number Diff line number Diff line change 22add_subdirectory (RCDEF)
33
44# Run C Preprocessor on *.DEF files
5+ set (defs
6+ CNDTYPES.DEF
7+ CNUNITS.DEF
8+ DTLIMS.DEF
9+ CNFIELDS.DEF
10+ CNRECS.DEF
11+ )
12+
513macro (c_preprocess file)
614 add_custom_command (
715 OUTPUT "${file} .i"
@@ -10,11 +18,10 @@ macro(c_preprocess file)
1018 )
1119endmacro ()
1220
13- c_preprocess(cndtypes)
14- c_preprocess(cnunits)
15- c_preprocess(dtlims)
16- c_preprocess(cnfields)
17- c_preprocess(cnrecs)
21+ foreach (defFile ${defs} )
22+ string (REGEX REPLACE "^(\\ w).DEF$" "\\ 1" file "${defFile} " )
23+ c_preprocess(${file} )
24+ endforeach ()
1825
1926# Run RCDEF
2027add_custom_command (
@@ -220,6 +227,7 @@ set(libs
220227
221228source_group ("Source Files" FILES ${source} )
222229source_group ("Header Files" FILES ${headers} )
230+ source_group ("Def Files" FILES ${defs} )
223231
224232target_link_libraries (CSE ${libs} )
225233
You can’t perform that action at this time.
0 commit comments