Skip to content

Instantly share code, notes, and snippets.

@k0mp1ex
Created February 21, 2023 00:38
Show Gist options
  • Save k0mp1ex/a7e807e01ee6cd7122f7cd1899676f64 to your computer and use it in GitHub Desktop.
Save k0mp1ex/a7e807e01ee6cd7122f7cd1899676f64 to your computer and use it in GitHub Desktop.
Build console applications with CMake
cmake_minimum_required(VERSION 3.24)
project(IAmAConsoleApp VERSION 0.0.1 LANGUAGES CXX)
add_executable(${PROJECT_NAME} src/main.cpp)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_23)
target_link_options(${PROJECT_NAME} PRIVATE "/SUBSYSTEM:WINDOWS" "/ENTRY:mainCRTStartup")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment