Skip to content

Commit

Permalink
add MSVC_LINKER_FLAGS
Browse files Browse the repository at this point in the history
  • Loading branch information
talregev committed Jul 18, 2023
1 parent 1869106 commit abadd74
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,11 @@ jobs:
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.inference
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.linear
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.navigation
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.navigation2
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.sam
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.sfm
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.sfm2
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.symbolic
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.symbolic2
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.hybrid
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.nonlinear
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.nonlinear2
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.slam
# Run GTSAM_UNSTABLE tests
Expand All @@ -140,3 +136,7 @@ jobs:
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.nonlinear_unstable
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.slam_unstable
cmake --build build -j4 --config ${{ matrix.build_type }} --target check.partition
- name: Test
run: |
cmake --build build -j4 --config ${{ matrix.build_type }} --target check
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ set (CMAKE_PROJECT_VERSION_MAJOR ${GTSAM_VERSION_MAJOR})
set (CMAKE_PROJECT_VERSION_MINOR ${GTSAM_VERSION_MINOR})
set (CMAKE_PROJECT_VERSION_PATCH ${GTSAM_VERSION_PATCH})

if(MSVC)
set(MSVC_LINKER_FLAGS "/FORCE:MULTIPLE")
set(CMAKE_EXE_LINKER_FLAGS ${MSVC_LINKER_FLAGS})
set(CMAKE_MODULE_LINKER_FLAGS ${MSVC_LINKER_FLAGS})
set(CMAKE_SHARED_LINKER_FLAGS ${MSVC_LINKER_FLAGS})
set(CMAKE_STATIC_LINKER_FLAGS ${MSVC_LINKER_FLAGS})
endif()

###############################################################################
# Gather information, perform checks, set defaults

Expand Down
3 changes: 0 additions & 3 deletions gtsam/navigation/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,4 @@ if (NOT GTSAM_ENABLE_BOOST_SERIALIZATION)
list(APPEND tests_excluded testSerializationNavigation.cpp)
endif()

list(APPEND tests_excluded testImuFactor.cpp testMagPoseFactor.cpp)

gtsamAddTestsGlob(navigation "test*.cpp" "${tests_excluded}" "${test_link_libraries}")
gtsamAddTestsGlob(navigation2 "testImuFactor.cpp testMagPoseFactor.cpp" "" "${test_link_libraries}")
3 changes: 0 additions & 3 deletions gtsam/nonlinear/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ else()
set(EXCLUDE_TESTS "")
endif()

list(APPEND EXCLUDE_TESTS testExpression.cpp)

gtsamAddTestsGlob(nonlinear "test*.cpp" "${EXCLUDE_TESTS}" "gtsam")
gtsamAddTestsGlob(nonlinear2 "testExpression.cpp" "" "gtsam")
5 changes: 1 addition & 4 deletions gtsam/sfm/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
set(tests_excluded testMFAS.cpp testBinaryMeasurement.cpp)

gtsamAddTestsGlob(sfm "test*.cpp" "${tests_excluded}" "gtsam")
gtsamAddTestsGlob(sfm2 "testBinaryMeasurement.cpp testMFAS.cpp" "" "gtsam")
gtsamAddTestsGlob(sfm "test*.cpp" "" "gtsam")
3 changes: 0 additions & 3 deletions gtsam/symbolic/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ else()
set(EXCLUDE_TESTS "")
endif()

list(APPEND EXCLUDE_TESTS testSymbolicConditional.cpp)

gtsamAddTestsGlob(symbolic "test*.cpp" "${EXCLUDE_TESTS}" "gtsam")
gtsamAddTestsGlob(symbolic2 "testSymbolicConditional.cpp" "" "gtsam")

0 comments on commit abadd74

Please sign in to comment.