chiark / gitweb /
Enable CXX by default (#198)
[nlopt.git] / CMakeLists.txt
index d9fb57bcd0bf5a33211784e92f6f2adf5b125746..f34bd5d353208b9aea822959dc5172e5a04b001d 100644 (file)
@@ -37,7 +37,7 @@ set(SO_PATCH 0)
 
 list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
 
-option (NLOPT_CXX "enable cxx routines" OFF)
+option (NLOPT_CXX "enable cxx routines" ON)
 option (BUILD_SHARED_LIBS "Build NLopt as a shared library" ON)
 option (NLOPT_PYTHON "build python bindings" ON)
 option (NLOPT_OCTAVE "build octave bindings" ON)
@@ -52,11 +52,6 @@ else ()
   option (NLOPT_TESTS "build unit tests" OFF)
 endif ()
 
-set (NLOPT_SUFFIX)
-if (NLOPT_CXX)
-  set (NLOPT_SUFFIX _cxx)
-endif ()
-
 include (GNUInstallDirs)
 
 # Offer the user the choice of overriding the installation directories
@@ -226,7 +221,7 @@ endif ()
 
 install (FILES ${NLOPT_HEADERS} DESTINATION ${RELATIVE_INSTALL_INCLUDE_DIR})
 
-set (nlopt_lib nlopt${NLOPT_SUFFIX})
+set (nlopt_lib nlopt)
 add_library (${nlopt_lib} ${NLOPT_SOURCES})
 target_link_libraries (${nlopt_lib} ${M_LIBRARY})