From 9712a242100346fdb274ddbfb24e7d531c282457 Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Fri, 4 Nov 2016 09:47:09 +0100 Subject: [PATCH] Detect CXX compiler by default --- CMakeLists.txt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ddcaa06..861225a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,15 +15,15 @@ cmake_minimum_required (VERSION 2.8.5) if (NOT DEFINED CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type") + set (CMAKE_BUILD_TYPE Release CACHE STRING "Build type") endif () -project (nlopt C) +project (nlopt) list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) option (WITH_CXX "enable cxx routines" OFF) -option (BUILD_SHARED_LIBS "Build NLOPT as a shared library" ON) +option (BUILD_SHARED_LIBS "Build NLopt as a shared library" ON) option (BUILD_PYTHON "build python bindings" ON) option (BUILD_OCTAVE "build octave bindings" ON) option (BUILD_MATLAB "build matlab bindings" ON) @@ -35,10 +35,6 @@ if (WITH_CXX) set (NLOPT_SUFFIX _cxx) endif () -if (WITH_CXX OR BUILD_PYTHON OR BUILD_GUILE OR BUILD_OCTAVE) - enable_language (CXX) -endif () - include (GNUInstallDirs) # Offer the user the choice of overriding the installation directories -- 2.30.2