From da279c2fd92737714a6d77d955638852d1b1e60c Mon Sep 17 00:00:00 2001 From: "N. Pattakos" Date: Fri, 7 Jan 2022 23:41:05 +0100 Subject: [PATCH] fix warning LNK4099 added linker option to silence VS warning LNK4099. Again, ignoring this message is not the Right Thing to do, but in my opinion is good enough for this project and better than having a ton of warning messages hiding potentially useful ones. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e4b7002..9efbc39 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,6 +198,9 @@ foreach(CHAPTER ${CHAPTERS}) set(NAME "${CHAPTER}__${DEMO}") add_executable(${NAME} ${SOURCE}) target_link_libraries(${NAME} ${LIBS}) + if(MSVC) + target_link_options(${NAME} PUBLIC /ignore:4099) + endif(MSVC) if(WIN32) set_target_properties(${NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin/${CHAPTER}") set_target_properties(${NAME} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/bin/${CHAPTER}/Debug")