Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix debug-libdeps in CI #706

Merged
merged 10 commits into from
Mar 25, 2024
15 changes: 10 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@ jobs:
fail-fast: true
matrix:
compiler: [ [clang++-14, clang-14] ]
build: [ Debug, Release ]
build: [ Debug, Release, DebugLibdeps ]
include:
- build: Debug
flags: -DPHASAR_BUILD_DYNLIB=ON -DPHASAR_ENABLE_SANITIZERS=ON
cmake_build_type: Debug
flags: -DPHASAR_ENABLE_SANITIZERS=ON
- build: Release
flags: -DPHASAR_ENABLE_DYNAMIC_LOG=OFF -DPHASAR_DEBUG_LIBDEPS=ON -DBUILD_SHARED_LIBS=ON
cmake_build_type: Release
flags: -DPHASAR_ENABLE_DYNAMIC_LOG=OFF -DPHASAR_BUILD_DYNLIB=ON -DPHASAR_ENABLE_SANITIZERS=ON
- build: DebugLibdeps
cmake_build_type: Debug
flags: -DPHASAR_DEBUG_LIBDEPS=ON -DBUILD_SHARED_LIBS=ON

continue-on-error: false
steps:
Expand Down Expand Up @@ -50,7 +55,7 @@ jobs:
clang-tidy-14 \
libclang-rt-14-dev

- uses: swift-actions/setup-swift@v1
- uses: swift-actions/setup-swift@v2
with:
swift-version: "5.8.1"
- name: Building Phasar in ${{ matrix.build }} with ${{ matrix.compiler[0] }}
Expand All @@ -62,7 +67,7 @@ jobs:
mkdir build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=${{ matrix.build }} \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DBUILD_SWIFT_TESTS=ON \
-DPHASAR_USE_Z3=ON \
${{ matrix.flags }} \
Expand Down
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ set(PHASAR_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PHASAR_SRC_DIR}/cmake")
include("phasar_macros")

if (NOT CMAKE_BUILD_TYPE AND NOT GENERATOR_IS_MULTI_CONFIG)
if (NOT CMAKE_BUILD_TYPE AND NOT GENERATOR_IS_MULTI_CONFIG AND NOT PHASAR_IN_TREE)
message(STATUS "No CMAKE_BUILD_TYPE specified, setting it to Debug")
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build mode ('Debug' or 'Release', default is 'Debug')" FORCE)
endif ()
Expand Down Expand Up @@ -231,12 +231,13 @@ if (NOT PHASAR_IN_TREE)

# Export set
set(PHASAR_DEPS_EXPORT_SET PhasarDepsExports)
set(PHASAR_DEPS_INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/phasar/deps)
else()
# Export set
set(PHASAR_DEPS_EXPORT_SET LLVMExports)
endif()

set(PHASAR_DEPS_INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/phasar/deps)

# Filesystem
if (LLVM_ENABLE_LIBCXX)
set(PHASAR_STD_FILESYSTEM c++fs)
Expand Down
6 changes: 6 additions & 0 deletions cmake/add_nlohmann_json.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ function(add_json_schema_validator)

set(JSON_VALIDATOR_INSTALL OFF)

set(BUILD_SHARED_LIBS_SAVE ${BUILD_SHARED_LIBS})
set(BUILD_SHARED_LIBS OFF)

add_subdirectory(external/json-schema-validator EXCLUDE_FROM_ALL)

set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_SAVE})

set_property(TARGET nlohmann_json_schema_validator APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES $<INSTALL_INTERFACE:${PHASAR_DEPS_INSTALL_DESTINATION}/include>
)
Expand Down
1 change: 1 addition & 0 deletions lib/PhasarLLVM/TypeHierarchy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ add_phasar_library(phasar_llvm_typehierarchy

LINKS
phasar_utils
phasar_llvm_db

LLVM_LINK_COMPONENTS
Core
Expand Down
Loading