From 6b009273e76711fd484d436d0b6835cc6aa32089 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 18 Oct 2020 00:34:02 +0300 Subject: cmake: files are per-directory, not per-extension --- client/CMakeLists.txt | 5 ++--- server/lexer/CMakeLists.txt | 5 ++--- server/main/CMakeLists.txt | 5 ++--- test/benchmarks/CMakeLists.txt | 4 ++-- test/unit_tests/CMakeLists.txt | 4 ++-- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index dba0eea..f9765bd 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -1,6 +1,5 @@ -file(GLOB client_cpp "*.cpp") -file(GLOB client_hpp "*.hpp") -add_executable(client ${client_cpp} ${client_hpp}) +file(GLOB client_src "*.cpp" "*.hpp") +add_executable(client ${client_src}) set_target_properties(client PROPERTIES OUTPUT_NAME math-client) set(CMAKE_THREAD_PREFER_PTHREAD ON) diff --git a/server/lexer/CMakeLists.txt b/server/lexer/CMakeLists.txt index fffb5a3..68914d9 100644 --- a/server/lexer/CMakeLists.txt +++ b/server/lexer/CMakeLists.txt @@ -1,6 +1,5 @@ -file(GLOB_RECURSE lexer_cpp "*.cpp") -file(GLOB_RECURSE lexer_hpp "*.hpp") -add_library(lexer ${lexer_cpp} ${lexer_hpp}) +file(GLOB_RECURSE lexer_src "*.cpp" "*.hpp") +add_library(lexer ${lexer_src}) target_include_directories(lexer PUBLIC ..) target_link_libraries(lexer PUBLIC common) diff --git a/server/main/CMakeLists.txt b/server/main/CMakeLists.txt index 5457c7b..0111e4b 100644 --- a/server/main/CMakeLists.txt +++ b/server/main/CMakeLists.txt @@ -1,8 +1,7 @@ option(DEBUG_ASIO "enable debug output for Boost.Asio" OFF) -file(GLOB server_cpp "*.cpp") -file(GLOB server_hpp "*.hpp") -add_executable(server ${server_cpp} ${server_hpp}) +file(GLOB server_src "*.cpp" "*.hpp") +add_executable(server ${server_src}) set_target_properties(server PROPERTIES OUTPUT_NAME math-server) if(DEBUG_ASIO) target_compile_definitions(server PRIVATE BOOST_ASIO_ENABLE_HANDLER_TRACKING) diff --git a/test/benchmarks/CMakeLists.txt b/test/benchmarks/CMakeLists.txt index 340dbcc..0e168cc 100644 --- a/test/benchmarks/CMakeLists.txt +++ b/test/benchmarks/CMakeLists.txt @@ -1,5 +1,5 @@ -file(GLOB benchmarks_cpp "*.cpp") -add_executable(benchmarks ${benchmarks_cpp}) +file(GLOB benchmarks_src "*.cpp") +add_executable(benchmarks ${benchmarks_src}) set_target_properties(benchmarks PROPERTIES OUTPUT_NAME math-server-benchmarks) target_link_libraries(benchmarks PRIVATE lexer) diff --git a/test/unit_tests/CMakeLists.txt b/test/unit_tests/CMakeLists.txt index d84829d..099fc2c 100644 --- a/test/unit_tests/CMakeLists.txt +++ b/test/unit_tests/CMakeLists.txt @@ -1,5 +1,5 @@ -file(GLOB unit_tests_cpp "*.cpp") -add_executable(unit_tests ${unit_tests_cpp}) +file(GLOB unit_tests_src "*.cpp") +add_executable(unit_tests ${unit_tests_src}) set_target_properties(unit_tests PROPERTIES OUTPUT_NAME math-server-unit-tests) target_link_libraries(unit_tests PRIVATE lexer parser) -- cgit v1.2.3