[Avida-SVN] r1698 - development
brysonda at myxo.css.msu.edu
brysonda at myxo.css.msu.edu
Tue Jun 19 20:03:23 PDT 2007
Author: brysonda
Date: 2007-06-19 23:03:23 -0400 (Tue, 19 Jun 2007)
New Revision: 1698
Modified:
development/CMakeLists.txt
Log:
This should fix the CMake build so that it will only include the -fno-fused-madd flag on platforms that accept it.
Modified: development/CMakeLists.txt
===================================================================
--- development/CMakeLists.txt 2007-06-20 02:22:38 UTC (rev 1697)
+++ development/CMakeLists.txt 2007-06-20 03:03:23 UTC (rev 1698)
@@ -38,6 +38,15 @@
SET(COMPILER_OPTIMIZATION_FLAGS "-ffast-math -fno-rtti -funroll-loops -fstrict-aliasing -ftree-vectorize -fvisibility-inlines-hidden")
ENDIF (CMAKE_CXX_COMPILER MATCHES ".*pathCC.*")
+ INCLUDE(CheckCSourceCompiles)
+ SET(CMAKE_REQUIRED_FLAGS "-mno-fused-madd")
+ CHECK_C_SOURCE_COMPILES("int main() { return 0; }" HAVE_FUSED_MADD)
+ SET(CMAKE_REQUIRED_FLAGS "")
+
+ IF(HAVE_FUSED_MADD)
+ SET(COMPILER_OPTIMIZATION_FLAGS "-mno-fused-madd ${COMPILER_OPTIMIZATION_FLAGS}")
+ ENDIF(HAVE_FUSED_MADD)
+
# Four types of c++ compilations:
# - debug (Debug)
# - minimum-size release (MinSizeRel)
More information about the Avida-cvs
mailing list