Skip to content

Commit

Permalink
[ci] add zmat files directly to cuda_add_executable
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Nov 12, 2024
1 parent 68d72bc commit 5ab0476
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ set(
)

# C Options
set(CMAKE_C_FLAGS "-g -Wall -std=c99 -fPIC")
set(CMAKE_C_FLAGS "-g -Wall -std=c99 -fPIC -O3")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../lib)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand All @@ -58,9 +58,6 @@ include_directories(cjson ubj zmat zmat/easylzma)

if(BUILD_MACOS12)

# Add link directories
link_directories(zmat)

# Create mcx library
cuda_add_executable(mcx-exe
mcx.c
Expand All @@ -80,15 +77,34 @@ if(BUILD_MACOS12)
cjson/cJSON.h
ubj/ubj.h
ubj/ubjw.c
zmat/zmatlib.c
zmat/lz4/lz4.c
zmat/lz4/lz4hc.c
zmat/miniz/miniz.c
zmat/miniz/miniz.h
zmat/easylzma/compress.c
zmat/easylzma/decompress.c
zmat/easylzma/lzma_header.c
zmat/easylzma/lzip_header.c
zmat/easylzma/common_internal.c
zmat/easylzma/pavlov/LzmaEnc.c
zmat/easylzma/pavlov/LzmaDec.c
zmat/easylzma/pavlov/LzmaLib.c
zmat/easylzma/pavlov/LzFind.c
zmat/easylzma/pavlov/Bra.c
zmat/easylzma/pavlov/BraIA64.c
zmat/easylzma/pavlov/Alloc.c
zmat/easylzma/pavlov/7zCrc.c
)

# Link options
target_link_libraries(
mcx-exe
OpenMP::OpenMP_CXX
zmat
)

target_compile_definitions(_pmcx PUBLIC NO_BLOSC2 NO_ZLIB NO_ZSTD _LARGEFILE64_SOURCE=1)

else()

# Add link directories
Expand Down

0 comments on commit 5ab0476

Please sign in to comment.