Skip to content

Commit

Permalink
Add a new test, doesn't include the necessary new logic yet
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Apr 30, 2024
1 parent 73ad629 commit 4c691ae
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions testing/cpm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ add_cmake_config_test( cpm_nvcomp-simple.cmake )
add_cmake_config_test( cpm_nvcomp-invalid-arch.cmake )
add_cmake_config_test( cpm_nvcomp-always-download-proprietary_binary.cmake SERIAL)
add_cmake_config_test( cpm_nvcomp-override-clears-proprietary_binary.cmake SERIAL)
add_cmake_build_test( cpm_nvcomp-proprietary-lib-dir.cmake SERIAL)

add_cmake_config_test( cpm_proprietary-url-ctk-version-find-ctk.cmake )
add_cmake_config_test( cpm_proprietary-url-ctk-version.cmake )
Expand Down
39 changes: 39 additions & 0 deletions testing/cpm/cpm_nvcomp-proprietary-lib-dir.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#=============================================================================
# Copyright (c) 2021-2023, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#=============================================================================
include(${rapids-cmake-dir}/cpm/init.cmake)
include(${rapids-cmake-dir}/cpm/nvcomp.cmake)

rapids_cpm_init()

if(TARGET nvcomp::nvcomp)
message(FATAL_ERROR "Expected nvcomp::nvcomp not to exist")
endif()

rapids_cpm_nvcomp(USE_PROPRIETARY_BINARY ON)

if(NOT nvcomp_proprietary_binary)
message(FATAL_ERROR "Expected nvcomp::nvcomp target to exist")
endif()

# Make sure CUDA::cudart_static isn't in the interface link lines
get_target_property(libs nvcomp::nvcomp INTERFACE_LINK_LIBRARIES)

if("CUDA::cudart_static" IN_LIST libs)
message(FATAL_ERROR "nvcomp::nvcomp shouldn't link to CUDA::cudart_static")
endif()

# Make sure we can be called multiple times
rapids_cpm_nvcomp()

0 comments on commit 4c691ae

Please sign in to comment.