Skip to content
Snippets Groups Projects
Commit 02cb73e1 authored by Jö Fahlke's avatar Jö Fahlke
Browse files

Example for a compilation-required-to-fail test

parent e711cf06
No related branches found
No related tags found
1 merge request!36WIP: Example for a compilation-required-to-fail test
Pipeline #5521 passed
......@@ -15,6 +15,7 @@ add_subdirectory(AOBench)
add_subdirectory(atomic)
add_subdirectory(barrier)
add_subdirectory(bitfield)
add_subdirectory(compile_fail)
add_subdirectory(dot)
add_subdirectory(external_sm)
#add_subdirectory(gstorm)
......
cmake_minimum_required(VERSION 3.5)
project(compile_fail)
enable_testing()
set(CMAKE_CXX_STANDARD 14)
set(SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.cpp)
add_executable(${PROJECT_NAME} EXCLUDE_FROM_ALL ${SOURCE_FILES})
add_test(NAME ${PROJECT_NAME}
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR} --target ${PROJECT_NAME})
set_property(TEST ${PROJECT_NAME} PROPERTY WILL_FAIL TRUE)
int main()
{
static_assert(false, "");
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment