Skip to content

Commit

Permalink
[clad] Fix Clad debug build on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
bellenot committed Mar 6, 2024
1 parent c14813c commit e3cd074
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions interpreter/cling/tools/plugins/clad/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@ set(clad_install_dir ${CMAKE_BINARY_DIR}/etc/cling/)
# Specify include dirs for clad
set(CLAD_INCLUDE_DIRS ${clad_install_dir})
# Clad Libraries
set(_CLAD_LIBRARY_PATH ${CMAKE_CURRENT_BINARY_DIR}/clad-prefix/src/clad-build/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})

# build byproducts only needed by Ninja
if("${CMAKE_GENERATOR}" STREQUAL "Ninja")
set(CLAD_BYPRODUCTS
${_CLAD_LIBRARY_PATH}/${CMAKE_STATIC_LIBRARY_PREFIX}cladPlugin${CMAKE_STATIC_LIBRARY_SUFFIX}
${_CLAD_LIBRARY_PATH}/${CMAKE_STATIC_LIBRARY_PREFIX}cladDifferentiator${CMAKE_STATIC_LIBRARY_SUFFIX}
)
endif()

set(_clad_build_type ${CMAKE_CFG_INTDIR})
if(MSVC)
if (winrtdebug)
Expand All @@ -30,6 +20,15 @@ if(MSVC)
set(_clad_build_type Release)
endif()
endif(MSVC)
set(_CLAD_LIBRARY_PATH ${CMAKE_CURRENT_BINARY_DIR}/clad-prefix/src/clad-build/${_clad_build_type}/lib${LLVM_LIBDIR_SUFFIX})

# build byproducts only needed by Ninja
if("${CMAKE_GENERATOR}" STREQUAL "Ninja")
set(CLAD_BYPRODUCTS
${_CLAD_LIBRARY_PATH}/${CMAKE_STATIC_LIBRARY_PREFIX}cladPlugin${CMAKE_STATIC_LIBRARY_SUFFIX}
${_CLAD_LIBRARY_PATH}/${CMAKE_STATIC_LIBRARY_PREFIX}cladDifferentiator${CMAKE_STATIC_LIBRARY_SUFFIX}
)
endif()

if(APPLE)
set(_clad_extra_cmake_args -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT})
Expand Down

0 comments on commit e3cd074

Please sign in to comment.