File tree Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -467,8 +467,9 @@ function(add_cxx_example FILE_NAME)
467467
468468 install (TARGETS ${EXAMPLE_NAME} )
469469
470- if (BUILD_TESTING)
471- add_test (NAME cxx_${COMPONENT_NAME} _${EXAMPLE_NAME} COMMAND ${EXAMPLE_NAME} )
470+ set (SKIP_TEST (${ARGC} GREATER 1) AND ${ARG1} )
471+ if (BUILD_TESTING AND NOT SKIP_TEST)
472+ add_test (NAME cxx_${COMPONENT_NAME} _${EXAMPLE_NAME} COMMAND ${EXAMPLE_NAME} )
472473 endif ()
473474 message (STATUS "Configuring example ${FILE_NAME} : ...DONE" )
474475endfunction ()
Original file line number Diff line number Diff line change @@ -54,23 +54,8 @@ foreach(SAMPLE IN LISTS CXX_SRCS)
5454endforeach ()
5555
5656# Sat Runner
57- include (GNUInstallDirs)
58- if (APPLE )
59- set (CMAKE_INSTALL_RPATH
60- "@loader_path/../${CMAKE_INSTALL_LIBDIR} ;@loader_path" )
61- elseif (UNIX )
62- set (CMAKE_INSTALL_RPATH
63- "$ORIGIN/../${CMAKE_INSTALL_LIBDIR} :$ORIGIN/../lib64:$ORIGIN/../lib:$ORIGIN" )
64- endif ()
65-
66- add_executable (sat_runner)
57+ add_cxx_example("${CMAKE_CURRENT_LIST_DIR} /sat_runner.cc" TRUE )
6758target_sources (sat_runner PRIVATE
68- "sat_runner.cc"
6959 "opb_reader.h"
7060 "sat_cnf_reader.h" )
71- target_include_directories (sat_runner PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} )
72- target_compile_features (sat_runner PRIVATE cxx_std_17)
73- target_link_libraries (sat_runner PRIVATE ${PROJECT_NAMESPACE} ::ortools)
74-
75- install (TARGETS sat_runner)
7661
You can’t perform that action at this time.
0 commit comments