summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-12-01 19:55:00 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-12-01 20:32:13 +0100
commitf9c5ec11383d71504ae59c6084ab7b46c3832a17 (patch)
tree3f97b9bb56768531a8a847ca3b51a55f4bd1a211 /test
parent03917e76108e3d45e73a93905ffc05423dd672df (diff)
cmake: allow more parallelization
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt16
-rw-r--r--test/dummy.cc0
2 files changed, 9 insertions, 7 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index d7d202dc..adcd246f 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -3,19 +3,21 @@ file(GLOB sources "*.cpp" CONFIGURE_ARGS)
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/test")
-link_libraries(Magnum::GL Magnum::Trade)
-link_libraries(floormat-loader floormat-serialize floormat)
+add_library(${self}_o STATIC ${sources})
+target_link_libraries(${self}_o PUBLIC Magnum::GL Magnum::Trade nlohmann_json::nlohmann_json)
if(APPLE)
- link_libraries(Magnum::WindowlessCglApplication)
+ target_link_libraries(${self}_o PUBLIC Magnum::WindowlessCglApplication)
elseif(WIN32)
- link_libraries(Magnum::WindowlessWglApplication)
- link_libraries(ntdll)
+ target_link_libraries(${self}_o PUBLIC Magnum::WindowlessWglApplication)
+ target_link_libraries(${self}_o PUBLIC ntdll)
else()
- link_libraries(Magnum::WindowlessGlxApplication)
+ target_link_libraries(${self}_o PUBLIC Magnum::WindowlessGlxApplication)
endif()
-add_executable(${self} "${sources}")
+add_executable(${self} dummy.cc)
+target_link_libraries(${self} PUBLIC ${self}_o floormat-loader floormat-serialize floormat)
+
if(FLOORMAT_PRECOMPILED-HEADERS)
target_precompile_headers(${self} PRIVATE precomp.hpp)
endif()
diff --git a/test/dummy.cc b/test/dummy.cc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/dummy.cc