Skip to content

Commit

Permalink
Address further reviewer comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
markusgft committed Oct 8, 2024
1 parent 3cef51b commit fdbb38d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/api/optimize.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ static nlopt_result nlopt_optimize_(nlopt_opt opt, double *x, double *minf)
#ifdef NLOPT_WITH_LUKSAN
return luksan_plip(ni, f, f_data, lb, ub, x, minf, &stop, opt->vector_storage, algorithm == NLOPT_LD_VAR1 ? 1 : 2);
#else
printf("ERROR - attempting to use 'luksan_pnet', but not build with -DNLOPT_WITH_LUKSAN\n");
printf("ERROR - attempting to use 'luksan_plip', but not build with -DNLOPT_WITH_LUKSAN\n");
return NLOPT_INVALID_ARGS;
#endif

Expand Down
6 changes: 3 additions & 3 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ if (NLOPT_CXX)
set_target_properties(testopt PROPERTIES LINKER_LANGUAGE CXX)
endif ()

set(list_of_algorithms_requiring_luksan 11 12 13 14 15 16 17 18)
foreach (algo_index RANGE 29)# 43
foreach (obj_index RANGE 1)# 21
set (enable_ TRUE)
Expand All @@ -47,13 +46,14 @@ foreach (algo_index RANGE 29)# 43
if (algo_index STREQUAL 10)
set (enable_ FALSE)
endif ()
# Check if LUKSAN targets are available.
if (enable_)
add_test (NAME testopt_algo${algo_index}_obj${obj_index} COMMAND testopt -r 0 -a ${algo_index} -o ${obj_index})
if (CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
set_tests_properties (testopt_algo${algo_index}_obj${obj_index} PROPERTIES ENVIRONMENT "PATH=${PROJECT_BINARY_DIR}\\${CMAKE_BUILD_TYPE};$ENV{PATH}") # to load dll
endif ()
if(NOT ${NLOPT_WITH_LUKSAN})
# Check if LUKSAN targets are available.
if(NOT NLOPT_WITH_LUKSAN)
set(list_of_algorithms_requiring_luksan 11 12 13 14 15 16 17 18)
if(${algo_index} IN_LIST list_of_algorithms_requiring_luksan)
set_tests_properties(testopt_algo${algo_index}_obj${obj_index} PROPERTIES DISABLED TRUE)
endif()
Expand Down

0 comments on commit fdbb38d

Please sign in to comment.