unify file locations
This commit is contained in:
@@ -14,29 +14,10 @@ if(UNIX AND NOT APPLE)
|
||||
endif()
|
||||
|
||||
# Common compile options
|
||||
|
||||
# Hide everything by default to keep libraries smaller.
|
||||
add_compile_options("-fvisibility=hidden")
|
||||
|
||||
# Handle 3rd party dependencies
|
||||
# #############################
|
||||
|
||||
set(COPY_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/scripts/copy_dependencies.sh)
|
||||
|
||||
execute_process(
|
||||
COMMAND bash ${COPY_SCRIPT}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
RESULT_VARIABLE SCRIPT_RESULT
|
||||
OUTPUT_VARIABLE SCRIPT_OUTPUT
|
||||
ERROR_VARIABLE SCRIPT_ERROR
|
||||
)
|
||||
|
||||
# Check if the script executed successfully
|
||||
if(NOT SCRIPT_RESULT EQUAL 0)
|
||||
message(WARNING "Script execution failed: ${SCRIPT_ERROR}")
|
||||
else()
|
||||
message(STATUS "Running script ${COPY_SCRIPT}:\n${SCRIPT_OUTPUT}")
|
||||
endif()
|
||||
|
||||
|
||||
# hiload library
|
||||
# ##############
|
||||
|
||||
@@ -45,15 +26,15 @@ add_library(hiload SHARED
|
||||
src/symbols.c
|
||||
src/files.c
|
||||
src/memory.c
|
||||
src/logger/logger.c
|
||||
src/moduler/moduler.c
|
||||
src/moduler/elf.c
|
||||
src/string/string.c
|
||||
src/logger.c
|
||||
src/moduler.c
|
||||
src/hielf.c
|
||||
src/histring.c
|
||||
src/filewatcher/filewatcher.c
|
||||
src/filewatcher/filewatch.c
|
||||
|
||||
# dependencies
|
||||
src/logger/sc_log.c
|
||||
3rd/sc/logger/sc_log.c
|
||||
)
|
||||
# TODO: Get -Wpadded back by refactoring sc_array or just surround
|
||||
# all type sc_array declarations with the ignore pragma
|
||||
@@ -90,16 +71,19 @@ install(EXPORT hiloadTargets
|
||||
|
||||
export(TARGETS hiload FILE hiloadConfig.cmake)
|
||||
|
||||
# auditor libraries
|
||||
# Auditor libraries
|
||||
# ###############
|
||||
|
||||
# TODO: Move auditor to its own project, possibly even out of this repo.
|
||||
# It has only been a side product
|
||||
|
||||
add_library(auditor-x86_64 SHARED
|
||||
src/auditor/auditor-x86_64.c
|
||||
solib-auditors/auditor-x86_64.c
|
||||
)
|
||||
|
||||
target_compile_options(auditor-x86_64 PRIVATE
|
||||
$<$<C_COMPILER_ID:GNU>:-Wall -Wextra>
|
||||
$<$<C_COMPILER_ID:Clang>:-Weverything>
|
||||
$<$<C_COMPILER_ID:GNU>:-Wall -Wextra -Wpedantic>
|
||||
$<$<C_COMPILER_ID:Clang>:-Wall -Wextra -Wpedantic>
|
||||
)
|
||||
target_compile_options(auditor-x86_64 PRIVATE
|
||||
-Wno-unused-parameter)
|
||||
|
||||
Reference in New Issue
Block a user