Skip to content

Commit

Permalink
msvc: Simplify installation of OpenMP DLL and fix tests execution
Browse files Browse the repository at this point in the history
  • Loading branch information
anlambert committed Jun 7, 2024
1 parent 3af8ce5 commit a46c8c3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 62 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/windows-msvc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ jobs:
%CLCACHE_MSBUILD_CONF%
- name: Run Talipot unit tests
working-directory: ./build
run: ctest --force-new-ctest-process --output-on-failure --build-config "Release"
run: |
xcopy C:\talipot\bin\msvcp* tests\plugins
xcopy C:\talipot\bin\vc* tests\plugins
xcopy C:\talipot\bin\concrt* tests\plugins
ctest --force-new-ctest-process --output-on-failure --build-config "Release"
- name: Check Talipot application can be executed
working-directory: C:/talipot/bin
run: talipot --check-application-starts --debug-plugins-load
Expand Down
63 changes: 3 additions & 60 deletions bundlers/win/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,68 +10,11 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Talipot.nsi.in
${CMAKE_CURRENT_BINARY_DIR}/Talipot.nsi @ONLY)

IF(MSVC)
INCLUDE(InstallRequiredSystemLibraries)

IF(OPENMP_FOUND)
IF(MSVC90)
INSTALL(
PROGRAMS
"${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.OPENMP/vcomp90.dll"
DESTINATION ${TalipotBinInstallDir})
ENDIF(MSVC90)

IF(MSVC10)
INSTALL(
PROGRAMS
"${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.OPENMP/vcomp100.dll"
DESTINATION ${TalipotBinInstallDir})
ENDIF(MSVC10)

IF(MSVC11)
INSTALL(
PROGRAMS
"${MSVC11_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC110.OPENMP/vcomp110.dll"
DESTINATION ${TalipotBinInstallDir})
ENDIF(MSVC11)

IF(MSVC12)
INSTALL(
PROGRAMS
"${MSVC12_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC120.OPENMP/vcomp120.dll"
DESTINATION ${TalipotBinInstallDir})
ENDIF(MSVC12)

IF(MSVC_VERSION EQUAL 1900)
INSTALL(
PROGRAMS
"${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC140.OPENMP/vcomp140.dll"
DESTINATION ${TalipotBinInstallDir})
ELSEIF(MSVC_VERSION EQUAL 1910)
# Visual Studio 2017
INSTALL(
PROGRAMS
"${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC150.OPENMP/vcomp140.dll"
DESTINATION ${TalipotBinInstallDir})

ELSEIF(MSVC_VERSION GREATER 1910 AND MSVC_VERSION LESS 1920)
# Visual Studio 2019
INSTALL(
PROGRAMS
"${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC141.OPENMP/vcomp140.dll"
DESTINATION ${TalipotBinInstallDir})
ELSEIF(MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1930)
INSTALL(
PROGRAMS
"${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC142.OPENMP/vcomp140.dll"
DESTINATION ${TalipotBinInstallDir})
ELSEIF(MSVC_VERSION GREATER_EQUAL 1930)
# Visual Studio 2022
INSTALL(
PROGRAMS
"${MSVC_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC143.OPENMP/vcomp140.dll"
DESTINATION ${TalipotBinInstallDir})
ENDIF()
SET(CMAKE_INSTALL_OPENMP_LIBRARIES TRUE)
ENDIF(OPENMP_FOUND)

INCLUDE(InstallRequiredSystemLibraries)
ENDIF(MSVC)

# initialize the list of bundle libs (second arg of FIXUP_BUNDLE), updated in
Expand Down
3 changes: 2 additions & 1 deletion thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ ADD_SUBDIRECTORY(libvpsc)
IF(NOT TALIPOT_BUILD_CORE_ONLY OR TALIPOT_BUILD_OGL)
ADD_SUBDIRECTORY(ftgl)
ADD_SUBDIRECTORY(libtess2)

IF(NOT QUAZIP_FOUND)
SET(QUAZIP_QT_MAJOR_VERSION ${QT_MAJOR_VERSION})
ADD_SUBDIRECTORY(quazip-1.4)
ENDIF(NOT QUAZIP_FOUND)
ENDIF(NOT TALIPOT_BUILD_CORE_ONLY OR TALIPOT_BUILD_OGL)

INSTALL(DIRECTORY parallel_hashmap
DESTINATION ${TalipotIncludeInstallDir}/talipot/)
DESTINATION ${TalipotIncludeInstallDir}/talipot/)

0 comments on commit a46c8c3

Please sign in to comment.