Build a basic "hello world" with CMake

This commit is contained in:
Ron Hough 2023-03-04 12:38:01 -06:00
parent 956b321d71
commit 4372688574
3 changed files with 27 additions and 0 deletions

12
.gitignore vendored Normal file
View File

@ -0,0 +1,12 @@
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
build

7
CMakeLists.txt Normal file
View File

@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 3.24.2)
set (CMAKE_CXX_STANDARD 11)
project (cppchallenge)
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "build")
file(GLOB SOURCES "src/*.cpp")
add_executable(cppchallenge ${SOURCES})

8
src/cppchallenge.cpp Normal file
View File

@ -0,0 +1,8 @@
#include<iostream>
int main(int argc, char *argv[]){
std::cout << "Hello World!" << std::endl;
return 0;
}
// vim: set ts=4 expandtab :