diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2013-09-22 21:35:29 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2013-09-22 21:35:29 (GMT) |
commit | 40a198a0870d53f491ba72a95a57b9f405d031c0 (patch) | |
tree | 0ab33a5d68cc86c76bd1b038e5aa27f566bd6c20 /tests | |
parent | 5f36117b8ff7e14ae450e770cdaa67e60561672d (diff) |
tweaks for building on older machines
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 387d6ee..5405d04 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -38,8 +38,17 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}") # Build debug build as default if(NOT CMAKE_BUILD_TYPE) -# set(CMAKE_BUILD_TYPE RelWithDebInfo) - set(CMAKE_BUILD_TYPE Release) + # set(CMAKE_BUILD_TYPE Release) + if(CMAKE_COMPILER_IS_GNUCXX) + execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) + if (GCC_VERSION VERSION_GREATER 4.6) + set(CMAKE_BUILD_TYPE RelWithDebInfo) + else() + set(CMAKE_BUILD_TYPE Debug) + endif() + else() + set(CMAKE_BUILD_TYPE RelWithDebInfo) + endif() endif() if(CMAKE_COMPILER_IS_GNUCXX) |