chore: setup Singleton project
This commit is contained in:
parent
2f5dee3406
commit
2cd107225b
4 changed files with 37 additions and 0 deletions
21
Singleton/CMakeLists.txt
Normal file
21
Singleton/CMakeLists.txt
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
cmake_minimum_required(VERSION 3.20)
|
||||||
|
|
||||||
|
project(
|
||||||
|
Singleton
|
||||||
|
VERSION 0.1.0
|
||||||
|
LANGUAGES CXX)
|
||||||
|
|
||||||
|
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/../cmake")
|
||||||
|
|
||||||
|
include(ExportCompileCommands)
|
||||||
|
include(sccache)
|
||||||
|
|
||||||
|
add_executable(Singleton main.cpp)
|
||||||
|
|
||||||
|
target_compile_features(Singleton PUBLIC cxx_std_20)
|
||||||
|
|
||||||
|
set_target_properties(
|
||||||
|
Singleton
|
||||||
|
PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin"
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin"
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin")
|
4
Singleton/bootstrap.sh
Executable file
4
Singleton/bootstrap.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
cmake -S . -B .build -G Ninja -D CMAKE_EXPORT_COMPILE_COMMANDS=ON
|
||||||
|
ln -s .build/compile_commands.json
|
3
Singleton/build.sh
Executable file
3
Singleton/build.sh
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
cmake --build .build
|
9
Singleton/main.cpp
Normal file
9
Singleton/main.cpp
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
|
std::cout << "Singleton" << std::endl;
|
||||||
|
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
Loading…
Reference in a new issue