Skip to content

Commit

Permalink
Clean cmake sources
Browse files Browse the repository at this point in the history
  • Loading branch information
kwrx committed Sep 13, 2021
1 parent 0957148 commit 7ffec6d
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ add_subdirectory(src)
add_subdirectory(test/little)



install(TARGETS qaspcli qasp
RUNTIME PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE WORLD_READ WORLD_WRITE
ARCHIVE PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE WORLD_READ WORLD_WRITE
LIBRARY PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE WORLD_READ WORLD_WRITE
PUBLIC_HEADER PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE WORLD_READ WORLD_WRITE DESTINATION "include/qasp"
)
1 change: 1 addition & 0 deletions include/qasp/qasp.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "qasp.h"
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
file(GLOB_RECURSE SOURCES "*.cpp")
file(GLOB_RECURSE HEADERS "*.hpp")
file(GLOB_RECURSE PUBHDRS "${CMAKE_SOURCE_DIR}/include/qasp/qasp.*")

add_library(qasp ${SOURCES} ${HEADERS})
add_executable(qaspcli main.cc)
Expand Down Expand Up @@ -43,3 +44,6 @@ target_compile_options(qaspcli

set_target_properties(qaspcli
PROPERTIES OUTPUT_NAME "qasp")

set_target_properties(qaspcli
PROPERTIES PUBLIC_HEADER "${PUBHDRS}")
36 changes: 36 additions & 0 deletions test/big/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
file(GLOB SOURCES "*.qasp")

foreach(SOURCE ${SOURCES})

cmake_path(GET SOURCE STEM TEST_NAME)
cmake_path(GET SOURCE PARENT_PATH TEST_PATH)

add_test(
NAME "[FILE] ${TEST_PATH}-${TEST_NAME}"
COMMAND /bin/sh -c "${PROJECT_BINARY_DIR}/bin/qasp ${SOURCE} -n0 -q | diff -s ${TEST_PATH}/${TEST_NAME}.expected -"
WORKING_DIRECTORY .
)

add_test(
NAME "[FILE] ${TEST_PATH}-${TEST_NAME} --look-ahead"
COMMAND /bin/sh -c "${PROJECT_BINARY_DIR}/bin/qasp ${SOURCE} -n0 -q -l | diff -s ${TEST_PATH}/${TEST_NAME}.expected -"
WORKING_DIRECTORY .
)

add_test(
NAME "[FILE] ${TEST_PATH}-${TEST_NAME} --counter-example"
COMMAND /bin/sh -c "${PROJECT_BINARY_DIR}/bin/qasp ${SOURCE} -n0 -q -c | diff -s ${TEST_PATH}/${TEST_NAME}.expected -"
WORKING_DIRECTORY .
)

add_test(
NAME "[FILE] ${TEST_PATH}-${TEST_NAME} --counter-example --look-ahead"
COMMAND /bin/sh -c "${PROJECT_BINARY_DIR}/bin/qasp ${SOURCE} -n0 -q -l -c | diff -s ${TEST_PATH}/${TEST_NAME}.expected -"
WORKING_DIRECTORY .
)

endforeach()




1 change: 1 addition & 0 deletions test/big/Test01.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
COHERENT
103 changes: 103 additions & 0 deletions test/big/Test01.qasp
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
%@exists
x01 | nx01.
x02 | nx02.
x03 | nx03.
x04 | nx04.
x05 | nx05.
x06 | nx06.
x07 | nx07.
x08 | nx08.
x09 | nx09.
x10 | nx10.
x11 | nx11.
x12 | nx12.
x13 | nx13.
x14 | nx14.
x15 | nx15.
%@forall
x16 | nx16.
x17 | nx17.
x18 | nx18.
x19 | nx19.
x20 | nx20.
%@constraint
:- nx3, nx20, nx1, nx6, nx11.
:- x15, x3, x20, nx6, nx4.
:- x18, nx8, nx11, nx20, nx4.
:- x4, x13, nx17, nx20, nx12.
:- x5, x12, nx20, nx4, nx11.
:- x9, x2, x13, x3, nx16.
:- x10, x18, x6, nx2, nx7.
:- x10, x3, nx2, nx19, nx1.
:- x20, x10, x13, nx17, nx4.
:- x11, x2, nx13, nx5, nx16.
:- x19, x5, nx20, nx10, nx11.
:- x2, x14, x17, x3, nx20.
:- x3, x19, nx12, nx14, nx17.
:- x10, x6, nx11, nx13, nx5.
:- nx20, nx3, nx14, nx2, nx8.
:- x11, x12, x13, nx17, nx3.
:- x6, x12, x15, x5, nx14.
:- x9, x3, x14, nx17, nx12.
:- x4, nx5, nx8, nx20, nx9.
:- x11, x1, x14, x8, x6.
:- x1, x15, x14, nx6, nx16.
:- x1, x17, x12, x6, nx11.
:- x1, x11, x9, nx18, nx20.
:- x13, x12, nx9, nx11, nx16.
:- x20, nx1, nx2, nx17, nx16.
:- x6, x20, x5, nx8, nx4.
:- x19, x16, nx14, nx13, nx18.
:- x12, x14, x7, x10, x6.
:- x15, x7, x13, nx9, nx4.
:- x5, x10, x9, nx15, nx3.
:- x1, x2, x10, nx13, nx5.
:- x17, x12, x3, nx20, nx11.
:- x13, x4, x10, nx3, nx9.
:- x2, x17, x6, nx1, nx14.
:- x3, x2, x15, x20, nx18.
:- x7, x18, nx6, nx14, nx17.
:- x13, x20, nx11, nx9, nx18.
:- x6, x11, nx16, nx17, nx5.
:- x5, nx15, nx13, nx4, nx9.
:- x16, x4, x12, nx18, nx10.
:- x20, x9, nx16, nx6, nx2.
:- x17, x2, x12, nx19, nx14.
:- x19, x3, x11, x15, x20.
:- x12, x17, nx19, nx7, nx5.
:- x2, x16, x13, nx7, nx6.
:- x11, x20, nx6, nx7, nx17.
:- x9, x8, x7, nx10, nx11.
:- x15, x10, x18, x3, x11.
:- x17, x2, nx9, nx14, nx6.
:- x18, x19, x14, nx15, nx5.
:- x17, x5, nx13, nx18, nx12.
:- x17, x1, nx14, nx10, nx20.
:- x5, x9, x20, nx19, nx11.
:- x3, x7, x2, x4, nx1.
:- x17, x10, nx11, nx15, nx5.
:- x12, x10, x1, x9, nx5.
:- x3, x9, x19, nx12, nx13.
:- x18, x20, x2, x16, nx11.
:- x15, x1, nx17, nx3, nx7.
:- x6, x2, x12, nx1, nx10.
:- x7, x2, x4, nx3, nx11.
:- x14, nx16, nx18, nx4, nx5.
:- x7, x12, x14, nx13, nx15.
:- x8, x19, nx12, nx10, nx14.
:- x12, x15, x4, nx5, nx9.
:- x15, x17, nx16, nx20, nx1.
:- x8, x9, nx19, nx20, nx6.
:- x16, x2, x19, nx8, nx15.
:- x8, nx13, nx20, nx2, nx3.
:- x11, x20, x13, nx14, nx6.
:- x6, x2, x14, nx11, nx16.
:- x19, x2, nx15, nx17, nx8.
:- x18, x17, nx11, nx6, nx9.
:- x14, x12, x11, x3, nx20.
:- x15, x2, nx3, nx1, nx7.
:- x3, x13, nx12, nx20, nx18.
:- x15, nx17, nx14, nx13, nx8.
:- x3, nx7, nx19, nx4, nx18.
:- x7, x15, nx9, nx6, nx20.
:- x9, x5, x2, nx15, nx1.

0 comments on commit 7ffec6d

Please sign in to comment.