Skip to content

Commit

Permalink
Improve usage of remill in submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
pgoodman committed Oct 5, 2021
1 parent 84ec8e4 commit b8cb5de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ string(REPLACE "." ";" LLVM_VERSION_LIST ${LLVM_PACKAGE_VERSION})
list(GET LLVM_VERSION_LIST 0 LLVM_MAJOR_VERSION)
list(GET LLVM_VERSION_LIST 1 LLVM_MINOR_VERSION)

set(LLVM_MAJOR_VERSION "${LLVM_MAJOR_VERSION}" PARENT_SCOPE)
set(LLVM_MINOR_VERSION "${LLVM_MINOR_VERSION}" PARENT_SCOPE)

add_library(thirdparty_llvm INTERFACE)
target_include_directories(thirdparty_llvm SYSTEM INTERFACE
$<BUILD_INTERFACE:${LLVM_INCLUDE_DIRS}>
Expand Down Expand Up @@ -136,7 +139,7 @@ option(REMILL_BUILD_SPARC32_RUNTIME "Build the Runtime for SPARC32. Turn this of
# target settings
#

set(REMILL_LLVM_VERSION "${LLVM_MAJOR_VERSION}")
set(REMILL_LLVM_VERSION "${LLVM_MAJOR_VERSION}" PARENT_SCOPE)
message("Remill llvm version: ${REMILL_LLVM_VERSION}")
math(EXPR REMILL_LLVM_VERSION_NUMBER "${LLVM_MAJOR_VERSION} * 100 + ${LLVM_MINOR_VERSION}")

Expand Down
6 changes: 3 additions & 3 deletions cmake/remillConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ foreach(_comp ${remill_FIND_COMPONENTS})
endforeach()

if(NOT remill_setup_vcpkg AND NOT TARGET remill)
set(LLVM_MAJOR_VERSION @LLVM_MAJOR_VERSION@)
set(LLVM_MINOR_VERSION @LLVM_MINOR_VERSION@)
set(REMILL_LLVM_VERSION "@LLVM_MAJOR_VERSION@.@LLVM_MINOR_VERSION@")
set(LLVM_MAJOR_VERSION @LLVM_MAJOR_VERSION@ PARENT_SCOPE)
set(LLVM_MINOR_VERSION @LLVM_MINOR_VERSION@ PARENT_SCOPE)
set(REMILL_LLVM_VERSION "@LLVM_MAJOR_VERSION@.@LLVM_MINOR_VERSION@" PARENT_SCOPE)

# External libs
include(CMakeFindDependencyMacro)
Expand Down

0 comments on commit b8cb5de

Please sign in to comment.