diff options
author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2019-11-22 22:54:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-22 22:54:39 -0500 |
commit | 46ab9c276afee2fb03304aa53089c6c700c7af6e (patch) | |
tree | 59ea6b7a8217c17c0c1e915616f6615cc1813d9c /CMakeLists.txt | |
parent | 46a3e5a6837929d16670ed78e549882f34800ca4 (diff) | |
parent | 2ae80482cd88fb9786d3ff54777b8a462641f29f (diff) | |
download | reloc-46ab9c276afee2fb03304aa53089c6c700c7af6e.tar.gz |
Merge pull request #3 from jhunkeler/improve-testing
Improve testing
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fef8144..e24cc1d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,13 +2,16 @@ cmake_minimum_required(VERSION 2.8.11) project(relocate C) set(VERSION "1.2.2") set(CMAKE_C_STANDARD 99) -if(MSVC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /Wall") -else() +if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" + OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -Wextra") +elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC") + # C4996: The POSIX name for this item is deprecated + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /W4 /wd4996") endif() enable_testing() +include(CTest) add_subdirectory(test) configure_file(version.h.in version.h) |