From 8532de14793e58b00c4564621b74b09d1af9d4c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20M=C3=BCller?= Date: Sat, 11 Nov 2017 10:33:01 +0100 Subject: [PATCH] Fix CMake --- example/CMakeLists.txt | 1 + src/CMakeLists.txt | 1 - test/CMakeLists.txt | 1 + tool/CMakeLists.txt | 2 +- 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index c13a6c0..784fd87 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -5,6 +5,7 @@ function(_cppast_example name) add_executable(cppast_example_${name} ${name}.cpp example_parser.hpp) target_link_libraries(cppast_example_${name} PUBLIC cppast) + set_target_properties(cppast_example_${name} PROPERTIES CXX_STANDARD 11) endfunction() _cppast_example(ast_printer) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 26cded2..34aa886 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -116,4 +116,3 @@ endif() if(CPPAST_ENABLE_PRECONDITION_CHECKS) target_compile_definitions(cppast PUBLIC CPPAST_ENABLE_PRECONDITION_CHECKS) endif() -set_target_properties(cppast PROPERTIES CXX_STANDARD 11) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6c75862..281a4b1 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -36,6 +36,7 @@ set(tests add_executable(cppast_test test.cpp test_parser.hpp ${tests}) target_include_directories(cppast_test PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) target_link_libraries(cppast_test PUBLIC cppast) +set_target_properties(cppast_test PROPERTIES CXX_STANDARD 11) enable_testing() add_test(NAME test COMMAND cppast_test) diff --git a/tool/CMakeLists.txt b/tool/CMakeLists.txt index 75661da..63e32a9 100644 --- a/tool/CMakeLists.txt +++ b/tool/CMakeLists.txt @@ -4,4 +4,4 @@ add_executable(cppast_tool main.cpp) target_link_libraries(cppast_tool PUBLIC cppast cxxopts) -set_target_properties(cppast_tool PROPERTIES OUTPUT_NAME cppast) +set_target_properties(cppast_tool PROPERTIES CXX_STANDARD 11 OUTPUT_NAME cppast)