mirror of https://github.com/SeanOMik/libki.git
cmake: Set CXX_STANDARD to 11 on examples and tests
This commit is contained in:
parent
54c1e509f6
commit
21ccbf0cd7
|
@ -33,3 +33,12 @@
|
|||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
|
||||
# Debug
|
||||
*.pdb
|
||||
|
||||
# Incremental Linker
|
||||
*.ilk
|
||||
|
||||
# Build directory
|
||||
build/
|
||||
|
|
|
@ -2,5 +2,9 @@ file(GLOB files "src/example-*.cpp")
|
|||
foreach (file ${files})
|
||||
get_filename_component(file_basename ${file} NAME_WE)
|
||||
add_executable(${file_basename} ${file})
|
||||
set_target_properties(${file_basename}
|
||||
PROPERTIES
|
||||
CXX_STANDARD 11
|
||||
)
|
||||
target_link_libraries(${file_basename} ${PROJECT_NAME})
|
||||
endforeach()
|
||||
|
|
|
@ -8,6 +8,10 @@ foreach (file ${files})
|
|||
string(REGEX REPLACE "unit-([^$]+)" "test-\\1" testcase ${file_basename})
|
||||
|
||||
add_executable(${testcase} ${file})
|
||||
set_target_properties(${testcase}
|
||||
PROPERTIES
|
||||
CXX_STANDARD 11
|
||||
)
|
||||
target_link_libraries(${testcase} Catch ${PROJECT_NAME})
|
||||
add_test(${testcase} ${testcase})
|
||||
endforeach()
|
||||
|
|
Loading…
Reference in New Issue