commit 785633a33c14846ccb8bcaa9ab3cc606cf71a5a0 Author: Phuntsok Drak-pa Date: Tue Mar 20 21:41:46 2018 +0100 initial commit diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..cd08f92 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +set(CMAKE_LEGACY_CYGWIN_WIN32 0) +set(CMAKE_BUILD_TYPE Debug) + +project("projet_lzw") + +set(TGT "projet_lzw") +set(${TGT}_VERSION_MAJOR 0) +set(${TGT}_VERSION_MINOR 1) + +set(CXX_COVERAGE_COMPILE_FLAGS "-pedantic -Wall -Wextra -Wold-style-cast -Woverloaded-virtual -Wfloat-equal -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion -Wsign-conversion -Wshadow -Weffc++ -Wredundant-decls -Wdouble-promotion -Winit-self -Wswitch-default -Wswitch-enum -Wundef -Winline -Wunused -Wnon-virtual-dtor") +set(CMAKE_CXX_FLAGS_DEBUG "${CXX_COVERAGE_COMPILE_FLAGS} -DDebug -g -pg") +set(CMAKE_CXX_FLAGS_RELEASE "${CXX_COVERAGE_COMPILE_FLAGS} -O3") + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED YES) +set(CMAKE_CXX_EXTENSIONS OFF) + +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "../bin/") +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "../debug/") + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_COVERAGE_COMPILE_FLAGS}") +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CXX_COVERAGE_COMPILE_FLAGS}") + +include_directories(include) +file(GLOB SOURCES "src/*.cc") +add_executable(${TGT} ${SOURCES}) diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/build/.gitignore b/build/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/build/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/debug/.gitignore b/debug/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/debug/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/src/main.cc b/src/main.cc new file mode 100644 index 0000000..b1f7591 --- /dev/null +++ b/src/main.cc @@ -0,0 +1,6 @@ +#include + +int main(int argc, char* argv[]) { + std::cout << "Hello World!" << std::endl; + return 0; +}