This commit is contained in:
MaxanRus 2021-09-24 16:34:56 +03:00
commit 09ef97341f
4 changed files with 44 additions and 0 deletions

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
build
cmake-build-debug
cmake-build-release
.idea

28
CMakeLists.txt Normal file
View file

@ -0,0 +1,28 @@
cmake_minimum_required(VERSION 3.10)
project("Formalang")
# set(CMAKE_CXX_FLAGS "-O3")
find_package(GTest REQUIRED)
find_package(Threads REQUIRED)
include_directories(
"include"
${GTEST_INCLUDE_DIRS}
${Boost_INCLUDE_DIR}
)
set(CMAKE_CXX_STANDARD 17)
set(SOURCE_FILES)
set(TEST_FILES)
add_executable(Formalang src/main.cpp ${SOURCE_FILES})
add_executable(Tests tests/test_main.cpp ${TEST_FILES} ${SOURCE_FILES})
target_link_libraries(Tests ${GTEST_LIBRARIES} Threads::Threads)
target_link_libraries(Formalang Threads::Threads)

5
src/main.cpp Normal file
View file

@ -0,0 +1,5 @@
#include <iostream>
int main() {
std::cout << "hello world";
}

7
tests/test_main.cpp Normal file
View file

@ -0,0 +1,7 @@
#include <gtest/gtest.h>
int main() {
testing::InitGoogleTest();
return RUN_ALL_TESTS();
}