aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2019-11-22 00:34:32 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2019-11-22 16:05:03 -0500
commit6e877cf4f49f4b396e3a2e8898eef69188df8fdb (patch)
treef9a5ecceb32f262e897dca9655ab84657a54b57e /CMakeLists.txt
parentcb28447b459fff3a9a154ad4f3c5b51287919658 (diff)
downloadreloc-6e877cf4f49f4b396e3a2e8898eef69188df8fdb.tar.gz
Improve testing
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fef8144..5f17030 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,13 +2,15 @@ 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")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /Wall")
endif()
enable_testing()
+include(CTest)
add_subdirectory(test)
configure_file(version.h.in version.h)