From 26f1ed27a398f47217d17f4fb25c0b43076beb82 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Tue, 21 May 2019 13:05:17 +0200 Subject: [PATCH] Cleans up CMakeLists --- CMakeLists.txt | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 42680f6..897fc15 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,11 +2,27 @@ cmake_minimum_required(VERSION 3.13) project(PorygonLang) set(CMAKE_CXX_STANDARD 17) -#add_subdirectory(extern) include_directories(extern) -add_library(PorygonLang src/Parser/Lexer.cpp src/Parser/Lexer.hpp src/Parser/TokenKind.hpp src/Parser/Token.hpp src/Parser/Parser.cpp src/Parser/Parser.hpp src/Parser/ParsedStatements/ParsedStatement.hpp src/Parser/ParsedExpressions/ParsedExpression.hpp src/Parser/BinaryOperatorKind.hpp src/Script.cpp src/Script.hpp) -add_executable(PorygonLangTests src/Parser/Lexer.cpp src/Parser/Lexer.hpp src/Parser/TokenKind.hpp src/Parser/Token.hpp src/Parser/LexerTests.cpp src/Parser/Parser.cpp src/Parser/Parser.hpp src/Parser/ParsedStatements/ParsedStatement.hpp src/Parser/ParsedExpressions/ParsedExpression.hpp src/Parser/BinaryOperatorKind.hpp) +set(SRC_FILES + src/Parser/Lexer.cpp + src/Parser/Lexer.hpp + src/Parser/TokenKind.hpp + src/Parser/Token.hpp + src/Parser/Parser.cpp + src/Parser/Parser.hpp + src/Parser/ParsedStatements/ParsedStatement.hpp + src/Parser/ParsedExpressions/ParsedExpression.hpp + src/Parser/BinaryOperatorKind.hpp + src/Script.cpp + src/Script.hpp + ) + +add_library(PorygonLang ${SRC_FILES}) +add_executable(PorygonLangTests + ${SRC_FILES} + src/Parser/LexerTests.cpp + ) target_compile_definitions(PorygonLangTests PRIVATE TESTS_BUILD)