chiark
/
gitweb
/
~ianmdlvl
/
nlopt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8caf3f6
)
make sure testopt is linked with C++ linker for nlopt_cxx
author
Steven G. Johnson
<stevenj@alum.mit.edu>
Thu, 26 Jul 2018 16:58:26 +0000
(12:58 -0400)
committer
Steven G. Johnson
<stevenj@alum.mit.edu>
Thu, 26 Jul 2018 16:58:26 +0000
(12:58 -0400)
test/CMakeLists.txt
patch
|
blob
|
history
diff --git
a/test/CMakeLists.txt
b/test/CMakeLists.txt
index 8871312da3016a6c95d911b699f622387461a168..224ac9c145d8c8feaf30b4a3e3c2b76650d58ae6 100644
(file)
--- a/
test/CMakeLists.txt
+++ b/
test/CMakeLists.txt
@@
-4,6
+4,9
@@
add_custom_target (tests)
add_executable (testopt testfuncs.c testfuncs.h testopt.c
${PROJECT_SOURCE_DIR}/src/util/timer.c ${PROJECT_SOURCE_DIR}/src/util/mt19937ar.c ${PROJECT_SOURCE_DIR}/src/util/nlopt-getopt.c)
target_link_libraries (testopt ${nlopt_lib})
+if (NLOPT_CXX)
+ set_target_properties(testopt PROPERTIES LINKER_LANGUAGE CXX)
+endif ()
target_include_directories (testopt PRIVATE ${NLOPT_PRIVATE_INCLUDE_DIRS})
add_dependencies (tests testopt)