From 34755dcfc603e12aaf504c55df71c951386856db Mon Sep 17 00:00:00 2001 From: Nikolay Orlyuk Date: Thu, 27 Feb 2014 16:38:02 +0200 Subject: [PATCH] buildable under ubuntu --- CMakeLists.txt | 3 ++- cmake_modules/FindGTest.cmake | 2 +- test/CMakeLists.txt | 1 - test_ansi/CMakeLists.txt | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 93e108d..0bb8fc1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,8 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH}) set(ENABLE_TRACES FALSE CACHE BOOL "Trace to stderr all parsing steps") set(DEVELOPMENT TRUE CACHE BOOL "Development mode (more suitable makefiles)") -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -Wno-unused-function") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -Wno-unused-function -Wno-missing-field-initializers") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c1x") if(ENABLE_TRACES) add_definitions(-DENABLE_TRACES) endif() diff --git a/cmake_modules/FindGTest.cmake b/cmake_modules/FindGTest.cmake index 7a765b9..97f3874 100644 --- a/cmake_modules/FindGTest.cmake +++ b/cmake_modules/FindGTest.cmake @@ -80,7 +80,7 @@ function(GTEST_ADD_TESTS executable extra_args) message(FATAL_ERROR "Missing ARGN: Read the documentation for GTEST_ADD_TESTS") endif() if(ARGN STREQUAL "AUTO") - get_target_property(ARGN ${executable} SOURCES) + get_property(ARGN TARGET ${executable} PROPERTY SOURCES) endif() foreach(source ${ARGN}) file(READ "${source}" contents) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5ea1c25..cdb1c19 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -22,4 +22,3 @@ foreach(TEST ${TESTS}) endif() endforeach() add_dependencies(check ${TESTS}) - diff --git a/test_ansi/CMakeLists.txt b/test_ansi/CMakeLists.txt index e6472b8..ec7ac8f 100644 --- a/test_ansi/CMakeLists.txt +++ b/test_ansi/CMakeLists.txt @@ -7,4 +7,3 @@ foreach(TEST c cpp) target_link_libraries(dummy-${TEST} pjson) add_dependencies(check dummy-${TEST}) endforeach() -