File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,6 +62,11 @@ foreach(test ${tests})
6262 "TEST_WORLD_DIR=\" ${CMAKE_CURRENT_SOURCE_DIR } /worlds/\" "
6363 "IGNITION_PHYSICS_RESOURCE_DIR=\" ${IGNITION_PHYSICS_RESOURCE_DIR} \" " )
6464
65+ if (MSVC )
66+ # disable MSVC inherit via dominance warning
67+ target_compile_options (${test} PRIVATE "/wd4250" )
68+ endif ()
69+
6570endforeach ()
6671
6772if (TARGET UNIT_FindFeatures_TEST)
Original file line number Diff line number Diff line change @@ -100,6 +100,11 @@ foreach(test ${tests})
100100 target_compile_definitions (${test} PRIVATE DART_HAS_CONTACT_SURFACE )
101101 endif ()
102102
103+ if (MSVC )
104+ # disable MSVC inherit via dominance warning from DART headers
105+ target_compile_options (${test} PRIVATE "/wd4250" )
106+ endif ()
107+
103108 # Helps when we want to build a single test after making changes to dartsim_plugin
104109 add_dependencies (${test} ${dartsim_plugin} )
105110endforeach ()
Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ if (BUILD_TESTING)
3535
3636 endforeach ()
3737
38+ if (MSVC )
39+ # disable MSVC inherit via dominance warning
40+ target_compile_options (${test} PRIVATE "/wd4250" )
41+ endif ()
42+
3843 endforeach ()
3944endif ()
4045
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ set(versioned ${CMAKE_SHARED_LIBRARY_PREFIX}${tpe_plugin}${CMAKE_SHARED_LIBRARY_
4141set (unversioned ${CMAKE_SHARED_LIBRARY_PREFIX }${PROJECT_NAME_NO_VERSION_LOWER} -${engine_name}${CMAKE_SHARED_LIBRARY_SUFFIX } )
4242if (WIN32 )
4343 # disable MSVC inherit via dominance warning
44- set ( CMAKE_CXX_FLAGS " ${ CMAKE_CXX_FLAGS } /wd4250" )
44+ target_compile_options ( ${tpe_plugin} PUBLIC " /wd4250" )
4545 INSTALL (CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND } -E copy
4646 ${IGNITION_PHYSICS_ENGINE_INSTALL_DIR} \/ ${versioned}
4747 ${IGNITION_PHYSICS_ENGINE_INSTALL_DIR} \/ ${unversioned} )" )
@@ -69,4 +69,9 @@ foreach(test ${tests})
6969 "TEST_WORLD_DIR=\" ${CMAKE_CURRENT_SOURCE_DIR } /worlds/\" "
7070 "IGNITION_PHYSICS_RESOURCE_DIR=\" ${IGNITION_PHYSICS_RESOURCE_DIR} \" " )
7171
72+ if (MSVC )
73+ # disable MSVC inherit via dominance warning
74+ target_compile_options (${test} PRIVATE "/wd4250" )
75+ endif ()
76+
7277endforeach ()
You can’t perform that action at this time.
0 commit comments