diff --git a/CMakeLists.txt b/CMakeLists.txt index f6005a1..02c1349 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,13 +31,15 @@ set(GettextTranslate_GMO_BINARY 1) add_definitions(-DCRITERION_BUILDING_DLL=1) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -g -std=gnu99") +if (NOT MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -g -std=gnu99") +endif () if (MSVC) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO") endif () -if (WIN32) +if (WIN32 AND NOT MSVC) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-no-undefined") endif() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index e3d4704..2a575a5 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,6 @@ -set(CMAKE_C_FLAGS "-std=gnu99 -Wall -Wextra") +if (NOT MSVC) + set(CMAKE_C_FLAGS "-std=gnu99 -Wall -Wextra") +endif () include_directories(../include ../src)