@@ -5,6 +5,22 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/source/renderer/
5
5
## Specify the top level name of the project - this will define the solution name for Visual Studio
6
6
project (RRA)
7
7
8
+ # Define version information
9
+ set (RRA_MAJOR_VERSION 1)
10
+ set (RRA_MINOR_VERSION 1)
11
+ if (NOT RRA_BUGFIX_NUMBER)
12
+ set (RRA_BUGFIX_NUMBER 0)
13
+ endif ()
14
+ if (NOT RRA_BUILD_NUMBER)
15
+ set (RRA_BUILD_NUMBER 0)
16
+ endif ()
17
+ string (TIMESTAMP DATE "\" %m/%d/%Y\" " )
18
+ string (TIMESTAMP YEAR "%Y" )
19
+ string (TIMESTAMP YEAR_STRING "\" %Y\" " )
20
+
21
+ configure_file ("${CMAKE_SOURCE_DIR} /Buildinfo.properties.in" "${CMAKE_SOURCE_DIR} /Buildinfo.properties" )
22
+ configure_file ("${CMAKE_SOURCE_DIR} /source/frontend/version.h.in" "${CMAKE_SOURCE_DIR} /source/frontend/version.h" )
23
+
8
24
option (RDF_ENABLE_CXX_BINDINGS "Allow usage of C++ interface for RDF library" ON )
9
25
option (RDF_STATIC "Build RDF as a static library" OFF )
10
26
@@ -19,7 +35,7 @@ IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
19
35
ENDIF ()
20
36
21
37
set (CMAKE_DEBUG_POSTFIX -d)
22
- set (CMAKE_RELEASE_POSTFIX )
38
+ set (CMAKE_RELEASE_POSTFIX )
23
39
24
40
IF (WIN32 )
25
41
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR} /../release)
@@ -50,7 +66,7 @@ IF(WIN32)
50
66
add_link_options (/STACK:16777216)
51
67
ELSEIF (UNIX )
52
68
# Use -Wno-missing-field-initializers for CentOS compiler warning
53
- add_compile_options (-D_LINUX -Wno-missing-field-initializers -Wno-ignored-qualifiers)
69
+ add_compile_options (-D_LINUX -Wno-missing-field-initializers -Wno-ignored-qualifiers -mno-avx2 )
54
70
# Allow executable to be double clicked.
55
71
add_link_options (-no -pie)
56
72
# Use _DEBUG on Unix for Debug Builds (defined automatically on Windows)
@@ -121,18 +137,13 @@ ENDIF(WIN32)
121
137
# This is evaluated at project build time - not at CMake generation time
122
138
set (BUILD_ROOT $<$<CONFIG:debug>:${CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG} >$<$<CONFIG:release>:${CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE} >)
123
139
124
- # Define the option to pass to the sphinx documentation job
125
- set (SPHINX_OPTION public )
126
-
127
- find_program (SPHINX_EXECUTABLE sphinx-build )
128
- if (NOT SPHINX_EXECUTABLE)
129
- message (FATAL_ERROR "SPHINX_EXECUTABLE (sphinx-build) is not found!" )
130
- endif ()
140
+ set (DOCS_OUTPUT_DIR ${BUILD_ROOT} )
131
141
132
142
# group sphinx source files into a sphinx folder
133
143
file (GLOB SPHINX_DOC_FILES ${SPHINX_DOC_FILES} ${CMAKE_SOURCE_DIR} /documentation/source /*.rst)
134
144
set (SPHINX_DOC_MAIN ${CMAKE_SOURCE_DIR} /documentation/source /conf.py)
135
- source_group ("sphinx" FILES ${SPHINX_DOC_FILES} ${SPHINX_DOC_MAIN} )
145
+ set (ALL_SPHINX_FILES ${SPHINX_DOC_FILES} ${SPHINX_DOC_MAIN} )
146
+ source_group ("sphinx" FILES ${ALL_SPHINX_FILES} )
136
147
137
148
# group release documents into a release_docs folder
138
149
set (RELEASE_DOCS_IN_ROOT
@@ -144,33 +155,43 @@ set (RELEASE_DOCS_IN_ROOT
144
155
set (RELEASE_DOCS ${RELEASE_DOCS_IN_ROOT} )
145
156
source_group ("release_docs" FILES ${RELEASE_DOCS} )
146
157
147
- # hang the sphinx build on the conf.py file and specify a dummy output ("sphinx_output")
148
- # this ensures the sphinx docs are built everytime you ask to build the Documentation target
149
- # Sphinx has proper dependency checking, so this works as expected.
150
- # Once built, clean up any unneeded files.
151
- add_custom_target (Documentation SOURCES ${SPHINX_DOC_FILES} ${RELEASE_DOCS} DEPENDS sphinx_output)
152
- add_custom_command (MAIN_DEPENDENCY ${SPHINX_DOC_MAIN} OUTPUT sphinx_output
153
- COMMAND ${CMAKE_COMMAND} -E echo "building Sphinx documentation"
154
- COMMAND ${SPHINX_EXECUTABLE} ${CMAKE_SOURCE_DIR} /documentation/source ${BUILD_ROOT} /docs/help/rra/html/. -t ${SPHINX_OPTION}
155
- COMMAND ${CMAKE_COMMAND} -E remove_directory ${BUILD_ROOT} /docs/help/rra/html/.doctrees
156
- COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT} /docs/help/rra/html/blas_instance_list.html
157
- COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT} /docs/help/rra/html/blas_list.html
158
- COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT} /docs/help/rra/html/blas_properties.html
159
- COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT} /docs/help/rra/html/blas_viewer.html
160
- COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT} /docs/help/rra/html/capture.html
161
- COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT} /docs/help/rra/html/overview.html
162
- COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT} /docs/help/rra/html/settings.html
163
- COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT} /docs/help/rra/html/tlas_instance_list.html
164
- COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT} /docs/help/rra/html/tlas_properties.html
165
- COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT} /docs/help/rra/html/tlas_viewer.html
166
- COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT} /docs/help/rra/html/triangle_list.html
167
- )
158
+ find_program (SPHINX_EXECUTABLE sphinx-build )
159
+ if (SPHINX_EXECUTABLE)
160
+ # Define the option to pass to the sphinx documentation job
161
+ set (SPHINX_OPTION public )
162
+
163
+ # hang the sphinx build on the conf.py file and specify a dummy output ("sphinx_output")
164
+ # this ensures the sphinx docs are built everytime you ask to build the Documentation target
165
+ # Sphinx has proper dependency checking, so this works as expected.
166
+ # Once built, clean up any unneeded files.
167
+ add_custom_target (Documentation ALL SOURCES ${ALL_SPHINX_FILES} ${RELEASE_DOCS} DEPENDS sphinx_output)
168
+ add_custom_command (MAIN_DEPENDENCY ${SPHINX_DOC_MAIN} OUTPUT sphinx_output
169
+ COMMAND ${CMAKE_COMMAND} -E echo "building Sphinx documentation"
170
+ COMMAND ${SPHINX_EXECUTABLE} ${CMAKE_SOURCE_DIR} /documentation/source ${DOCS_OUTPUT_DIR} /docs/help/rra/html/. -t ${SPHINX_OPTION}
171
+ COMMAND ${CMAKE_COMMAND} -E remove_directory ${DOCS_OUTPUT_DIR} /docs/help/rra/html/.doctrees
172
+ COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR} /docs/help/rra/html/blas_instance_list.html
173
+ COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR} /docs/help/rra/html/blas_list.html
174
+ COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR} /docs/help/rra/html/blas_properties.html
175
+ COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR} /docs/help/rra/html/blas_viewer.html
176
+ COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR} /docs/help/rra/html/capture.html
177
+ COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR} /docs/help/rra/html/overview.html
178
+ COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR} /docs/help/rra/html/settings.html
179
+ COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR} /docs/help/rra/html/tlas_instance_list.html
180
+ COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR} /docs/help/rra/html/tlas_properties.html
181
+ COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR} /docs/help/rra/html/tlas_viewer.html
182
+ COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR} /docs/help/rra/html/triangle_list.html
183
+ )
184
+ else ()
185
+ message (WARNING "SPHINX_EXECUTABLE (sphinx-build) is not found! Documentation will not be built!" )
186
+ # If the sphinx binary isn't found, then just create the Documentation project with only the release docs in it.
187
+ add_custom_target (Documentation ALL SOURCES ${ALL_SPHINX_FILES} ${RELEASE_DOCS} )
188
+ endif ()
168
189
169
190
add_custom_command (TARGET Documentation POST_BUILD
170
191
COMMAND ${CMAKE_COMMAND} -E echo "copying Documentation to output directory"
171
- COMMAND ${CMAKE_COMMAND} -E make_directory ${BUILD_ROOT } /docs
172
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${RELEASE_DOCS_IN_ROOT} ${BUILD_ROOT } /.
192
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${DOCS_OUTPUT_DIR } /docs
193
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${RELEASE_DOCS_IN_ROOT} ${DOCS_OUTPUT_DIR } /.
173
194
COMMAND ${CMAKE_COMMAND} -E echo "copying Samples to output directory"
174
- COMMAND ${CMAKE_COMMAND} -E make_directory ${BUILD_ROOT } /samples
175
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR} /samples/landscape.rra ${BUILD_ROOT } /samples/sample_trace.rra
195
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${DOCS_OUTPUT_DIR } /samples
196
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR} /samples/landscape.rra ${DOCS_OUTPUT_DIR } /samples/sample_trace.rra
176
197
)
0 commit comments