chiark / gitweb /
Detect CXX compiler by default
authorJulien Schueller <schueller@phimeca.com>
Fri, 4 Nov 2016 08:47:09 +0000 (09:47 +0100)
committerJulien Schueller <schueller@phimeca.com>
Fri, 4 Nov 2016 08:47:09 +0000 (09:47 +0100)
CMakeLists.txt

index ddcaa060f4242e835cfc42c784fde95e0a7e456d..861225a5150e8887cd6f2ecea077a459020b3574 100644 (file)
 cmake_minimum_required (VERSION 2.8.5)\r
 \r
 if (NOT DEFINED CMAKE_BUILD_TYPE)\r
-  set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type")\r
+  set (CMAKE_BUILD_TYPE Release CACHE STRING "Build type")\r
 endif ()\r
 \r
-project (nlopt C)\r
+project (nlopt)\r
 \r
 list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)\r
 \r
 option (WITH_CXX "enable cxx routines" OFF)\r
-option (BUILD_SHARED_LIBS "Build NLOPT as a shared library" ON)\r
+option (BUILD_SHARED_LIBS "Build NLopt as a shared library" ON)\r
 option (BUILD_PYTHON "build python bindings" ON)\r
 option (BUILD_OCTAVE "build octave bindings" ON)\r
 option (BUILD_MATLAB "build matlab bindings" ON)\r
@@ -35,10 +35,6 @@ if (WITH_CXX)
   set (NLOPT_SUFFIX _cxx)\r
 endif ()\r
 \r
-if (WITH_CXX OR BUILD_PYTHON OR BUILD_GUILE OR BUILD_OCTAVE)\r
-  enable_language (CXX)\r
-endif ()\r
-\r
 include (GNUInstallDirs)\r
 \r
 # Offer the user the choice of overriding the installation directories\r