Skip to content
Merged
Show file tree
Hide file tree
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
66 changes: 0 additions & 66 deletions ARCHITECTURE_REVIEW.md

This file was deleted.

56 changes: 0 additions & 56 deletions BASELINE_REPORT.md

This file was deleted.

63 changes: 44 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,28 +1,53 @@
cmake_minimum_required(VERSION 3.10)
project(ProXPL C)
cmake_minimum_required(VERSION 3.13)
project(ProXPL)

# Enable C and C++
enable_language(C CXX)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -g")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Include directories
# --- LLVM Configuration ---
find_package(LLVM REQUIRED CONFIG)

message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")

# Include LLVM directories
include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})

# Link directories
link_directories(${LLVM_LIBRARY_DIRS})

# Map generic components to specific libs
llvm_map_components_to_libnames(llvm_libs core support executionengine native ipo)

# --- Project Source ---
# Export symbols for Windows DLL
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

# --- Project Source ---
include_directories(include)

# Source files
# Source files
file(GLOB_RECURSE SOURCES "src/*.c")
# Gather sources (excluding main.c for library)
file(GLOB_RECURSE LIB_SOURCES
"src/*.c"
"src/compiler/*.cpp"
)
list(FILTER LIB_SOURCES EXCLUDE REGEX ".*main\\.c$")

# Core library (exposed to tests and tools)
add_library(prox_core STATIC ${SOURCES})
target_include_directories(prox_core PUBLIC ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src)
# --- Shared Library ---
add_library(proxpl_lib SHARED ${LIB_SOURCES})
target_link_libraries(proxpl_lib PRIVATE ${llvm_libs})

# Executable
add_executable(prox src/main.c)
target_link_libraries(prox PRIVATE prox_core)
# --- Executable ---
add_executable(proxpl src/main.c ${LIB_SOURCES})

# Optional targets: tools and tests
add_subdirectory(tests)
add_subdirectory(tools/bench)
# Link LLVM and standard libraries
target_link_libraries(proxpl PRIVATE ${llvm_libs})

# Tests
enable_testing()
add_subdirectory(tests)
if(UNIX)
target_link_libraries(proxpl PRIVATE pthread dl z tinfo)
target_link_libraries(proxpl_lib PRIVATE pthread dl z tinfo)
endif()
164 changes: 0 additions & 164 deletions CMakeLists_IMPROVED.txt

This file was deleted.

Loading