tuning win build
This commit is contained in:
parent
bc312243df
commit
45963b2064
@ -64,6 +64,11 @@ elseif(${CMAKE_CXX_STANDARD} LESS 17)
|
|||||||
"${MSG_PREFIX} Compiling the FSFW requires a minimum of C++17 support")
|
"${MSG_PREFIX} Compiling the FSFW requires a minimum of C++17 support")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
|
# Manually tweak MSVC to emit (about) the same warnings as clang and gcc on linux
|
||||||
|
add_compile_options("/permissive-" /wd4267 /wd4244 /wd4244 /wd4305 /wd4805 /wd4267 /wd4646 /wd4065 "/Dand=&&" "/Dor=||" "/Dnot=!")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(FSFW_SOURCES_DIR "${CMAKE_SOURCE_DIR}/src/fsfw")
|
set(FSFW_SOURCES_DIR "${CMAKE_SOURCE_DIR}/src/fsfw")
|
||||||
|
|
||||||
set(FSFW_ETL_LIB_NAME etl)
|
set(FSFW_ETL_LIB_NAME etl)
|
||||||
@ -476,11 +481,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|||||||
set(FSFW_WARNING_FLAGS -Weverything -Wno-gnu-anonymous-struct)
|
set(FSFW_WARNING_FLAGS -Weverything -Wno-gnu-anonymous-struct)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|
||||||
set(COMPILER_FLAGS "/permissive-" "/Wall")
|
|
||||||
add_compile_definitions(NOMINMAX not=! and=&& or=||)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Required include paths to compile the FSFW
|
# Required include paths to compile the FSFW
|
||||||
target_include_directories(
|
target_include_directories(
|
||||||
${LIB_FSFW_NAME} INTERFACE ${CMAKE_SOURCE_DIR} ${FSFW_CONFIG_PATH_ABSOLUTE}
|
${LIB_FSFW_NAME} INTERFACE ${CMAKE_SOURCE_DIR} ${FSFW_CONFIG_PATH_ABSOLUTE}
|
||||||
|
@ -52,6 +52,7 @@ ReturnValue_t DleParser::parseRingBuf(size_t& readSize) {
|
|||||||
// without skipping the STX
|
// without skipping the STX
|
||||||
readSize = vectorIdx;
|
readSize = vectorIdx;
|
||||||
ErrorInfo info;
|
ErrorInfo info;
|
||||||
|
info.len = vectorIdx;
|
||||||
setErrorContext(ErrorTypes::CONSECUTIVE_STX_CHARS, info);
|
setErrorContext(ErrorTypes::CONSECUTIVE_STX_CHARS, info);
|
||||||
return POSSIBLE_PACKET_LOSS;
|
return POSSIBLE_PACKET_LOSS;
|
||||||
}
|
}
|
||||||
|
23
unittests/testcfg/windows/cmake/x64-windows-toolchain
Normal file
23
unittests/testcfg/windows/cmake/x64-windows-toolchain
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
set(CMAKE_SYSTEM_NAME Windows)
|
||||||
|
|
||||||
|
# which compilers to use for C and C++
|
||||||
|
set(CMAKE_C_COMPILER /opt/msvc/bin/x64/cl)
|
||||||
|
set(CMAKE_CXX_COMPILER /opt/msvc/bin/x64/cl)
|
||||||
|
|
||||||
|
# built in tests fail
|
||||||
|
set(CMAKE_C_COMPILER_WORKS 1)
|
||||||
|
set(CMAKE_CXX_COMPILER_WORKS 1)
|
||||||
|
|
||||||
|
|
||||||
|
# adjust the default behavior of the FIND_XXX() commands:
|
||||||
|
# search programs in the host environment
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
|
||||||
|
|
||||||
|
# search headers and libraries in the target environment
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||||
|
|
||||||
|
# ignore host installed libraries
|
||||||
|
# makes find_package() ignore the <package>Config.cmake files
|
||||||
|
set(CMAKE_IGNORE_PATH /usr/local)
|
Loading…
x
Reference in New Issue
Block a user