From eb10cf1375645e76727b1a24eb5eed3d19f8ed19 Mon Sep 17 00:00:00 2001 From: rexy712 Date: Thu, 30 Jun 2022 12:42:43 -0700 Subject: [PATCH] Make dll builds on msvc output to same directory as tests so they should be able to run without manually copying --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d8696e2..335fa85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 3.0.2) include(GNUInstallDirs) include(CMakeDependentOption) +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 1) + set(librexy_VERSION_STRING "000020000L") set(librexy_VERSION_MAJOR 0) set(librexy_VERSION_MINOR 2) @@ -22,6 +24,13 @@ option(BUILD_TESTS "Enable testing" OFF) option(BUILD_HEADER_ONLY "Enable header only build" OFF) mark_as_advanced(ENABLE_PROFILING) +if(MSVC) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out CACHE STRING "") + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out CACHE STRING "") + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out CACHE STRING "") +endif() + + set(CMAKE_CXX_STANDARD 20) set(LIBREXY_PUBLIC_HEADERS "include/rexy/rexy.hpp" "include/rexy/algorithm.hpp" "include/rexy/algorithm.tpp" "include/rexy/utility.hpp" "include/rexy/hash.hpp" "include/rexy/mpmc_queue.hpp" "include/rexy/mpmc_queue.tpp" "include/rexy/traits.hpp" "include/rexy/steal.hpp" "include/rexy/expression.hpp" "include/rexy/string_base.hpp" "include/rexy/string.hpp" "include/rexy/string_base.tpp" "include/rexy/allocator.hpp" "include/rexy/meta.hpp" "include/rexy/buffer.hpp" "include/rexy/buffer.tpp" "include/rexy/debug_print.hpp" "include/rexy/deferred.hpp" "include/rexy/enum_traits.hpp" "include/rexy/storage_for.hpp" "include/rexy/storage_for.tpp" "include/rexy/visitor.hpp" "include/rexy/string_view.hpp" "include/rexy/string_view.tpp" "include/rexy/format.hpp" "include/rexy/format.tpp")