Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 5fbabbf9 authored by Artur Grunau's avatar Artur Grunau
Browse files

Improve support for NMake-based builds

To build CAMPVis using NMake one had to manually copy several external
DLLs into the CMake output directory. There were 2 reasons for that:
- our macros treated NMake as a compiler and didn't try to detect what
  compiler NMake will actually use; as a result, they couldn't find the
  right external DLLs for NMake-based builds
- Visual Studio manages build types independently of CMake and always
  outputs into a build-type-specific sub-directory of the CMake output
  directory — that's where we place external DLLs; NMake, on the other
  hand, relies on CMake for build type selection and will output
  directly into the CMake output directory; due to this discrepancy,
  NMake-based builds couldn't find the external DLLs that were copied
  into the build directory

As many popular IDEs (e.g. Qt Creator, Code::Blocks, Eclipse CDT) rely
on NMake to build projects on Windows, it makes sense to have a working
support for NMake in our build system.

Update our compiler detection macros and adjust the CMake output
directory to match that of Visual Studio when NMake is used to improve
the support for NMake-based builds.
parent 8a8f9bba
......@@ -35,6 +35,16 @@ ELSEIF(${CMAKE_GENERATOR} STREQUAL "Visual Studio 11 Win64")
MESSAGE("Visual Studio 11 Build (64 Bit) (not actively supported)")
ELSEIF(${CMAKE_GENERATOR} MATCHES "NMake")
SET(CAMPVIS_NMAKE TRUE)
# NMake-based builds may very well use a Visual Studio compiler
IF(MSVC90)
SET(CAMPVIS_MSVC2008 TRUE)
ELSEIF(MSVC10)
SET(CAMPVIS_MSVC2010 TRUE)
ELSEIF(MSVC11)
SET(CAMPVIS_MSVC11 TRUE)
ENDIF(MSVC90)
IF(CMAKE_CL_64)
SET(CAMPVIS_WIN64 TRUE)
MESSAGE(STATUS "NMake 64 Bit Build")
......@@ -110,7 +120,16 @@ IF(WIN32)
ENDIF()
LIST(APPEND CampvisGlobalExternalLibs netapi32 version)
# Append the name of the current build type to the path of the CMake output directory so that
# NMake places all build artifacts in the same directories as Visual Studio. This makes NMake
# builds compatible with our macro that copies external DLLs into the build directory.
IF(CAMPVIS_NMAKE)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}")
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}")
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}")
ENDIF(CAMPVIS_NMAKE)
ELSEIF(UNIX)
LIST(APPEND CampvisGlobalDefinitions "-DUNIX")
LIST(APPEND CampvisGlobalDefinitions "-Wall -Wno-unused-local-typedefs -Wno-unused-variable")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment