Skip to content

Commit 14d15d8

Browse files
committed
ci: fix cmake when CMAKE_BUILD_TYPE is empty string
1 parent bbe8a4c commit 14d15d8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ if(PROJECT_IS_TOP_LEVEL)
1616
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
1717
endif()
1818

19-
if(VISP_DEV OR ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
19+
if(VISP_DEV)
2020
set(VISP_ASSERT "VISP_ASSERT_BREAK")
21-
endif()
22-
if(${CMAKE_BUILD_TYPE} STREQUAL "Release")
23-
set(VISP_ASSERT "VISP_ASSERT_DISABLE")
21+
elseif(CMAKE_BUILD_TYPE)
22+
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
23+
set(VISP_ASSERT "VISP_ASSERT_BREAK")
24+
elseif(${CMAKE_BUILD_TYPE} STREQUAL "Release")
25+
set(VISP_ASSERT "VISP_ASSERT_DISABLE")
26+
endif()
2427
endif()
2528

2629
if(VISP_ASAN)

0 commit comments

Comments
 (0)