Skip to content

Commit e688cf7

Browse files
committed
Consistent CMake build type
1 parent eebd432 commit e688cf7

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

devel-tools/build_test_library.cmake

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,14 @@ if(DEFINED ENV{CCACHE})
8080
set(DEFINE_CXX_CCACHE "-DCMAKE_CXX_COMPILER_LAUNCHER=$ENV{CCACHE}")
8181
endif()
8282

83-
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
84-
set(DEFINE_CMAKE_BUILD_TYPE "-DCMAKE_BUILD_TYPE=RelWithDebinfo")
85-
endif()
83+
set(CMAKE_BUILD_TYPE "RelWithDebinfo")
8684

8785
execute_process(
8886
COMMAND ${CMAKE_COMMAND}
8987
-S cmake
9088
-B ${BUILD_DIR}
9189
-D COLVARS_DEBUG=${COLVARS_DEBUG}
92-
${DEFINE_CMAKE_BUILD_TYPE}
90+
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
9391
-D BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
9492
-D WARNINGS_ARE_ERRORS=ON
9593
-D CMAKE_VERBOSE_MAKEFILE=ON
@@ -120,7 +118,7 @@ if(NOT result EQUAL 0)
120118
message(FATAL_ERROR "Error building library.")
121119
else()
122120
execute_process(
123-
COMMAND ${CMAKE_CTEST_COMMAND} -C Debug
121+
COMMAND ${CMAKE_CTEST_COMMAND} -C ${CMAKE_BUILD_TYPE}
124122
WORKING_DIRECTORY ${BUILD_DIR}
125123
RESULT_VARIABLE result
126124
)

0 commit comments

Comments
 (0)