Skip to content

Commit

Permalink
Fixes #557: Now WINDOWS_EXPORT_ALL_SYMBOLS just for our targets; an…
Browse files Browse the repository at this point in the history
…d without conditioning on WIN32+MSVC
  • Loading branch information
Eyal Rozenberg committed Dec 31, 2023
1 parent 6c01dab commit a3572fc
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@
# not mistake any other local CMake-related files for its own.
cmake_minimum_required(VERSION 3.25 FATAL_ERROR)

# -----------------------------------
# Project name, version & build type
# -----------------------------------

if(WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# Avoid a build failure when the BUILD_SHARED_LIBS variable is set to true.
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()

PROJECT(cuda-api-wrappers
VERSION 0.6.6
DESCRIPTION "Thin C++-flavored wrappers for the CUDA Runtime API"
Expand All @@ -35,10 +26,6 @@ set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "lib/")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "lib/")

# -------------------
# Our library targets
# -------------------

set(targets runtime-and-driver nvtx rtc)
set(prefixed-targets "")

Expand Down Expand Up @@ -67,6 +54,7 @@ foreach(wrapper_lib ${targets})
PROPERTIES
EXPORT_NAME ${wrapper_lib}
OUTPUT_NAME ${wrapper_lib}
WINDOWS_EXPORT_ALL_SYMBOLS ON
)
endforeach()
target_link_libraries(caw_rtc INTERFACE cuda-api-wrappers::runtime-and-driver CUDA::nvrtc)
Expand Down

0 comments on commit a3572fc

Please sign in to comment.