File tree Expand file tree Collapse file tree 6 files changed +49
-1
lines changed Expand file tree Collapse file tree 6 files changed +49
-1
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,19 @@ foreach(flag ${FLEX_BISON_WARN_SUPPRESS_FLAGS_TO_CHECK})
184
184
endif ()
185
185
endforeach ()
186
186
187
+ #Suppress IPO link warnings
188
+ set (IPO_LINK_WARN_SUPRESS_FLAGS "" )
189
+ set (IPO_LINK_WARN_SUPRESS_FLAGS_TO_CHECK
190
+ "-Wno-null-dereference"
191
+ )
192
+ foreach (flag ${IPO_LINK_WARN_SUPRESS_FLAGS_TO_CHECK} )
193
+ CHECK_CXX_COMPILER_FLAG (${flag} CXX_COMPILER_SUPPORTS_${flag} )
194
+ if (CXX_COMPILER_SUPPORTS_${flag} )
195
+ #Flag supported, so enable it
196
+ set (IPO_LINK_WARN_SUPRESS_FLAGS "${IPO_LINK_WARN_SUPRESS_FLAGS} ${flag} " )
197
+ endif ()
198
+ endforeach ()
199
+
187
200
#
188
201
# Sanitizer flags
189
202
#
Original file line number Diff line number Diff line change @@ -135,5 +135,10 @@ add_executable(odin_II ${EXEC_SOURCES})
135
135
target_link_libraries (odin_II
136
136
libodin_ii )
137
137
138
+ #Supress IPO link warnings if IPO is enabled
139
+ get_target_property (ODIN_USES_IPO odin_II INTERPROCEDURAL_OPTIMIZATION )
140
+ if (ODIN_USES_IPO )
141
+ set_target_properties (odin_II PROPERTIES LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS} )
142
+ endif ()
138
143
139
144
install (TARGETS odin_II libodin_ii DESTINATION bin )
Original file line number Diff line number Diff line change @@ -20,6 +20,6 @@ set(PUGIXML_SUPPRESS_FLAGS -w)
20
20
target_compile_options (libpugixml PRIVATE ${PUGIXML_SUPPRESS_FLAGS} )
21
21
22
22
#Enable compact mode which reduces memory usage.
23
- add_definitions ( -DPUGIXML_COMPACT )
23
+ target_compile_definitions ( libpugixml PRIVATE PUGIXML_COMPACT )
24
24
25
25
install (TARGETS libpugixml DESTINATION bin )
Original file line number Diff line number Diff line change @@ -27,4 +27,10 @@ target_link_libraries(libarchfpga
27
27
add_executable (read_arch ${EXEC_SOURCES} )
28
28
target_link_libraries (read_arch libarchfpga )
29
29
30
+ #Supress IPO link warnings if IPO is enabled
31
+ get_target_property (READ_ARCH_USES_IPO read_arch INTERPROCEDURAL_OPTIMIZATION )
32
+ if (READ_ARCH_USES_IPO )
33
+ set_target_properties (read_arch PROPERTIES LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS} )
34
+ endif ()
35
+
30
36
install (TARGETS libarchfpga read_arch DESTINATION bin )
Original file line number Diff line number Diff line change @@ -28,6 +28,12 @@ target_link_libraries(fasm
28
28
add_executable (genfasm src/main.cpp )
29
29
target_link_libraries (genfasm fasm )
30
30
31
+ #Supress IPO link warnings if IPO is enabled
32
+ get_target_property (GENFASM_USES_IPO genfasm INTERPROCEDURAL_OPTIMIZATION )
33
+ if (GENFASM_USES_IPO )
34
+ set_target_properties (genfasm PROPERTIES LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS} )
35
+ endif ()
36
+
31
37
#Specify link-time dependancies
32
38
install (TARGETS genfasm DESTINATION bin )
33
39
@@ -44,6 +50,12 @@ set(TEST_SOURCES
44
50
add_executable (test_fasm ${TEST_SOURCES} )
45
51
target_link_libraries (test_fasm fasm libcatch )
46
52
53
+ #Supress IPO link warnings if IPO is enabled
54
+ get_target_property (TEST_FASM_USES_IPO test_fasm INTERPROCEDURAL_OPTIMIZATION )
55
+ if (TEST_FASM_USES_IPO )
56
+ set_target_properties (test_fasm PROPERTIES LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS} )
57
+ endif ()
58
+
47
59
add_test (
48
60
NAME test_fasm
49
61
COMMAND test_fasm --use-colour=yes
Original file line number Diff line number Diff line change @@ -48,6 +48,12 @@ add_executable(vpr ${EXEC_SOURCES})
48
48
target_link_libraries (vpr
49
49
libvpr )
50
50
51
+ #Supress IPO link warnings if IPO is enabled
52
+ get_target_property (VPR_USES_IPO vpr INTERPROCEDURAL_OPTIMIZATION )
53
+ if (VPR_USES_IPO )
54
+ set_target_properties (vpr PROPERTIES LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS} )
55
+ endif ()
56
+
51
57
#
52
58
# Profile Guilded Optimization Configuration
53
59
#
@@ -148,6 +154,12 @@ target_link_libraries(test_vpr
148
154
libcatch
149
155
libvpr )
150
156
157
+ #Supress IPO link warnings if IPO is enabled
158
+ get_target_property (TEST_VPR_USES_IPO vpr INTERPROCEDURAL_OPTIMIZATION )
159
+ if (TEST_VPR_USES_IPO )
160
+ set_target_properties (test_vpr PROPERTIES LINK_FLAGS ${IPO_LINK_WARN_SUPRESS_FLAGS} )
161
+ endif ()
162
+
151
163
add_test (NAME test_vpr
152
164
COMMAND test_vpr --use-colour=yes
153
165
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} /test
You can’t perform that action at this time.
0 commit comments