From 6f82dd334772f0ac4702c8090bf6110d7cfc0523 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Fri, 17 Jun 2022 00:25:56 -0700 Subject: [PATCH] to_c: add missing links to cppad_lib to CMakeLists.txt, add some missing files to makefile.am. --- cppad_lib/makefile.am | 3 ++- cppad_lib/makefile.in | 10 +++++++--- example/abs_normal/CMakeLists.txt | 10 ++++++++-- example/atomic_four/CMakeLists.txt | 7 +++++++ example/atomic_four/lin_ode/CMakeLists.txt | 6 ++++++ example/atomic_four/mat_mul/CMakeLists.txt | 6 ++++++ example/atomic_four/vector/CMakeLists.txt | 6 ++++++ example/atomic_three/CMakeLists.txt | 6 ++++++ example/atomic_two/CMakeLists.txt | 8 +++++++- example/chkpoint_two/CMakeLists.txt | 8 +++++++- example/general/CMakeLists.txt | 1 + example/get_started/CMakeLists.txt | 8 +++++++- example/multi_thread/bthread/CMakeLists.txt | 8 ++++++-- example/multi_thread/openmp/CMakeLists.txt | 9 +++++++-- example/multi_thread/pthread/CMakeLists.txt | 8 ++++++-- example/optimize/CMakeLists.txt | 10 ++++++++-- example/print_for/CMakeLists.txt | 9 +++++++-- include/cppad/utility/link_dll_lib.hpp | 8 ++++++-- include/makefile.am | 3 +++ include/makefile.in | 3 +++ introduction/CMakeLists.txt | 9 +++++++-- speed/cppad/CMakeLists.txt | 9 +++++++-- speed/cppadcg/CMakeLists.txt | 9 +++++++-- speed/double/CMakeLists.txt | 9 +++++++-- speed/example/CMakeLists.txt | 14 ++++++++++++-- speed/fadbad/CMakeLists.txt | 9 +++++++-- speed/profile/CMakeLists.txt | 9 +++++++-- speed/sacado/CMakeLists.txt | 9 +++++++-- speed/xpackage/CMakeLists.txt | 9 +++++++-- test_more/cppad_for_tmb/CMakeLists.txt | 8 ++++++-- test_more/deprecated/CMakeLists.txt | 8 +++++++- test_more/deprecated/atomic_two/CMakeLists.txt | 8 +++++++- test_more/deprecated/chkpoint_one/CMakeLists.txt | 8 +++++++- 33 files changed, 211 insertions(+), 44 deletions(-) diff --git a/cppad_lib/makefile.am b/cppad_lib/makefile.am index e11b3a290d..d9d66ec357 100644 --- a/cppad_lib/makefile.am +++ b/cppad_lib/makefile.am @@ -26,7 +26,8 @@ libcppad_lib_a_SOURCES = \ csrc_writer.cpp \ json_lexer.cpp \ json_parser.cpp \ - json_writer.cpp + json_writer.cpp \ + temp_file.cpp # END_SORT_THIS_LINE_MINUS_1 # autotools version of install does not support CppADCodeGen but need source diff --git a/cppad_lib/makefile.in b/cppad_lib/makefile.in index 85e1e52dcd..26f907db4a 100644 --- a/cppad_lib/makefile.in +++ b/cppad_lib/makefile.in @@ -136,7 +136,7 @@ libcppad_lib_a_LIBADD = am_libcppad_lib_a_OBJECTS = cpp_graph_op.$(OBJEXT) \ cppad_colpack.$(OBJEXT) csrc_writer.$(OBJEXT) \ json_lexer.$(OBJEXT) json_parser.$(OBJEXT) \ - json_writer.$(OBJEXT) + json_writer.$(OBJEXT) temp_file.$(OBJEXT) libcppad_lib_a_OBJECTS = $(am_libcppad_lib_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -156,7 +156,7 @@ am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/cpp_graph_op.Po \ ./$(DEPDIR)/cppad_colpack.Po ./$(DEPDIR)/csrc_writer.Po \ ./$(DEPDIR)/json_lexer.Po ./$(DEPDIR)/json_parser.Po \ - ./$(DEPDIR)/json_writer.Po + ./$(DEPDIR)/json_writer.Po ./$(DEPDIR)/temp_file.Po am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) @@ -387,7 +387,8 @@ libcppad_lib_a_SOURCES = \ csrc_writer.cpp \ json_lexer.cpp \ json_parser.cpp \ - json_writer.cpp + json_writer.cpp \ + temp_file.cpp all: all-am @@ -471,6 +472,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/json_lexer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/json_parser.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/json_writer.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/temp_file.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @@ -627,6 +629,7 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/json_lexer.Po -rm -f ./$(DEPDIR)/json_parser.Po -rm -f ./$(DEPDIR)/json_writer.Po + -rm -f ./$(DEPDIR)/temp_file.Po -rm -f makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -678,6 +681,7 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/json_lexer.Po -rm -f ./$(DEPDIR)/json_parser.Po -rm -f ./$(DEPDIR)/json_writer.Po + -rm -f ./$(DEPDIR)/temp_file.Po -rm -f makefile maintainer-clean-am: distclean-am maintainer-clean-generic diff --git a/example/abs_normal/CMakeLists.txt b/example/abs_normal/CMakeLists.txt index 04f243a748..6808f521e4 100644 --- a/example/abs_normal/CMakeLists.txt +++ b/example/abs_normal/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-19 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -31,7 +31,13 @@ SET(source_list set_compile_flags( example_abs_normal "${cppad_debug_which}" "${source_list}" ) # ADD_EXECUTABLE(example_abs_normal EXCLUDE_FROM_ALL ${source_list}) - +# +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(example_abs_normal + ${cppad_lib} + ${colpack_libs} +) +# # check_example_abs_normal target ADD_CUSTOM_TARGET(check_example_abs_normal example_abs_normal diff --git a/example/atomic_four/CMakeLists.txt b/example/atomic_four/CMakeLists.txt index d20939a910..ec8b9130b3 100644 --- a/example/atomic_four/CMakeLists.txt +++ b/example/atomic_four/CMakeLists.txt @@ -31,11 +31,18 @@ set_compile_flags(example_atomic_four "${cppad_debug_which}" "${source_list}" ) # ADD_EXECUTABLE(example_atomic_four EXCLUDE_FROM_ALL ${source_list}) # +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(example_atomic_four + ${cppad_lib} + ${colpack_libs} +) +# # Add the check_example_atomic_four target ADD_CUSTOM_TARGET(check_example_atomic_four example_atomic_four DEPENDS example_atomic_four ${check_example_atomic_four_depends} ) +# MESSAGE(STATUS "make check_example_atomic_four: available") # # add to check check_example_depends in parent environment diff --git a/example/atomic_four/lin_ode/CMakeLists.txt b/example/atomic_four/lin_ode/CMakeLists.txt index 4e79e15c5f..6a89f9dc87 100644 --- a/example/atomic_four/lin_ode/CMakeLists.txt +++ b/example/atomic_four/lin_ode/CMakeLists.txt @@ -26,6 +26,12 @@ set_compile_flags(example_atomic_four_lin_ode # ADD_EXECUTABLE(example_atomic_four_lin_ode EXCLUDE_FROM_ALL ${source_list}) # +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(example_atomic_four_lin_ode + ${cppad_lib} + ${colpack_libs} +) +# # Add the check_example_atomic_four_lin_ode target ADD_CUSTOM_TARGET(check_example_atomic_four_lin_ode example_atomic_four_lin_ode diff --git a/example/atomic_four/mat_mul/CMakeLists.txt b/example/atomic_four/mat_mul/CMakeLists.txt index 90f847671a..7fcc8f2a11 100644 --- a/example/atomic_four/mat_mul/CMakeLists.txt +++ b/example/atomic_four/mat_mul/CMakeLists.txt @@ -27,6 +27,12 @@ set_compile_flags(example_atomic_four_mat_mul # ADD_EXECUTABLE(example_atomic_four_mat_mul EXCLUDE_FROM_ALL ${source_list}) # +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(example_atomic_four_mat_mul + ${cppad_lib} + ${colpack_libs} +) +# # Add the check_example_atomic_four_mat_mul target ADD_CUSTOM_TARGET(check_example_atomic_four_mat_mul example_atomic_four_mat_mul diff --git a/example/atomic_four/vector/CMakeLists.txt b/example/atomic_four/vector/CMakeLists.txt index 700578a5dc..a756eda8f5 100644 --- a/example/atomic_four/vector/CMakeLists.txt +++ b/example/atomic_four/vector/CMakeLists.txt @@ -28,6 +28,12 @@ set_compile_flags(example_atomic_four_vector "${cppad_debug_which}" "${source_li # ADD_EXECUTABLE(example_atomic_four_vector EXCLUDE_FROM_ALL ${source_list}) # +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(example_atomic_four_vector + ${cppad_lib} + ${colpack_libs} +) +# # Add the check_example_atomic_four_vector target ADD_CUSTOM_TARGET(check_example_atomic_four_vector example_atomic_four_vector diff --git a/example/atomic_three/CMakeLists.txt b/example/atomic_three/CMakeLists.txt index ce6e31d792..27c6192a0b 100644 --- a/example/atomic_three/CMakeLists.txt +++ b/example/atomic_three/CMakeLists.txt @@ -32,6 +32,12 @@ set_compile_flags(example_atomic_three "${cppad_debug_which}" "${source_list}" ) # ADD_EXECUTABLE(example_atomic_three EXCLUDE_FROM_ALL ${source_list}) # +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(example_atomic_three + ${cppad_lib} + ${colpack_libs} +) +# # Add the check_example_atomic_three target ADD_CUSTOM_TARGET(check_example_atomic_three example_atomic_three diff --git a/example/atomic_two/CMakeLists.txt b/example/atomic_two/CMakeLists.txt index cae5703605..8f32e49b86 100644 --- a/example/atomic_two/CMakeLists.txt +++ b/example/atomic_two/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-19 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -28,6 +28,12 @@ set_compile_flags( example_atomic_two "${cppad_debug_which}" "${source_list}" ) # ADD_EXECUTABLE(example_atomic_two EXCLUDE_FROM_ALL ${source_list}) # +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(example_atomic_two + ${cppad_lib} + ${colpack_libs} +) +# # Add the check_example_atomic_two target ADD_CUSTOM_TARGET(check_example_atomic_two example_atomic_two diff --git a/example/chkpoint_two/CMakeLists.txt b/example/chkpoint_two/CMakeLists.txt index ee1ef3b7c5..65eff8175c 100644 --- a/example/chkpoint_two/CMakeLists.txt +++ b/example/chkpoint_two/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-19 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -25,6 +25,12 @@ set_compile_flags( example_chkpoint_two "${cppad_debug_which}" "${source_list}" # ADD_EXECUTABLE(example_chkpoint_two EXCLUDE_FROM_ALL ${source_list}) # +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(example_chkpoint_two + ${cppad_lib} + ${colpack_libs} +) +# # Add the check_example_chkpoint_two target ADD_CUSTOM_TARGET(check_example_chkpoint_two example_chkpoint_two diff --git a/example/general/CMakeLists.txt b/example/general/CMakeLists.txt index d024780423..0770ed86af 100644 --- a/example/general/CMakeLists.txt +++ b/example/general/CMakeLists.txt @@ -147,6 +147,7 @@ ADD_EXECUTABLE(example_general EXCLUDE_FROM_ALL ${source_list}) TARGET_LINK_LIBRARIES(example_general ${adolc_LIBRARIES} ${cppad_lib} + ${colpack_libs} ) # # Add the check_example_general target diff --git a/example/get_started/CMakeLists.txt b/example/get_started/CMakeLists.txt index 10341fffe7..f291321ccb 100644 --- a/example/get_started/CMakeLists.txt +++ b/example/get_started/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -22,6 +22,12 @@ ADD_CUSTOM_TARGET(check_example_get_started example_get_started DEPENDS example_get_started ) +# +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(example_get_started + ${cppad_lib} + ${colpack_libs} +) MESSAGE(STATUS "make check_example_get_started: available") # # Change check depends in parent environment diff --git a/example/multi_thread/bthread/CMakeLists.txt b/example/multi_thread/bthread/CMakeLists.txt index 3c800c1c7f..f3830808fc 100644 --- a/example/multi_thread/bthread/CMakeLists.txt +++ b/example/multi_thread/bthread/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-21 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -37,7 +37,11 @@ set_compile_flags( ADD_EXECUTABLE( example_multi_thread_bthread EXCLUDE_FROM_ALL ${source_list} ) # List of libraries to be linked into the specified target -TARGET_LINK_LIBRARIES(example_multi_thread_bthread ${Boost_LIBRARIES}) +TARGET_LINK_LIBRARIES(example_multi_thread_bthread + ${cppad_lib} + ${colpack_libs} + ${Boost_LIBRARIES} +) # Add the check_example_multi_thread_bthread target ADD_CUSTOM_TARGET(check_example_multi_thread_bthread diff --git a/example/multi_thread/openmp/CMakeLists.txt b/example/multi_thread/openmp/CMakeLists.txt index 380c0310c6..79cfda2a68 100644 --- a/example/multi_thread/openmp/CMakeLists.txt +++ b/example/multi_thread/openmp/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-21 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -37,7 +37,12 @@ SET(source_list ../thread_test.cpp set_compile_flags( example_multi_thread_openmp "${cppad_debug_which}" "${source_list}" ) # ADD_EXECUTABLE( example_multi_thread_openmp EXCLUDE_FROM_ALL ${source_list} ) -TARGET_LINK_LIBRARIES(example_multi_thread_openmp PRIVATE ${OpenMP_CXX_LIBRARIES}) +TARGET_LINK_LIBRARIES( + example_multi_thread_openmp PRIVATE + ${cppad_lib} + ${colpack_libs} + ${OpenMP_CXX_LIBRARIES} +) # Extra flags used by linker for openmp support SET(CMAKE_EXE_LINKER_FLAGS ${OpenMP_CXX_FLAGS} ) diff --git a/example/multi_thread/pthread/CMakeLists.txt b/example/multi_thread/pthread/CMakeLists.txt index 8e3bb72493..8eeb043b86 100644 --- a/example/multi_thread/pthread/CMakeLists.txt +++ b/example/multi_thread/pthread/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-21 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -39,7 +39,11 @@ ADD_EXECUTABLE( example_multi_thread_pthread EXCLUDE_FROM_ALL ${source_list} ) LINK_DIRECTORIES( ${pthread_lib_path} ) # List of libraries to be linked into the specified target -TARGET_LINK_LIBRARIES(example_multi_thread_pthread ${pthread_lib}) +TARGET_LINK_LIBRARIES(example_multi_thread_pthread + ${cppad_lib} + ${colpack_libs} + ${pthread_lib} +) # Add the check_example_multi_thread_pthread target ADD_CUSTOM_TARGET(check_example_multi_thread_pthread diff --git a/example/optimize/CMakeLists.txt b/example/optimize/CMakeLists.txt index 82c838ae02..f40247ff26 100644 --- a/example/optimize/CMakeLists.txt +++ b/example/optimize/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-19 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -29,7 +29,13 @@ SET(source_list set_compile_flags( example_optimize "${cppad_debug_which}" "${source_list}" ) # ADD_EXECUTABLE(example_optimize EXCLUDE_FROM_ALL ${source_list}) - +# +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(example_optimize + ${cppad_lib} + ${colpack_libs} +) +# # Add the check_example_optimize target ADD_CUSTOM_TARGET(check_example_optimize example_optimize diff --git a/example/print_for/CMakeLists.txt b/example/print_for/CMakeLists.txt index 6f9f6c31fa..2166596c85 100644 --- a/example/print_for/CMakeLists.txt +++ b/example/print_for/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -16,7 +16,12 @@ SET(source_list print_for.cpp) set_compile_flags( example_print_for "${cppad_debug_which}" "${source_list}" ) # ADD_EXECUTABLE(example_print_for EXCLUDE_FROM_ALL ${source_list}) - +# +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(example_print_for + ${cppad_lib} + ${colpack_libs} +) # check_example_print_for target ADD_CUSTOM_TARGET(check_example_print_for example_print_for diff --git a/include/cppad/utility/link_dll_lib.hpp b/include/cppad/utility/link_dll_lib.hpp index e1aae6d654..d42a9d1407 100644 --- a/include/cppad/utility/link_dll_lib.hpp +++ b/include/cppad/utility/link_dll_lib.hpp @@ -33,7 +33,6 @@ in the Eclipse Public License, Version 2.0 are satisfied: # else // LoadLibrary, GetProcAddress, FreeLibrary, GetLastError, RTLD_LAZY # include -# define RTLD_LAZY 0 # endif namespace CppAD { // BEGIN_CPPAD_NAMESPACE @@ -84,7 +83,12 @@ class link_dll_lib { public: // ctor link_dll_lib(const std::string& dll_file, std::string& err_msg) - { handle_ = dlopen(dll_file.c_str(), RTLD_LAZY); + { +# ifdef _WIN32 + handle_ = dlopen(dll_file.c_str(), 0); +# else + handle_ = dlopen(dll_file.c_str(), RTLD_LAZY); +# endif if( handle_ != nullptr ) err_msg = ""; else diff --git a/include/makefile.am b/include/makefile.am index c487404bfa..04360fb09b 100644 --- a/include/makefile.am +++ b/include/makefile.am @@ -343,6 +343,7 @@ nobase_myinclude_HEADERS = \ cppad/local/sweep/rev_hes.hpp \ cppad/local/sweep/rev_jac.hpp \ cppad/local/sweep/reverse.hpp \ + cppad/local/temp_file.hpp \ cppad/local/utility/cppad_vector_itr.hpp \ cppad/local/utility/vector_bool.hpp \ cppad/speed/det_33.hpp \ @@ -358,9 +359,11 @@ nobase_myinclude_HEADERS = \ cppad/utility.hpp \ cppad/utility/check_numeric_type.hpp \ cppad/utility/check_simple_vector.hpp \ + cppad/utility/create_dll_lib.hpp \ cppad/utility/elapsed_seconds.hpp \ cppad/utility/error_handler.hpp \ cppad/utility/index_sort.hpp \ + cppad/utility/link_dll_lib.hpp \ cppad/utility/lu_factor.hpp \ cppad/utility/lu_invert.hpp \ cppad/utility/lu_solve.hpp \ diff --git a/include/makefile.in b/include/makefile.in index f78edf6cd0..4bdc31fc82 100644 --- a/include/makefile.in +++ b/include/makefile.in @@ -932,6 +932,7 @@ uninstall-am: uninstall-nobase_myincludeHEADERS cppad/local/sweep/rev_hes.hpp \ cppad/local/sweep/rev_jac.hpp \ cppad/local/sweep/reverse.hpp \ + cppad/local/temp_file.hpp \ cppad/local/utility/cppad_vector_itr.hpp \ cppad/local/utility/vector_bool.hpp \ cppad/speed/det_33.hpp \ @@ -947,9 +948,11 @@ uninstall-am: uninstall-nobase_myincludeHEADERS cppad/utility.hpp \ cppad/utility/check_numeric_type.hpp \ cppad/utility/check_simple_vector.hpp \ + cppad/utility/create_dll_lib.hpp \ cppad/utility/elapsed_seconds.hpp \ cppad/utility/error_handler.hpp \ cppad/utility/index_sort.hpp \ + cppad/utility/link_dll_lib.hpp \ cppad/utility/lu_factor.hpp \ cppad/utility/lu_invert.hpp \ cppad/utility/lu_solve.hpp \ diff --git a/introduction/CMakeLists.txt b/introduction/CMakeLists.txt index 1a3383fd83..8b620175ad 100644 --- a/introduction/CMakeLists.txt +++ b/introduction/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-19 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -36,7 +36,12 @@ SET(source_list set_compile_flags( introduction "${cppad_debug_which}" "${source_list}" ) # ADD_EXECUTABLE( introduction EXCLUDE_FROM_ALL ${source_list} ) - +# +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(introduction + ${cppad_lib} + ${colpack_libs} +) # Add this check target ADD_CUSTOM_TARGET(check_introduction introduction diff --git a/speed/cppad/CMakeLists.txt b/speed/cppad/CMakeLists.txt index 6d5d537aec..a3d432a38a 100644 --- a/speed/cppad/CMakeLists.txt +++ b/speed/cppad/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -38,7 +38,12 @@ SET(source_list ../main.cpp set_compile_flags( speed_cppad "${cppad_debug_which}" "${source_list}" ) # ADD_EXECUTABLE( speed_cppad EXCLUDE_FROM_ALL ${source_list} ) - +# +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(speed_cppad + ${cppad_lib} + ${colpack_libs} +) # List of libraries to be linked into the specified target TARGET_LINK_LIBRARIES(speed_cppad speed_src diff --git a/speed/cppadcg/CMakeLists.txt b/speed/cppadcg/CMakeLists.txt index d170d0abc9..6158bae8d0 100644 --- a/speed/cppadcg/CMakeLists.txt +++ b/speed/cppadcg/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-20 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -34,7 +34,12 @@ SET(source_list ../main.cpp set_compile_flags( speed_cppadcg "${cppad_debug_which}" "${source_list}" ) # ADD_EXECUTABLE(speed_cppadcg EXCLUDE_FROM_ALL ${source_list} ) - +# +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(speed_cppadcg + ${cppad_lib} + ${colpack_libs} +) # cppadcg is an include file only library TARGET_LINK_LIBRARIES(speed_cppadcg speed_src diff --git a/speed/double/CMakeLists.txt b/speed/double/CMakeLists.txt index 63b6487797..8af5b0e2f0 100644 --- a/speed/double/CMakeLists.txt +++ b/speed/double/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -35,7 +35,12 @@ SET(source_list ../main.cpp set_compile_flags( speed_double "${cppad_debug_which}" "${source_list}" ) # ADD_EXECUTABLE( speed_double EXCLUDE_FROM_ALL ${source_list} ) - +# +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(speed_double + ${cppad_lib} + ${colpack_libs} +) # double does not use any external library TARGET_LINK_LIBRARIES(speed_double speed_src ) diff --git a/speed/example/CMakeLists.txt b/speed/example/CMakeLists.txt index 7632be1726..942659625d 100644 --- a/speed/example/CMakeLists.txt +++ b/speed/example/CMakeLists.txt @@ -30,7 +30,12 @@ SET(source_list example.cpp set_compile_flags( speed_example "${cppad_debug_which}" "${source_list}" ) # ADD_EXECUTABLE( speed_example EXCLUDE_FROM_ALL ${source_list} ) - +# +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(speed_example + ${cppad_lib} + ${colpack_libs} +) # Add the check_speed_example target ADD_CUSTOM_TARGET(check_speed_example speed_example @@ -40,7 +45,12 @@ MESSAGE(STATUS "make check_speed_example: available") # # ADD_EXECUTABLE( speed_program EXCLUDE_FROM_ALL speed_program.cpp ) - +# +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(speed_program + ${cppad_lib} + ${colpack_libs} +) # Add the check_speed_program target ADD_CUSTOM_TARGET(check_speed_program speed_program DEPENDS speed_program ) MESSAGE(STATUS "make check_speed_program: available") diff --git a/speed/fadbad/CMakeLists.txt b/speed/fadbad/CMakeLists.txt index 3fcb04472b..92758d1dcd 100644 --- a/speed/fadbad/CMakeLists.txt +++ b/speed/fadbad/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-20 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -38,7 +38,12 @@ SET(source_list ../main.cpp set_compile_flags( speed_fadbad "${cppad_debug_which}" "${source_list}" ) # ADD_EXECUTABLE( speed_fadbad EXCLUDE_FROM_ALL ${source_list} ) - +# +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(speed_fadbad + ${cppad_lib} + ${colpack_libs} +) # fadbad is an include file only library TARGET_LINK_LIBRARIES(speed_fadbad speed_src ) diff --git a/speed/profile/CMakeLists.txt b/speed/profile/CMakeLists.txt index f4e93aee2c..dfb9b6f434 100644 --- a/speed/profile/CMakeLists.txt +++ b/speed/profile/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-20 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -38,7 +38,12 @@ SET(source_list ../main.cpp set_compile_flags( speed_profile "${cppad_debug_which}" "${source_list}" ) # ADD_EXECUTABLE( speed_profile EXCLUDE_FROM_ALL ${source_list} ) - +# +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(speed_profile + ${cppad_lib} + ${colpack_libs} +) # profile builds it own copy of src/speed library (see ADD_EXECUTABLE above) # TARGET_LINK_LIBRARIES(speed_profile speed_src ) TARGET_LINK_LIBRARIES(speed_profile diff --git a/speed/sacado/CMakeLists.txt b/speed/sacado/CMakeLists.txt index f68e0828b4..9914b4ac48 100644 --- a/speed/sacado/CMakeLists.txt +++ b/speed/sacado/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-20 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -38,7 +38,12 @@ SET(source_list ../main.cpp set_compile_flags( speed_sacado "${cppad_debug_which}" "${source_list}" ) # ADD_EXECUTABLE( speed_sacado EXCLUDE_FROM_ALL ${source_list} ) - +# +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(speed_sacado + ${cppad_lib} + ${colpack_libs} +) # determine libraries necessary to link Sacado SET(config_file "${sacado_prefix}/include/Makefile.export.Sacado") IF(NOT EXISTS ${config_file}) diff --git a/speed/xpackage/CMakeLists.txt b/speed/xpackage/CMakeLists.txt index 15d71ddf36..96ffe2f063 100644 --- a/speed/xpackage/CMakeLists.txt +++ b/speed/xpackage/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-21 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -41,7 +41,12 @@ SET(source_list ../main.cpp set_compile_flags( speed_xpackage "${cppad_debug_which}" "${source_list}" ) # ADD_EXECUTABLE( speed_xpackage EXCLUDE_FROM_ALL ${source_list} ) - +# +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(speed_xpackage + ${cppad_lib} + ${colpack_libs} +) # xpackage is an include file only library TARGET_LINK_LIBRARIES(speed_xpackage speed_src ) diff --git a/test_more/cppad_for_tmb/CMakeLists.txt b/test_more/cppad_for_tmb/CMakeLists.txt index 1dd26f449f..271f8e6543 100644 --- a/test_more/cppad_for_tmb/CMakeLists.txt +++ b/test_more/cppad_for_tmb/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-19 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -35,7 +35,11 @@ set_compile_flags( # # now that we have the properties, add the executable ADD_EXECUTABLE( test_more_${name} EXCLUDE_FROM_ALL ${source_list} ) -TARGET_LINK_LIBRARIES(test_more_${name} PRIVATE ${OpenMP_CXX_LIBRARIES}) +TARGET_LINK_LIBRARIES(test_more_${name} PRIVATE + ${cppad_lib} + ${colpack_libs} + ${OpenMP_CXX_LIBRARIES} +) # # Extra flags used by linker for openmp support SET(CMAKE_EXE_LINKER_FLAGS ${OpenMP_CXX_FLAGS} ) diff --git a/test_more/deprecated/CMakeLists.txt b/test_more/deprecated/CMakeLists.txt index ceffbc7ea8..daee338375 100644 --- a/test_more/deprecated/CMakeLists.txt +++ b/test_more/deprecated/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-19 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -33,6 +33,12 @@ set_compile_flags( test_more_deprecated "${cppad_debug_which}" "${source_list}" # ADD_EXECUTABLE(test_more_deprecated EXCLUDE_FROM_ALL ${source_list}) # +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(test_more_deprecated + ${cppad_lib} + ${colpack_libs} +) +# # Add the check_test_more_deprecated target ADD_CUSTOM_TARGET(check_test_more_deprecated test_more_deprecated diff --git a/test_more/deprecated/atomic_two/CMakeLists.txt b/test_more/deprecated/atomic_two/CMakeLists.txt index 56cf115bed..7f7b54732e 100644 --- a/test_more/deprecated/atomic_two/CMakeLists.txt +++ b/test_more/deprecated/atomic_two/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-19 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -44,6 +44,12 @@ ADD_EXECUTABLE(test_more_deprecated_atomic_two EXCLUDE_FROM_ALL ${source_list} ) # +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(test_more_deprecated_atomic_two + ${cppad_lib} + ${colpack_libs} +) +# # Add the check_test_more_deprecated_atomic_two target ADD_CUSTOM_TARGET(check_test_more_deprecated_atomic_two test_more_deprecated_atomic_two diff --git a/test_more/deprecated/chkpoint_one/CMakeLists.txt b/test_more/deprecated/chkpoint_one/CMakeLists.txt index 7eed267fda..68c97b02c1 100644 --- a/test_more/deprecated/chkpoint_one/CMakeLists.txt +++ b/test_more/deprecated/chkpoint_one/CMakeLists.txt @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-19 Bradley M. Bell +# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-22 Bradley M. Bell # # CppAD is distributed under the terms of the # Eclipse Public License Version 2.0. @@ -28,6 +28,12 @@ ADD_EXECUTABLE(test_more_deprecated_chkpoint_one EXCLUDE_FROM_ALL ${source_list} ) # +# List of libraries to be linked into the specified target +TARGET_LINK_LIBRARIES(test_more_deprecated_chkpoint_one + ${cppad_lib} + ${colpack_libs} +) +# # Add the check_test_more_deprecated_chkpoint_one target ADD_CUSTOM_TARGET(check_test_more_deprecated_chkpoint_one test_more_deprecated_chkpoint_one