Files
cuberite-2a/tests/FastRandom/CMakeLists.txt
T

44 lines
980 B
CMake
Raw Normal View History

2018-01-03 17:41:16 +00:00
cmake_minimum_required(VERSION 3.0.2)
2016-08-03 08:35:42 +01:00
enable_testing()
add_definitions(-DTEST_GLOBALS=1)
include_directories(${CMAKE_SOURCE_DIR}/src/)
add_definitions(-DTEST_GLOBALS=1)
set (SHARED_SRCS
${CMAKE_SOURCE_DIR}/src/FastRandom.cpp
${CMAKE_SOURCE_DIR}/src/OSSupport/StackTrace.cpp
2017-06-19 11:05:19 +02:00
${CMAKE_SOURCE_DIR}/src/OSSupport/WinStackWalker.cpp
2016-08-03 08:35:42 +01:00
)
set (SHARED_HDRS
${CMAKE_SOURCE_DIR}/src/FastRandom.h
${CMAKE_SOURCE_DIR}/src/OSSupport/StackTrace.h
2017-06-19 11:05:19 +02:00
${CMAKE_SOURCE_DIR}/src/OSSupport/WinStackWalker.h
2016-08-03 08:35:42 +01:00
)
set (SRCS
FastRandomTest.cpp
)
source_group("Shared" FILES ${SHARED_SRCS} ${SHARED_HDRS})
source_group("Sources" FILES ${SRCS})
add_executable(FastRandom-exe ${SRCS} ${SHARED_SRCS} ${SHARED_HDRS})
2018-01-03 17:41:16 +00:00
target_link_libraries(FastRandom-exe fmt::fmt)
2016-08-03 08:35:42 +01:00
if (WIN32)
target_link_libraries(FastRandom-exe ws2_32)
endif()
add_test(NAME FastRandom-test COMMAND FastRandom-exe)
# Put the projects into solution folders (MSVC):
set_target_properties(
FastRandom-exe
PROPERTIES FOLDER Tests
)