Skip to content

Commit e6097c5

Browse files
authored
Avoid warnings on unused CMAKE_BUILD_TYPE on Windows (#487)
Signed-off-by: Jose Luis Rivero <[email protected]>
1 parent 3509305 commit e6097c5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,3 +227,9 @@ gz_create_docs(
227227
API_MAINPAGE_MD "${CMAKE_BINARY_DIR}/api.md"
228228
TUTORIALS_MAINPAGE_MD "${CMAKE_BINARY_DIR}/tutorials.md"
229229
)
230+
231+
# Workaround to avoid warnings when using CMAKE_BUILD_TYPE in colcon
232+
# to build other projects and gz-cmake together on Windows
233+
if(DEFINED CMAKE_BUILD_TYPE)
234+
set(_dummy_var "${CMAKE_BUILD_TYPE}")
235+
endif()

0 commit comments

Comments
 (0)