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
|
*.exe
|
||||||
*.out
|
*.out
|
||||||
*.app
|
*.app
|
||||||
|
|
||||||
|
# Debug
|
||||||
|
*.pdb
|
||||||
|
|
||||||
|
# Incremental Linker
|
||||||
|
*.ilk
|
||||||
|
|
||||||
|
# Build directory
|
||||||
|
build/
|
||||||
|
|
|
@ -2,5 +2,9 @@ file(GLOB files "src/example-*.cpp")
|
||||||
foreach (file ${files})
|
foreach (file ${files})
|
||||||
get_filename_component(file_basename ${file} NAME_WE)
|
get_filename_component(file_basename ${file} NAME_WE)
|
||||||
add_executable(${file_basename} ${file})
|
add_executable(${file_basename} ${file})
|
||||||
|
set_target_properties(${file_basename}
|
||||||
|
PROPERTIES
|
||||||
|
CXX_STANDARD 11
|
||||||
|
)
|
||||||
target_link_libraries(${file_basename} ${PROJECT_NAME})
|
target_link_libraries(${file_basename} ${PROJECT_NAME})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
|
@ -8,6 +8,10 @@ foreach (file ${files})
|
||||||
string(REGEX REPLACE "unit-([^$]+)" "test-\\1" testcase ${file_basename})
|
string(REGEX REPLACE "unit-([^$]+)" "test-\\1" testcase ${file_basename})
|
||||||
|
|
||||||
add_executable(${testcase} ${file})
|
add_executable(${testcase} ${file})
|
||||||
|
set_target_properties(${testcase}
|
||||||
|
PROPERTIES
|
||||||
|
CXX_STANDARD 11
|
||||||
|
)
|
||||||
target_link_libraries(${testcase} Catch ${PROJECT_NAME})
|
target_link_libraries(${testcase} Catch ${PROJECT_NAME})
|
||||||
add_test(${testcase} ${testcase})
|
add_test(${testcase} ${testcase})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
Loading…
Reference in New Issue