Init
This commit is contained in:
commit
09ef97341f
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
build
|
||||||
|
cmake-build-debug
|
||||||
|
cmake-build-release
|
||||||
|
.idea
|
28
CMakeLists.txt
Normal file
28
CMakeLists.txt
Normal 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
5
src/main.cpp
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
std::cout << "hello world";
|
||||||
|
}
|
7
tests/test_main.cpp
Normal file
7
tests/test_main.cpp
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
testing::InitGoogleTest();
|
||||||
|
return RUN_ALL_TESTS();
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue