Skip to content

Commit

Permalink
Cxx: Fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
agdavydov81 committed Oct 16, 2023
1 parent 72af7ce commit d827197
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@ set_target_properties(dfpStatic PROPERTIES OUTPUT_NAME "ddfpStatic${VERSION_SUFF
install(TARGETS dfpStatic DESTINATION ./bin/${CMAKE_BUILD_TYPE}/${INSTALL_SUFFIX})

add_executable(demo demo.cpp)
#target_link_libraries(demo LINK_PUBLIC dfp stdc++)
target_link_libraries(demo LINK_PUBLIC dfpStatic stdc++)
#target_link_libraries(demo LINK_PRIVATE dfp stdc++)
target_link_libraries(demo LINK_PRIVATE dfpStatic stdc++)
6 changes: 5 additions & 1 deletion native/buildLinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ cmake -G "Unix Makefiles" -DVERSION_SUFFIX=$1 -DCMAKE_VERBOSE_MAKEFILE=$VERBOSE
make install

rm -rf ./*
cmake -G "Unix Makefiles" -DVERSION_SUFFIX=$1 -DCMAKE_VERBOSE_MAKEFILE=$VERBOSE -DCMAKE_C_COMPILER=musl-gcc -DCMAKE_CXX_COMPILER=musl-gcc -DCMAKE_C_FLAGS_IN=-static -DCMAKE_INSTALL_PREFIX=../ -DINSTALL_SUFFIX=linux/amd64 ../
cmake -G "Unix Makefiles" -DVERSION_SUFFIX=$1 -DCMAKE_VERBOSE_MAKEFILE=$VERBOSE -DCMAKE_C_COMPILER=$CCOMPILER -DCMAKE_CXX_COMPILER=$CXXCOMPILER -DCMAKE_INSTALL_PREFIX=../ -DINSTALL_SUFFIX=linux/amd64 ../
make install

rm -rf ./*
cmake -G "Unix Makefiles" -DVERSION_SUFFIX=$1 -DCMAKE_VERBOSE_MAKEFILE=$VERBOSE -DCMAKE_C_COMPILER=musl-gcc -DCMAKE_CXX_COMPILER=musl-gcc -DCMAKE_C_FLAGS_IN=-static -DCMAKE_INSTALL_PREFIX=../ -DINSTALL_SUFFIX=linux/amd64/musl-gcc ../
make install

cd ..
Expand Down

0 comments on commit d827197

Please sign in to comment.