Text archives Help
- From: bigler@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [Manta] r1911 - in trunk: . CMake
- Date: Thu, 6 Dec 2007 22:20:14 -0700 (MST)
Author: bigler
Date: Thu Dec 6 22:20:13 2007
New Revision: 1911
Modified:
trunk/CMake/CompilerInfo.cmake
trunk/CMake/ConfigCompilerFlags.cmake
trunk/CMakeLists.txt
Log:
CMake/CompilerInfo.cmake
Find Intel's icl compiler for windows.
CMake/ConfigCompilerFlags.cmake
For VS and ICL, encorporate the defaults for C_FLAGS and CXX_FLAGS.
Turn off secore deprecated warning for ICL.
CMakeLists.txt
Default to static libraries on windows as well as cygwin.
Modified: trunk/CMake/CompilerInfo.cmake
==============================================================================
--- trunk/CMake/CompilerInfo.cmake (original)
+++ trunk/CMake/CompilerInfo.cmake Thu Dec 6 22:20:13 2007
@@ -51,6 +51,19 @@
ADD_DEFINITIONS(-DNOMINMAX)
ENDIF(CMAKE_C_COMPILER MATCHES ${MANTA_COMPILER_NAME_REGEXPR}
AND CMAKE_CXX_COMPILER MATCHES ${MANTA_COMPILER_NAME_REGEXPR})
+
+# Intel compiler on windows. Make sure this goes after the cl one.
+SET(MANTA_COMPILER_NAME_REGEXPR "icl.exe$")
+IF(CMAKE_C_COMPILER MATCHES ${MANTA_COMPILER_NAME_REGEXPR}
+ AND CMAKE_CXX_COMPILER MATCHES ${MANTA_COMPILER_NAME_REGEXPR})
+ SET(USING_WINDOWS_ICL TRUE)
+ SET(USING_WINDOWS_CL FALSE)
+ # We should set this macro as well to get our nice trig functions
+ ADD_DEFINITIONS(-D_USE_MATH_DEFINES)
+ # Microsoft does some stupid things like #define min and max.
+ ADD_DEFINITIONS(-DNOMINMAX)
+ENDIF(CMAKE_C_COMPILER MATCHES ${MANTA_COMPILER_NAME_REGEXPR}
+ AND CMAKE_CXX_COMPILER MATCHES ${MANTA_COMPILER_NAME_REGEXPR})
# Do some error checking
# Mixing compilers
Modified: trunk/CMake/ConfigCompilerFlags.cmake
==============================================================================
--- trunk/CMake/ConfigCompilerFlags.cmake (original)
+++ trunk/CMake/ConfigCompilerFlags.cmake Thu Dec 6 22:20:13 2007
@@ -102,9 +102,23 @@
SET(WARNING_FLAGS "/wd4305 /wd4996")
IF (USING_WINDOWS_CL)
+ # These have good defaults
+ APPEND_TO_STRING(C_FLAGS ${CMAKE_C_FLAGS_INIT})
+ APPEND_TO_STRING(CXX_FLAGS ${CMAKE_CXX_FLAGS_INIT})
+ # These are the warnings
APPEND_TO_STRING(C_FLAGS ${WARNING_FLAGS})
APPEND_TO_STRING(CXX_FLAGS ${WARNING_FLAGS})
ENDIF(USING_WINDOWS_CL)
+
+SET(WARNING_FLAGS "/D_CRT_SECURE_NO_DEPRECATE=1")
+IF (USING_WINDOWS_ICL)
+ # These have good defaults
+ APPEND_TO_STRING(C_FLAGS ${CMAKE_C_FLAGS_INIT})
+ APPEND_TO_STRING(CXX_FLAGS ${CMAKE_CXX_FLAGS_INIT})
+ # These are the warnings
+ APPEND_TO_STRING(C_FLAGS ${WARNING_FLAGS})
+ APPEND_TO_STRING(CXX_FLAGS ${WARNING_FLAGS})
+ENDIF(USING_WINDOWS_ICL)
##############################################################
## IA64
Modified: trunk/CMakeLists.txt
==============================================================================
--- trunk/CMakeLists.txt (original)
+++ trunk/CMakeLists.txt Thu Dec 6 22:20:13 2007
@@ -20,12 +20,14 @@
ENDIF(BUILD_TESTING)
SET(DEFAULT_BUILD_SHARED_LIBS ON)
-IF (CYGWIN)
+IF (CYGWIN OR WINDOWS)
# I can't get Manta to run with shared libraries. This, at least,
# let's me run for now. I'm not sure how this will work for the
# wxPython version.
+ #
+ # For now the windows version is built statically.
SET(DEFAULT_BUILD_SHARED_LIBS OFF)
-ENDIF (CYGWIN)
+ENDIF (CYGWIN OR WINDOWS)
SET(BUILD_SHARED_LIBS ${DEFAULT_BUILD_SHARED_LIBS} CACHE BOOL "Building
shared or static libraries")
# Turn off chatty makefiles by default. To make them chatty again,
- [Manta] r1911 - in trunk: . CMake, bigler, 12/07/2007
Archive powered by MHonArc 2.6.16.