Text archives Help
- From: bigler@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r526 - trunk
- Date: Thu, 1 Sep 2005 15:59:12 -0600 (MDT)
Author: bigler
Date: Thu Sep 1 15:59:11 2005
New Revision: 526
Modified:
trunk/CMakeLists.txt
Log:
Default to building in Release mode if not set.
Remove message that we were forcing Irix Threads on SGI systems. It
produced annoying chatter.
Added -LANG:std to CMAKE_CXX_FLAGS and other optimization flags to
RELEASE. I still can't make it not override anything you might set in
there as a user. I have a pending message at the cmake@cmake.org
mailing list.
Modified: trunk/CMakeLists.txt
==============================================================================
--- trunk/CMakeLists.txt (original)
+++ trunk/CMakeLists.txt Thu Sep 1 15:59:11 2005
@@ -1,9 +1,23 @@
+# Hello, and welcome the Manta CMake build system. Here you can find
+# many system dependent action. We will try and keep all that in this
+# file rather than in subdirectories.
+
PROJECT (Manta)
SET(BUILD_SHARED_LIBS ON)
SET(CMAKE_VERBOSE_MAKEFILE ON)
-IF (APPLE)
+# Default to building release. I can't tell you how many times folks
+# cry because Manta suddenly got slower. This will hopefully
+# alieviate it some.
+
+IF(NOT CMAKE_BUILD_TYPE)
+ SET(CMAKE_BUILD_TYPE "Release" CACHE STRING
+ "Choose the type of build, options are: Debug Release RelWithDebInfo
MinSizeRel."
+ FORCE)
+ENDIF(NOT CMAKE_BUILD_TYPE)
+
+IF (APPLE)
SET (OPENGL_INCLUDE_DIR /usr/X11R6/include)
SET (OPENGL_gl_LIBRARY /usr/X11R6/lib/libGL.dylib)
SET (OPENGL_glu_LIBRARY /usr/X11R6/lib/libGLU.dylib)
@@ -22,10 +36,17 @@
# Do we have sproc? For now this is forced.
IF(CMAKE_SYSTEM MATCHES IRIX)
+ # MESSAGE("Forcing Irix Threads")
SET(CMAKE_USE_SPROC_INIT 1)
SET(CMAKE_USE_PTHREADS_INIT 0)
SET(CMAKE_THREAD_LIBS_INIT -lfetchop)
- MESSAGE("Forcing Irix Threads")
+ # Check for CC compiler and add -LANG:std to it
+ IF(CMAKE_CXX_COMPILER MATCHES "CC")
+ SET(CMAKE_CXX_FLAGS "-LANG:std"
+ CACHE STRING "Standard CXX flags" FORCE)
+ SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -OPT:IEEE_arithmetic=3"
+ CACHE STRING "Optimized Flags" FORCE)
+ ENDIF(CMAKE_CXX_COMPILER MATCHES "CC")
ELSE(CMAKE_SYSTEM MATCHES IRIX)
# MESSAGE("IRIX not found")
ENDIF(CMAKE_SYSTEM MATCHES IRIX)
@@ -59,11 +80,15 @@
tests
)
-# Only process the swig directory if we have swig stuff
-FIND_PACKAGE(SWIG)
-IF (SWIG_FOUND)
- SET(MAIN_SUBDIRS ${MAIN_SUBDIRS} SwigInterface)
-ENDIF (SWIG_FOUND)
+# Since SWIG support wasn't added to CMake until version 2.0, only do
+# the check if we have a new enough version.
+IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.9)
+ # Only process the swig directory if we have swig stuff
+ FIND_PACKAGE(SWIG)
+ IF (SWIG_FOUND)
+ SET(MAIN_SUBDIRS ${MAIN_SUBDIRS} SwigInterface)
+ ENDIF (SWIG_FOUND)
+ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.9)
SUBDIRS( ${MAIN_SUBDIRS} )
- [MANTA] r526 - trunk, bigler, 09/01/2005
Archive powered by MHonArc 2.6.16.