Skip to content

Commit

Permalink
Fix linking boost nowide on MSVC in RelWIthDebInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
tamasmeszaros committed Aug 9, 2023
1 parent 7020e29 commit ece3d6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ if (${PROJECT_NAME}_BUILD_CMD_TOOL)
)

find_package(Boost ${Boost_VER} REQUIRED COMPONENTS nowide)
if (MSVC)
set_target_properties(Boost::nowide PROPERTIES MAP_IMPORTED_CONFIG_RelWithDebInfo Release)
endif ()
set_target_properties(${_libname}_cmd PROPERTIES OUTPUT_NAME ${_libname})
target_link_libraries(${_libname}_cmd ${_libname}_convert Boost::nowide)
endif ()
Expand Down
4 changes: 4 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ include(Catch)

find_package(Boost ${Boost_VER} REQUIRED COMPONENTS nowide)

if (MSVC)
set_target_properties(Boost::nowide PROPERTIES MAP_IMPORTED_CONFIG_RelWithDebInfo Release)
endif ()

set(CATCH_EXTRA_ARGS "" CACHE STRING "Extra arguments for catch2 test suites.")

set(TEST_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data)
Expand Down

0 comments on commit ece3d6c

Please sign in to comment.