Revision: 40589
http://brlcad.svn.sourceforge.net/brlcad/?rev=40589&view=rev
Author: starseeker
Date: 2010-09-16 16:27:58 +0000 (Thu, 16 Sep 2010)
Log Message:
-----------
Enable -O3. Later the functionality and option defs will have to be separated
to allow the global build settings a crack at tweaking options before executing
actions, but for now keep them together for easy reading.
Modified Paths:
--------------
brlcad/branches/cmake/CMakeLists.txt
brlcad/branches/cmake/src/rttherm/CMakeLists.txt
Modified: brlcad/branches/cmake/CMakeLists.txt
===================================================================
--- brlcad/branches/cmake/CMakeLists.txt 2010-09-16 16:16:40 UTC (rev
40588)
+++ brlcad/branches/cmake/CMakeLists.txt 2010-09-16 16:27:58 UTC (rev
40589)
@@ -433,7 +433,7 @@
# Enable RTGL. Requires an enabled OpenGL.
# IF(BRLCAD-ENABLE_OPENGL)
-# OPTION(BRLCAD-ENABLE_RTGL "Use Aqua instead of X11 whenever possible on
OSX." ON)
+# OPTION(BRLCAD-ENABLE_RTGL "Enable experimental RTGL code." ON)
# ENDIF(BRLCAD-ENABLE_OPENGL)
# There are extra documentation files available requiring Docbook
@@ -446,9 +446,9 @@
#----------------------------------------------------------------------
# The following are fine-grained options for enabling/disabling compiler
-# settings. Typically these are set to various configurations by the
-# toplevel CMAKE_BUILD_TYPE setting, but can also be individually
-# set.
+# and source code definition settings. Typically these are set to
+# various configurations by the toplevel CMAKE_BUILD_TYPE setting, but
+# can also be individually set.
# Enable/disable runtime debugging - these are protections for
# minimizing the possibility of corrupted data files. Generally
@@ -474,13 +474,22 @@
FILE(APPEND ${CONFIG_H_FILE} "#define NO_DEBUG_CHECKING 1\n")
ENDIF(NOT BRLCAD-ENABLE_RUNTIME_DEBUG)
-# Enable/disable strict compiler settings
+# Enable/disable strict compiler settings - these are limited to libraries that
+# specifically inform the BRLCAD_ADDLIB macro they can be built with STRICT
flags.
OPTION(BRLCAD-ENABLE_STRICT "Use strict compiler settings on libraries that
support them" ON)
MARK_AS_ADVANCED(BRLCAD-ENABLE_STRICT)
+if (BRLCAD-ENABLE_STRICT)
+ FILE(APPEND ${CONFIG_H_FILE} "#define STRICT_FLAGS 1\n")
+ SET(STRICT_FLAGS "-pedantic -W -Wall -Werror -Wno-long-long" CACHE
STRING "strict compiler flags")
+endif (BRLCAD-ENABLE_STRICT)
# Build with O3 compiler optimization
OPTION(BRLCAD-ENABLE_OPTIMIZED_BUILD "Use optimized compiler settings" OFF)
MARK_AS_ADVANCED(BRLCAD-ENABLE_OPTIMIZED_BUILD)
+IF(BRLCAD-ENABLE_OPTIMIZED_BUILD)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
+ENDIF(BRLCAD-ENABLE_OPTIMIZED_BUILD)
# Build with compiler warning flags
OPTION(BRLCAD-ENABLE_COMPILER_WARNINGS "Use compiler warning flags" OFF)
@@ -779,13 +788,6 @@
# a Bourne shell or something compatible.
INCLUDE(${BRLCAD_CMAKE_DIR}/FindSH.cmake)
-# Now that we're done running tests, we can enable strict flags if turned on
-if (BRLCAD-ENABLE_STRICT)
- FILE(APPEND ${CONFIG_H_FILE} "#define STRICT_FLAGS 1\n")
- SET(STRICT_FLAGS "-pedantic -W -Wall -Werror -Wno-long-long" CACHE
STRING "strict compiler flags")
-endif (BRLCAD-ENABLE_STRICT)
-
-
# Virtually all of the BRL-CAD code needs the BRL-CAD include directories
# and a couple of standard defines - set those up in variables now - the
# idea being that if any other system-wide defines or include are needed
Modified: brlcad/branches/cmake/src/rttherm/CMakeLists.txt
===================================================================
--- brlcad/branches/cmake/src/rttherm/CMakeLists.txt 2010-09-16 16:16:40 UTC
(rev 40588)
+++ brlcad/branches/cmake/src/rttherm/CMakeLists.txt 2010-09-16 16:27:58 UTC
(rev 40589)
@@ -4,12 +4,12 @@
${TK_INCLUDE_PATH}
)
-IF(BRLCAD-ENABLE_X11 and BRLCAD-ENABLE_TK)
+IF(BRLCAD-ENABLE_X11 AND BRLCAD-ENABLE_TK)
FOREACH(xlib ${X11_LIBRARIES})
SET(RTTHERM_XLIBS "${RTTHERM_XLIBS} ${xlib}")
ENDFOREACH(xlib ${X11_LIBRARIES})
BRLCAD_ADDEXEC(ssampview "spectrum.c ssampview.c" "liboptical libfb
${TK_LIBRARY} ${RTTHERM_XLIBS}")
-ENDIF(BRLCAD-ENABLE_X11 BRLCAD-ENABLE_TK)
+ENDIF(BRLCAD-ENABLE_X11 AND BRLCAD-ENABLE_TK)
BRLCAD_ADDEXEC(rttherm "spectrum.c viewtherm.c" "librttherm liboptical libfb
libmultispectral libged")
SET_TARGET_PROPERTIES(rttherm PROPERTIES COMPILE_DEFINITIONS
"RT_MULTISPECTRAL")
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits