Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: improve handling of gecode-test #201

Open
wants to merge 1 commit into
base: release/6.3.0
Choose a base branch
from
Open
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
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ if (FLOATSRC)
endif ()

add_executable(gecode-test EXCLUDE_FROM_ALL ${TESTSRC} ${TESTHDR})
set_target_properties(gecode-test PROPERTIES EXCLUDE_FROM_ALL $<NOT:$<BOOL:${BUILD_TESTING}>>)
target_link_libraries(gecode-test gecodeflatzinc gecodeminimodel)

add_executable(fzn-gecode ${FLATZINCEXESRC})
Expand Down Expand Up @@ -428,13 +429,13 @@ endif()

set_property(GLOBAL PROPERTY USE_FOLDERS ON)

option(BUILD_EXAMPLES "Build examples." OFF)
option(BUILD_EXAMPLES "Build examples." OFF)
if (${BUILD_EXAMPLES})
add_subdirectory(examples)
endif()

enable_testing()
add_test(test gecode-test
add_test(NAME test COMMAND gecode-test
-iter 2 -test Branch::Int::Dense::3
-test Int::Linear::Int::Int::Eq::Bnd::12::4
-test Int::Distinct::Random
Expand Down