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

Split out redex_opt library in cmake build #540

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,10 @@ include_directories(
${includes})

file(GLOB_RECURSE redex_srcs
"analysis/max-depth/*.cpp"
"analysis/max-depth/*.h"
"analysis/ip-reflection-analysis/*.cpp"
"analysis/ip-reflection-analysis/*.h"
"libredex/*.cpp"
"libredex/*.h"
"service/*.cpp"
"service/*.h"
"opt/*.cpp"
"opt/*.h"
"util/CommandProfiling.cpp"
"util/CommandProfiling.h"
"util/JemallocUtil.cpp"
Expand All @@ -81,6 +75,17 @@ file(GLOB_RECURSE redex_srcs

add_library(redex STATIC ${redex_srcs})

file(GLOB_RECURSE redex_opt_srcs
"analysis/max-depth/*.cpp"
"analysis/max-depth/*.h"
"analysis/ip-reflection-analysis/*.cpp"
"analysis/ip-reflection-analysis/*.h"
"opt/*.cpp"
"opt/*.h"
)

add_library(redex_opt STATIC ${redex_opt_srcs})

file(GLOB_RECURSE tool_srcs
"tools/tool/*.cpp"
"tools/tool/*.h"
Expand Down Expand Up @@ -112,15 +117,16 @@ endif (MINGW)

target_link_libraries(redex-all
${STATIC_LINK_FLAG}
redex_opt
redex
resource
${Boost_LIBRARIES}
${REDEX_JSONCPP_LIBRARY}
${REDEX_ZLIB_LIBRARY}
${CMAKE_DL_LIBS}
redex
resource
${MINGW_EXTRA_LIBS}
)

target_compile_definitions(redex-all PRIVATE)

set_link_whole(redex-all redex)
set_link_whole(redex-all redex_opt)