https://github.com/Kitware/CMake
Revision 47abe5f2251f5e31c2da428cd8d92ba56844856c authored by Axel Huebl on 20 August 2020, 00:12:23 UTC, committed by Brad King on 20 August 2020, 10:52:45 UTC
Fix a regression with MPI and CUDA<10.2 that did let `-pthread` flags
slip to nvcc again.  In commit b725a19072 (FindMPI: Deny -fexceptions
from NVCC, 2020-07-02, v3.18.0-rc4~12^2) we accidentally forgot to use
the variable containing the replacement result.

Fixes: #21108
1 parent 09e8de7
Raw File
Tip revision: 47abe5f2251f5e31c2da428cd8d92ba56844856c authored by Axel Huebl on 20 August 2020, 00:12:23 UTC
FindMPI: Fix regression in pthread guard
Tip revision: 47abe5f
CMakeLists.txt
cmake_minimum_required (VERSION 3.9)
project(TestMissingInstall)

set(CMAKE_SKIP_INSTALL_RULES ON)

# Skip the dependency that causes a build when installing.  This
# avoids infinite loops when the post-build rule below installs.
set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY 1)
set(CMAKE_SKIP_PACKAGE_ALL_DEPENDENCY 1)

get_property(MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)

add_executable(mybin mybin.cpp)
install(TARGETS mybin RUNTIME DESTINATION bin)

add_custom_command(TARGET mybin
  POST_BUILD
  COMMAND ${CMAKE_COMMAND} "-DMULTI_CONFIG=${MULTI_CONFIG}"
    -P ${CMAKE_CURRENT_SOURCE_DIR}/ExpectInstallFail.cmake
  COMMENT "Install Project"
)
back to top