Commit e0d11d11 authored by Tullio Menga's avatar Tullio Menga

Enable compilation on MSVC v140_clang_c2 platform

Use cmake/MSVC_v140_clang_c2.cmake to provide specific flags.
INSTALL project now installs .lib on Windows.
parent 24368f18
## FLAGS FOR MSVC v140_clang_c2
set(CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MTd /GR -Od -g2 -gdwarf-2 -std=c++1z -fms-extensions -fexceptions")
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MT /GR -O1 /D NDEBUG -std=c++1z -fms-extensions -fexceptions")
set(CMAKE_CXX_FLAGS_RELEASE_INIT "/MT /GR -O3 /D NDEBUG -std=c++1z -fms-extensions -fexceptions")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MT /GR -O2 /D NDEBUG -gline-tables-only -std=c++1z -fms-extensions -fexceptions")
......@@ -129,7 +129,7 @@ if (NOT CAF_BUILD_STATIC_ONLY)
OUTPUT_NAME caf_core)
if (CYGWIN)
install(TARGETS libcaf_core_shared RUNTIME DESTINATION bin)
elseif (NOT WIN32)
else()
install(TARGETS libcaf_core_shared LIBRARY DESTINATION lib)
endif()
add_dependencies(libcaf_core_shared libcaf_core)
......@@ -140,9 +140,7 @@ if (CAF_BUILD_STATIC_ONLY OR CAF_BUILD_STATIC)
add_library(libcaf_core_static STATIC ${LIBCAF_CORE_HDRS} ${LIBCAF_CORE_SRCS})
target_link_libraries(libcaf_core_static ${LD_FLAGS})
set_target_properties(libcaf_core_static PROPERTIES OUTPUT_NAME caf_core_static)
if(NOT WIN32)
install(TARGETS libcaf_core_static ARCHIVE DESTINATION lib)
endif()
add_dependencies(libcaf_core_static libcaf_core)
endif ()
......
......@@ -188,6 +188,12 @@
# define CAF_POSIX
#endif
#if defined(CAF_WINDOWS)
# if defined(__clang__)
struct IUnknown; // fix for issue with static_cast<> in objbase.h (see https://github.com/philsquared/Catch/issues/690)
# endif
#endif
#include <cstdio>
#include <cstdlib>
......
......@@ -25,6 +25,7 @@
#include <cstdint>
#include <cstddef> // size_t
#include <type_traits>
#include <iterator>
#include "caf/fwd.hpp"
#include "caf/atom.hpp"
......
......@@ -43,7 +43,7 @@ if (NOT CAF_BUILD_STATIC_ONLY)
OUTPUT_NAME caf_io)
if (CYGWIN)
install(TARGETS libcaf_io_shared RUNTIME DESTINATION bin)
elseif (NOT WIN32)
else()
install(TARGETS libcaf_io_shared LIBRARY DESTINATION lib)
endif()
add_dependencies(libcaf_io_shared libcaf_io)
......@@ -54,9 +54,7 @@ if (CAF_BUILD_STATIC_ONLY OR CAF_BUILD_STATIC)
add_library(libcaf_io_static STATIC ${LIBCAF_IO_HDRS} ${LIBCAF_IO_SRCS})
target_link_libraries(libcaf_io_static ${LD_FLAGS} ${CAF_LIBRARY_CORE_STATIC})
set_target_properties(libcaf_io_static PROPERTIES OUTPUT_NAME caf_io_static)
if(NOT WIN32)
install(TARGETS libcaf_io_static ARCHIVE DESTINATION lib)
endif()
add_dependencies(libcaf_io_static libcaf_io)
endif ()
......
......@@ -43,7 +43,7 @@ namespace io {
/// Manages brokers and network backends.
class middleman : public actor_system::module {
public:
friend class actor_system;
friend class ::caf::actor_system;
using hook_vector = std::vector<hook_uptr>;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment