@@ -88,7 +88,6 @@ check_cpp: check_cpp_pimpl
8888
8989test_cpp : \
9090 cpp \
91- test_cc_tests \
9291 test_cc_contrib \
9392 test_cc_cpp
9493
@@ -306,54 +305,6 @@ endef
306305CPP_EXAMPLES := contrib cpp
307306$(foreach example,$(CPP_EXAMPLES),$(eval $(call cpp-example-target,$(example))))
308307
309- # Tests
310- CPP_TESTS := tests
311-
312- $(TEMP_CPP_DIR ) /tests : | $(TEMP_CPP_DIR )
313- -$(MKDIR ) $(TEMP_CPP_DIR ) $Stests
314-
315- $(TEMP_CPP_DIR ) /tests/% : \
316- $(SRC_DIR)/examples/tests/%.cc \
317- | $(TEMP_CPP_DIR)/tests
318- -$(MKDIR) $(TEMP_CPP_DIR)$Stests$S$*
319-
320- $(TEMP_CPP_DIR ) /tests/% /CMakeLists.txt : ${SRC_DIR}/ortools/cpp/CMakeLists.txt.in | $(TEMP_CPP_DIR ) /tests/%
321- $(COPY ) ortools$Scpp$SCMakeLists .txt.in $(TEMP_CPP_DIR ) $Stests$S $* $SCMakeLists .txt
322- $(SED ) -i -e ' s/@CPP_NAME@/$*/' \
323- $(TEMP_CPP_DIR)$Stests$S$*$SCMakeLists.txt
324- $(SED) -i -e 's/@CPP_FILE_NAME@/$*.cc/' \
325- $(TEMP_CPP_DIR)$Stests$S$*$SCMakeLists.txt
326- $(SED) -i -e 's/@TEST_ARGS@//' \
327- $(TEMP_CPP_DIR)$Stests$S$*$SCMakeLists.txt
328-
329- $(TEMP_CPP_DIR ) /tests/% /% .cc : \
330- $(SRC_DIR)/examples/tests/%.cc \
331- | $(TEMP_CPP_DIR)/tests/%
332- $(MKDIR_P) $(TEMP_CPP_DIR)$Stests$S$*
333- $(COPY) $(SRC_DIR)$Sexamples$Stests$S$*.cc \
334- $(TEMP_CPP_DIR)$Stests$S$*
335-
336- rcpp_% : \
337- cpp \
338- $(SRC_DIR)/examples/tests/%.cc \
339- $(TEMP_CPP_DIR)/tests/%/CMakeLists.txt \
340- $(TEMP_CPP_DIR)/tests/%/%.cc \
341- FORCE
342- cd $(TEMP_CPP_DIR)$Stests$S$* && \
343- cmake -S. -Bbuild \
344- -DCMAKE_BUILD_TYPE =$(BUILD_TYPE ) \
345- -DCMAKE_PREFIX_PATH=$(OR_ROOT_FULL ) /$(INSTALL_DIR ) \
346- -DCMAKE_INSTALL_PREFIX=install \
347- $(CMAKE_ARGS ) \
348- -G $(GENERATOR )
349- ifneq ($(PLATFORM ) ,WIN64)
350- cd $(TEMP_CPP_DIR)$Stests$S$* && cmake --build build --config $(BUILD_TYPE) --target all -v
351- cd $(TEMP_CPP_DIR)$Stests$S$* && cmake --build build --config $(BUILD_TYPE) --target test -v
352- else
353- cd $(TEMP_CPP_DIR)$Stests$S$* && cmake --build build --config $(BUILD_TYPE) --target ALL_BUILD -v
354- cd $(TEMP_CPP_DIR)$Stests$S$* && cmake --build build --config $(BUILD_TYPE) --target RUN_TESTS -v
355- endif
356-
357308# #################################
358309# # Course scheduling example ##
359310# #################################
@@ -497,16 +448,6 @@ check_cpp_pimpl: \
497448 rcpp_max_flow \
498449 rcpp_min_cost_flow
499450
500- .PHONY : test_cc_tests # Build and Run all C++ Tests (located in examples/tests)
501- test_cc_tests : \
502- rcpp_lp_test \
503- rcpp_bug_fz1 \
504- rcpp_cpp11_test \
505- rcpp_forbidden_intervals_test \
506- rcpp_issue57 \
507- rcpp_min_max_test
508- # $(MAKE) rcpp_issue173 # error: too long
509-
510451.PHONY : test_cc_contrib # Build and Run all C++ Contrib (located in examples/contrib)
511452test_cc_contrib :
512453
0 commit comments