diff options
author | Daniil Cherednik <dan.cherednik@gmail.com> | 2016-07-18 00:28:51 +0300 |
---|---|---|
committer | Daniil Cherednik <dan.cherednik@gmail.com> | 2016-07-18 00:28:51 +0300 |
commit | d831e9ebb098a585792dedd62a3c01e59c4656a2 (patch) | |
tree | 882aa49feeaf8f69b829d34ec103b7c80d57fe9b /CMakeLists.txt | |
parent | 91a4ae90590356b513e5f882ff81a5ca9fda961d (diff) | |
download | atracdenc-d831e9ebb098a585792dedd62a3c01e59c4656a2.tar.gz |
Compilation fixed
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2bce62f..6b36f06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,18 @@ endmacro(use_cxx11) use_cxx11() +macro(use_c11) + if (CMAKE_VERSION VERSION_LESS "3.1") + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") + set (CMAKE_C_FLAGS "--std=gnu11 ${CMAKE_C_FLAGS}") + endif () + else () + set (CMAKE_C_STANDARD 11) + endif () +endmacro(use_c11) + +use_c11() + add_subdirectory(3rd/gtest-1.7.0) add_subdirectory(src) add_subdirectory(test) |