forked from denisrosset/porta
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from bdoolittle/julia-ize-porta
Julia ize porta, merging - shared object can be called with CCall - xporta and valid binaries work - cross-compilation with BinaryBuilder is successful
- Loading branch information
Showing
35 changed files
with
1,046 additions
and
2,400 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,3 @@ | ||
porta.log | ||
|
||
# ignore changes to examples/ | ||
examples/* | ||
|
||
# Object files | ||
*.o | ||
*.ko | ||
*.obj | ||
*.elf | ||
|
||
# Libraries | ||
*.lib | ||
*.a | ||
|
||
# Dependency files | ||
*.d | ||
|
||
# Compiled binary files | ||
gnu-make/bin/valid | ||
gnu-make/bin/xporta | ||
|
||
# Shared objects (inc. Windows DLLs) | ||
*.dll | ||
*.so | ||
*.so.* | ||
*.dylib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
*.i*86 | ||
*.x86_64 | ||
*.hex | ||
# Build and install directories for clean out-of-source testing | ||
build/* | ||
install/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
cmake_minimum_required(VERSION 3.12) | ||
project(julia-porta) | ||
|
||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:\$ORIGIN/../lib:\$ORIGIN") | ||
|
||
if(MSVC) | ||
add_compile_options(/W4) | ||
else() | ||
add_compile_options(-Wall) | ||
endif() | ||
|
||
set(JULIA_PORTA_SRC "${PROJECT_SOURCE_DIR}/src") | ||
|
||
add_library(porta SHARED | ||
"${JULIA_PORTA_SRC}/arith.c" | ||
"${JULIA_PORTA_SRC}/common.c" | ||
"${JULIA_PORTA_SRC}/four_mot.c" | ||
"${JULIA_PORTA_SRC}/inout.c" | ||
"${JULIA_PORTA_SRC}/largecalc.c" | ||
"${JULIA_PORTA_SRC}/log.c" | ||
"${JULIA_PORTA_SRC}/mp.c" | ||
"${JULIA_PORTA_SRC}/portsort.c" | ||
"${JULIA_PORTA_SRC}/porta.c" | ||
) | ||
target_include_directories(porta PRIVATE "${JULIA_PORTA_SRC}") | ||
|
||
add_executable(xporta | ||
"${JULIA_PORTA_SRC}/main.c" | ||
) | ||
target_link_libraries(xporta PRIVATE porta) | ||
target_include_directories(xporta PRIVATE "${JULIA_PORTA_SRC}") | ||
|
||
add_executable(valid | ||
"${JULIA_PORTA_SRC}/valid.c" | ||
) | ||
target_link_libraries(valid PRIVATE porta) | ||
target_include_directories(valid PRIVATE "${JULIA_PORTA_SRC}") | ||
|
||
install(TARGETS porta xporta valid) |
Oops, something went wrong.