19 lines
442 B
CMake
19 lines
442 B
CMake
cmake_minimum_required(VERSION 3.18)
|
|
project(polymorphism)
|
|
|
|
if (PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
|
|
message(FATAL_ERROR "In-Source builds are not allowed")
|
|
endif()
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
file(GLOB_RECURSE HEADERS "include/*.h")
|
|
|
|
file(GLOB_RECURSE SOURCES "src/*.cpp" "main.cpp")
|
|
|
|
include_directories("include")
|
|
|
|
add_executable(polymorphism ${SOURCES})
|
|
|
|
set_target_properties(polymorphism PROPERTIES LINKER_LANGUAGE CXX)
|