aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-09-13 13:47:30 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-09-14 00:18:49 +0300
commit418e850b2b1f76b204af87a5d930f5129055e09a (patch)
tree470f40f91b500ca1de712689d171433d9dd4d0d5 /test/CMakeLists.txt
parentcall_stack: try to fix __declspec(noinline) #3 (diff)
downloadwinapi-debug-418e850b2b1f76b204af87a5d930f5129055e09a.tar.gz
winapi-debug-418e850b2b1f76b204af87a5d930f5129055e09a.zip
call_stack: can't noinline w/ MSVC, let's try a DLL
Diffstat (limited to '')
-rw-r--r--test/CMakeLists.txt20
1 files changed, 12 insertions, 8 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index c4406c8..8851856 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,17 +1,21 @@
-add_executable(call_stack call_stack.cpp)
-target_link_libraries(call_stack PRIVATE pdb_repo)
-target_link_libraries(call_stack PRIVATE Boost::nowide)
+add_library(test_lib SHARED test_lib.cpp)
+target_link_libraries(test_lib PRIVATE pdb_repo)
+target_link_libraries(test_lib PRIVATE Boost::nowide)
+target_include_directories(test_lib PUBLIC .)
+target_compile_definitions(test_lib PRIVATE TEST_LIB_EXPORTS)
-install(TARGETS call_stack RUNTIME DESTINATION bin/test)
+install(TARGETS test_lib RUNTIME DESTINATION bin/test)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
- install(FILES "$<TARGET_PDB_FILE:call_stack>" DESTINATION bin/test OPTIONAL)
+ install(FILES "$<TARGET_PDB_FILE:test_lib>" DESTINATION bin/test OPTIONAL)
endif()
-add_executable(symbols symbols.cpp)
+add_executable(call_stack call_stack.cpp)
+target_link_libraries(call_stack PRIVATE test_lib)
+target_link_libraries(call_stack PRIVATE Boost::nowide)
-install(TARGETS symbols RUNTIME DESTINATION bin/test)
+install(TARGETS call_stack RUNTIME DESTINATION bin/test)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
- install(FILES "$<TARGET_PDB_FILE:symbols>" DESTINATION bin/test OPTIONAL)
+ install(FILES "$<TARGET_PDB_FILE:call_stack>" DESTINATION bin/test OPTIONAL)
endif()
add_subdirectory(unit_tests)