Created
November 12, 2019 21:58
-
-
Save dsonck92/ef396dc80941128454cc74e8a41ba9a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir build | |
pushd build | |
cmake .. | |
cmake --build . | |
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.15) # Define the minimum CMake version, can go lower | |
project(helloworld) # Your project name | |
add_executable(${PROJECT_NAME}) # Define an executable target, same name as project | |
target_sources(${PROJECT_NAME} # Modern way of adding sources, add it to the executable named above | |
PRIVATE # All "internal" code which will not be used by other external programs | |
main.cpp) # The actual file list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
int main(int argc, char* argv[]) { | |
std::cout << "Hello World" << std::endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment