initial commit
This commit is contained in:
commit
06a423b3d7
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
bin
|
||||
build
|
||||
debug
|
||||
!.gitignore
|
26
CMakeLists.txt
Normal file
26
CMakeLists.txt
Normal file
@ -0,0 +1,26 @@
|
||||
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
|
||||
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
|
||||
|
||||
project("surfaces-unies")
|
||||
|
||||
set(TGT "surfaces-unies")
|
||||
set(${TGT}_VERSION_MAJOR 0)
|
||||
set(${TGT}_VERSION_MINOR 1)
|
||||
|
||||
set(CC_COVERAGE_COMPILE_FLAGS "-pedantic -Wall -Wextra -Wold-style-cast -Woverloaded-virtual -Wfloat-equal -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion -Wshadow -Wredundant-decls -Wdouble-promotion -Winit-self -Wswitch-default -Wswitch-enum -Wundef -Winline")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CC_COVERAGE_COMPILE_FLAGS} -DDebug -g -pg")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CC_COVERAGE_COMPILE_FLAGS} -O3")
|
||||
|
||||
set(CMAKE_CC_STANDARD 11)
|
||||
set(CMAKE_CC_STANDARD_REQUIRED YES)
|
||||
set(CMAKE_CC_EXTENSIONS OFF)
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "../bin/")
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "../debug/")
|
||||
|
||||
set(CMAKE_CC_FLAGS "${CMAKE_CC_FLAGS} ${CC_COVERAGE_COMPILE_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CC_COVERAGE_COMPILE_FLAGS}")
|
||||
|
||||
include_directories(include)
|
||||
file(GLOB SOURCES "src/*")
|
||||
add_executable(${TGT} ${SOURCES})
|
12
Makefile
Normal file
12
Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
release:
|
||||
@mkdir -p build bin
|
||||
@cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make
|
||||
|
||||
debug:
|
||||
@mkdir -p build debug
|
||||
@cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && make
|
||||
|
||||
clean:
|
||||
@rm -rf bin
|
||||
@rm -rf build
|
||||
@rm -rf debug
|
6
src/main.c
Normal file
6
src/main.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
printf("Hello World!\n");
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user