Skip to content

Commit

Permalink
fix: dev: run manual cmake commands from build dir on macos
Browse files Browse the repository at this point in the history
* remove the linker optimization arg for gnu on macos

Signed-off-by: Stephen L Arnold <sarnold@vctlabs.com>
  • Loading branch information
sarnold committed Jul 23, 2023
1 parent a6f8bfc commit 9a268ee
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ skipsdist = true
[base]
setenv =
{abc,demo,soname,tests}: CFLAGS={env:CFLAGS:-march=native -O2 -g -DNDEBUG}
{abc,demo,soname,tests}: CXXFLAGS={env:CFLAGS:-march=native -O2 -g -DNDEBUG}
{abc,demo,soname,tests}: LDFLAGS={env:CFLAGS:-march=native -O2 -g -DNDEBUG -Wl,-O1 -Wl,--as-needed}
{abc,demo,soname,tests}: CXXFLAGS={env:CXXFLAGS:-march=native -O2 -g -DNDEBUG}
{abc,demo,soname,tests}: LDFLAGS={env:LDFLAGS:-march=native -O2 -g -DNDEBUG}
{base,build,clang,ctest}: ABC_USE_NAMESPACE={env:ABC_USE_NAMESPACE:xxxx}
{base,build,clang,ctest}: ABC_USE_SONAME={env:ABC_USE_SONAME:ON}
{base,build,clang,ctest}: ABC_USE_PIC={env:ABC_USE_PIC:ON}
Expand Down Expand Up @@ -51,7 +51,7 @@ allowlist_externals =
{abc,demo,soname,tests,clean}: make

changedir =
{build,clang}: build
{base,build,clang}: {toxinidir}/build

deps =
{abc,demo,soname,tests,lint,base,build,clang,ctest,grind,ctestwin}: pip>=21.3
Expand All @@ -60,10 +60,10 @@ deps =
{base,build,clang,ctest,grind,ctestwin}: ninja
lint: cpplint
grind: ValgrindCI
lcov: lcov_cobertura
clang: lcov_cobertura

commands_pre =
{build,clang}: cmake -E make_directory {toxinidir}/build
{base,build,clang}: cmake -E make_directory {toxinidir}/build

commands =
abc: make -j4 ABC_USE_PIC=1 {posargs} abc
Expand All @@ -76,16 +76,15 @@ commands =
demo: bash -c '$CXX -o demo demo.o libabc.a -lm -ldl -lreadline -lpthread'
demo: bash -c './demo i10.aig'
{abc,soname,tests}: bash -c 'ls -lh *abc* demo || true'
base: bash -c 'cmake -G {posargs:"Ninja"} -DABC_USE_NAMESPACE=$ABC_USE_NAMESPACE -DCMAKE_INSTALL_PREFIX=$PREFIX -S . -B build'
base: cmake -j $(nproc) --build build --target install
base: bash -c 'cmake -G {posargs:"Ninja"} -DABC_USE_NAMESPACE=$ABC_USE_NAMESPACE -DCMAKE_INSTALL_PREFIX=$PREFIX ..'
base: bash -c 'cmake --build . --target install -j $(nproc)'
build: bash -c 'cmake -G {posargs:"Unix Makefiles"} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DABC_USE_NAMESPACE=$ABC_USE_NAMESPACE -DABC_ENABLE_LTO=ON -DBUILD_SHARED_LIBS=ON -DABC_USE_SONAME=$ABC_USE_SONAME -DCMAKE_INSTALL_PREFIX=$PREFIX ..'
clang: bash -c 'cmake -G {posargs:"Unix Makefiles"} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DABC_USE_NAMESPACE=$ABC_USE_NAMESPACE -DCOVERAGE_BUILD=ON -DBUILD_SHARED_LIBS=OFF ..'
{build}: bash -c 'cmake --build . -j $(nproc)'
{clang}: bash -c 'cmake --build . --target coverage -j $(nproc)'
{build}: bash -c 'ctest -V -C $BUILD_TYPE --test-dir ./'
{clang}: bash -c 'ctest -V -C $BUILD_TYPE --test-dir ./'
lcov: lcov_cobertura build/coverage/lcov.info --base-dir {toxinidir}/src --output coverage.xml
build: cmake --build . --target install
{build,clang}: bash -c 'ctest -V -C $BUILD_TYPE --test-dir ./'
clang: lcov_cobertura build/coverage/lcov.info --base-dir {toxinidir}/src --output coverage.xml
{base,build}: cmake --build . --target install
{base,build}: bash -c 'find $PREFIX/ -type f -name \*abc\* -o -name demo | xargs ls -lh'
ctest: bash -c 'ctest -j $(nproc) --build-generator {posargs:"Ninja"} --build-and-test . build --build-options -DABC_USE_NAMESPACE=$ABC_USE_NAMESPACE -DABC_SKIP_EXE=ON -DCMAKE_BUILD_TYPE=$BUILD_TYPE --test-command ctest --rerun-failed --output-on-failure -V'
ctestwin: ctest --build-generator {posargs:"Visual Studio 16 2019"} --build-and-test . build --build-options -DBUILD_SHARED_LIBS=ON -DABC_USE_NO_PTHREADS=ON -DABC_USE_NO_READLINE=ON -DCMAKE_BUILD_TYPE={env:BUILD_TYPE} --test-command ctest --rerun-failed --output-on-failure -V
Expand Down

0 comments on commit 9a268ee

Please sign in to comment.