File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
libs/EXTERNAL/libsdcparse Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ project("libsdcparse")
7
7
if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR} )
8
8
#Only set compiler settings if we are not a sub-project
9
9
set (WARN_FLAGS "-Wall -Wextra -Wpedantic -Wcast-qual -Wcast-align -Wshadow -Wformat=2 -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wredundant-decls -Wswitch-default -Wundef -Wunused-variable -Wdisabled-optimization -Wnoexcept -Woverloaded-virtual -Wctor-dtor-privacy -Wnon-virtual-dtor" )
10
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 ${WARN_FLAGS} " )
10
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++14 ${WARN_FLAGS} " )
11
11
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fsanitize=leak -fsanitize=undefined")
12
12
set (FLEX_BISON_WARN_SUPPRESS_FLAGS "-Wno-switch-default -Wno-unused-parameter -Wno-missing-declarations" )
13
13
endif ()
@@ -53,4 +53,17 @@ set_target_properties(libsdcparse PROPERTIES PREFIX "") #Avoid extra 'lib' prefi
53
53
add_executable (sdcparse_test src/main.cpp )
54
54
target_link_libraries (sdcparse_test libsdcparse )
55
55
56
+ #Suppress IPO link warnings
57
+ get_target_property (USES_IPO sdcparse_test INTERPROCEDURAL_OPTIMIZATION )
58
+ if (USES_IPO )
59
+ set (IPO_LINK_WARN_FLAGS_TO_CHECK "-Wno-null-dereference" )
60
+ foreach (flag ${IPO_LINK_WARN_FLAGS_TO_CHECK} )
61
+ CHECK_CXX_COMPILER_FLAG (${flag} CXX_COMPILER_SUPPORTS_${flag} )
62
+ if (CXX_COMPILER_SUPPORTS_${flag} )
63
+ #Flag supported, so enable it
64
+ set_target_properties (sdcparse_test PROPERTIES LINK_FLAGS ${flag} )
65
+ endif ()
66
+ endforeach ()
67
+ endif ()
68
+
56
69
install (TARGETS libsdcparse sdcparse_test DESTINATION bin )
You can’t perform that action at this time.
0 commit comments