File tree Expand file tree Collapse file tree 3 files changed +27
-6
lines changed Expand file tree Collapse file tree 3 files changed +27
-6
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ override CMAKE_PARAMS := -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) -G 'Unix Makefil
33
33
# Are we doing a strict (i.e. warnings as errors) build?
34
34
ifneq (,$(findstring strict,$(BUILD_TYPE ) ) )
35
35
# Configure for strict build with VPR warning treated as errors
36
- override CMAKE_PARAMS := -DVPR_COMPILE_OPTIONS =strict ${CMAKE_PARAMS}
36
+ override CMAKE_PARAMS := -DVTR_COMPILE_OPTIONS =strict ${CMAKE_PARAMS}
37
37
endif # Strict build type
38
38
39
39
# -s : Suppresss makefile output (e.g. entering/leaving directories)
Original file line number Diff line number Diff line change @@ -2,6 +2,12 @@ cmake_minimum_required(VERSION 3.9)
2
2
3
3
project ("ODIN_II" )
4
4
5
+ #
6
+ # ODIN_II Build Options
7
+ #
8
+ set (VTR_COMPILE_OPTIONS "none" CACHE STRING "Specify whether ODIN_II uses strict compiling options, e.g. -Werror" )
9
+ set (CACHE VTR_COMPILE_OPTIONS PROPERTY STRING strict none )
10
+
5
11
if (ODIN_DEBUG )
6
12
7
13
message ("*** Compiling with Odin debug flags" )
@@ -112,7 +118,7 @@ add_library(libodin_ii STATIC
112
118
${LIB_HEADERS_H}
113
119
${LIB_HEADERS_HPP}
114
120
${LIB_SOURCES}
115
- ${FLEX_VerilogLexer_OUTPUTS}
121
+ ${FLEX_VerilogLexer_OUTPUTS}
116
122
${BISON_VerilogParser_OUTPUT_SOURCE} )
117
123
118
124
target_include_directories (libodin_ii PUBLIC ${LIB_INCLUDE_DIRS} )
@@ -164,4 +170,19 @@ if (ODIN_USES_IPO)
164
170
set_target_properties (odin_II PROPERTIES LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS} )
165
171
endif ()
166
172
173
+ set (ODIN_COMPILE_OPTIONS_FLAGS
174
+ #GCC-like
175
+ "-Werror"
176
+ )
177
+
178
+ #add strict odin compiler flags, if set
179
+ if (VTR_COMPILE_OPTIONS STREQUAL "strict" )
180
+ message (STATUS "ODIN_II: building with strict flags" )
181
+ foreach (ODIN_FLAG ${ODIN_COMPILE_OPTIONS_FLAGS} )
182
+ message (STATUS "\t Adding CXX flag: ${ODIN_FLAG} " )
183
+ target_compile_options (libodin_ii PRIVATE ${ODIN_FLAG} )
184
+ target_compile_options (odin_II PRIVATE ${ODIN_FLAG} )
185
+ endforeach ()
186
+ endif ()
187
+
167
188
install (TARGETS odin_II libodin_ii DESTINATION bin )
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ project("vpr")
5
5
#
6
6
# VPR Build Options
7
7
#
8
- set (VPR_COMPILE_OPTIONS "none" CACHE STRING "Specify whether vpr uses strict compiling options, e.g. -Werror" )
9
- set (CACHE VPR_COMPILE_OPTIONS PROPERTY STRING strict none )
8
+ set (VTR_COMPILE_OPTIONS "none" CACHE STRING "Specify whether vpr uses strict compiling options, e.g. -Werror" )
9
+ set (CACHE VTR_COMPILE_OPTIONS PROPERTY STRING strict none )
10
10
11
11
set (VPR_EXECUTION_ENGINE "auto" CACHE STRING "Specify the framework for (potential) parallel execution" )
12
12
set_property (CACHE VPR_EXECUTION_ENGINE PROPERTY STRINGS auto serial tbb )
@@ -68,7 +68,7 @@ target_link_libraries(libvpr
68
68
69
69
#link graphics library only when graphics set to on
70
70
if (VPR_USE_EZGL STREQUAL "on" )
71
- target_link_libraries (libvpr
71
+ target_link_libraries (libvpr
72
72
ezgl )
73
73
74
74
compile_gresources (
@@ -164,7 +164,7 @@ else()
164
164
message (ERROR "Unsupported VPR_PGO_CONFIG '${VPR_PGO_CONFIG} '" )
165
165
endif ()
166
166
167
- if (VPR_COMPILE_OPTIONS STREQUAL "strict" )
167
+ if (VTR_COMPILE_OPTIONS STREQUAL "strict" )
168
168
message (STATUS "VPR: building with strict flags" )
169
169
foreach (flag ${VPR_COMPILE_OPTIONS_FLAGS} )
170
170
message (STATUS "\t Adding CXX flag: ${flag} " )
You can’t perform that action at this time.
0 commit comments