aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-11-11 16:11:33 -0500
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-11-11 16:11:33 -0500
commitff7fbc9431dc1d32eca2923a6e3d17b16f91648c (patch)
treee6dbbcb262fa2c87564f76ac42729929d3dd0cd4 /CMakeLists.txt
parent343eec7ca84123889daa7d1cae41fe61d724a027 (diff)
* use standard CMAKE_BUILD_TYPE
* remove debug_xxx targets * runtest.sh: don't run make
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 12 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f0cd3de3..7c2fddacc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,10 +40,18 @@ endif(NOT WIN32)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
+string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_tolower)
+if(cmake_build_type_tolower STREQUAL "debug")
+ set(CMAKE_BUILD_TYPE "Debug")
+else()
+ set(CMAKE_BUILD_TYPE "Release")
+endif()
+
if(CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_SYSTEM_NAME MATCHES Linux)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -fno-exceptions -fno-check-new -fno-common -fstrict-aliasing")
-
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -fexceptions -fno-check-new -fno-common -fstrict-aliasing")
+ set(CMAKE_CXX_FLAGS_DEBUG "-g3")
+ set(CMAKE_CXX_FLAGS_RELEASE "-g0 -O2")
check_cxx_compiler_flag("-Wextra" COMPILER_SUPPORT_WEXTRA)
if(COMPILER_SUPPORT_WEXTRA)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
@@ -81,8 +89,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
endif(CMAKE_COMPILER_IS_GNUCXX)
if(MSVC)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ")
-
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
option(EIGEN_TEST_SSE2 "Enable/Disable SSE2 in tests/examples" OFF)
if(EIGEN_TEST_SSE2)
if(NOT CMAKE_CL_64)
@@ -156,8 +163,7 @@ if(cmake_generator_tolower MATCHES "makefile")
message(" | * To change that: cmake . -DCMAKE_INSTALL_PREFIX=yourpath")
message("make btest | Build the unit tests")
message("make test | Build and run the unit tests (using CTest)")
- message("make test_qr | Build a specific test, here test_qr. To run it: test/test_qr")
- message("make debug_qr | Build a test with full debug info. To run it: test/debug_qr")
+ message("make test_qr | Build a specific test, here test_qr.")
message("make blas | Build BLAS library (not the same thing as Eigen)")
message("make doc | Generate the API documentation, requires Doxygen & LaTeX")
message("--------------+----------------------------------------------------------------")