Skip to content

Commit

Permalink
Merge pull request #73 from sandialabs/dev-weh
Browse files Browse the repository at this point in the history
Changes to package configuration
  • Loading branch information
whart222 authored May 6, 2024
2 parents 9d8346d + 12f73f6 commit b2cd885
Show file tree
Hide file tree
Showing 30 changed files with 50 additions and 32 deletions.
20 changes: 19 additions & 1 deletion lib/coek/cmake/coekConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,23 @@
#endif (NOT TARGET coek::coek)

include(CMakeFindDependencyMacro)
find_dependency(fmt)
if("@with_gurobi@" STREQUAL "ON")
find_dependency(GUROBI)
endif()
if("@with_fmtlib@" STREQUAL "ON")
find_dependency(fmt)
endif()
if("@with_rapidjson@" STREQUAL "ON")
find_dependency(RapidJSON)
endif()
if("@with_cppad@" STREQUAL "ON")
find_dependency(CppAD)
endif()
if("@with_asl@" STREQUAL "ON")
find_dependency(ampl-asl)
endif()
if("@with_highs@" STREQUAL "ON")
find_dependency(highs)
find_dependency(Threads)
endif()
include ("${CMAKE_CURRENT_LIST_DIR}/coekTargets.cmake")
8 changes: 4 additions & 4 deletions lib/coek/coek/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ if(with_fmtlib)
find_package(fmt REQUIRED)
list(APPEND coek_compile_options -DWITH_FMTLIB -Wextra -Wconversion -Wpedantic -Wsign-conversion)
list(APPEND coek_link_libraries fmt::fmt)
#list(APPEND coek_include_directories ${CMAKE_INSTALL_PREFIX}/include)
endif()

# Caliper LIBRARY
Expand Down Expand Up @@ -164,6 +163,7 @@ endif()
# HIGHS LIBRARY
#
if(with_highs)
find_package(highs REQUIRED)
list(APPEND sources
solvers/highs/highs.cpp)
list(APPEND coek_compile_options -DWITH_HIGHS)
Expand Down Expand Up @@ -207,10 +207,10 @@ target_include_directories(coek
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
)
target_include_directories(coek
PUBLIC
PRIVATE
${coek_include_directories})
target_link_libraries(coek PUBLIC ${coek_link_libraries})
target_link_directories(coek PUBLIC ${coek_link_directories})
target_link_libraries(coek PRIVATE ${coek_link_libraries})
target_link_directories(coek PRIVATE ${coek_link_directories})
set_property(TARGET coek PROPERTY INTERFACE_LINK_LIBRARIES ${coek_link_libraries})

#if (WIN32)
Expand Down
54 changes: 27 additions & 27 deletions lib/coek/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,36 @@ endif()


SET(sources
test_model.cpp
test_visitor_simplify.cpp
test_visitor_mutable.cpp
test_visitor_writer.cpp
test_visitor_quadexpr.cpp
test_visitor_nlpexpr.cpp
test_visitor_symdiff.cpp
test_visitor_findvarparam.cpp
test_visitor_eval.cpp
test_testsolver.cpp
test_examples.cpp
test_writers.cpp
test_readers.cpp
test_sets.cpp
test_indexed.cpp
test_var.cpp
test_param.cpp
test_expr.cpp
test_obj.cpp
test_con.cpp
test_subexpression.cpp
test_autograd_unknown.cpp
test_autograd_all.cpp
test_util_sequence.cpp
smoke/test_model.cpp
smoke/test_visitor_simplify.cpp
smoke/test_visitor_mutable.cpp
smoke/test_visitor_writer.cpp
smoke/test_visitor_quadexpr.cpp
smoke/test_visitor_nlpexpr.cpp
smoke/test_visitor_symdiff.cpp
smoke/test_visitor_findvarparam.cpp
smoke/test_visitor_eval.cpp
smoke/test_testsolver.cpp
smoke/test_writers.cpp
smoke/test_readers.cpp
smoke/test_sets.cpp
smoke/test_indexed.cpp
smoke/test_var.cpp
smoke/test_param.cpp
smoke/test_expr.cpp
smoke/test_obj.cpp
smoke/test_con.cpp
smoke/test_subexpression.cpp
smoke/test_autograd_unknown.cpp
smoke/test_autograd_all.cpp
smoke/test_util_sequence.cpp
mt_funcs.cpp
solver/test_examples.cpp
)

if (CMAKE_CXX_STANDARD GREATER_EQUAL 17)
list(APPEND sources
test_util_DataPortal.cpp
smoke/test_util_DataPortal.cpp
)
endif()

Expand All @@ -47,14 +47,14 @@ set(coek_test_libraries)
if(with_cppad)
MESSAGE("-- Building Test with AD: CppAd")
list(APPEND sources
test_autograd_cppad.cpp)
smoke/test_autograd_cppad.cpp)
endif()

# ASL LIBRARY
if(with_asl)
MESSAGE("-- Building Test with AD: ASL")
list(APPEND sources
test_autograd_asl.cpp)
smoke/test_autograd_asl.cpp)
endif()

# Thread tests
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b2cd885

Please sign in to comment.