Fix CMake
This commit is contained in:
parent
ced136a3a4
commit
8532de1479
4 changed files with 3 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue