mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
* use standard CMAKE_BUILD_TYPE
* remove debug_xxx targets * runtest.sh: don't run make
This commit is contained in:
@@ -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("--------------+----------------------------------------------------------------")
|
||||
|
||||
Reference in New Issue
Block a user