mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-02 20:30:14 +01:00
Merge pull request #2580 from diorcety/ninja
Use OBJECT_DEPENDS and OBJECT_OUTPUTS for precompiled.hpp
This commit is contained in:
commit
bc8ad8860b
@ -703,15 +703,19 @@ endif ()
|
||||
if (MSVC)
|
||||
# default for all sources is to use precompiled headers
|
||||
foreach(source ${sources})
|
||||
set_source_files_properties(${source}
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "/Yuprecompiled.hpp"
|
||||
)
|
||||
if (NOT ${source} STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/src/precompiled.cpp")
|
||||
set_source_files_properties(${source}
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "/Yuprecompiled.hpp"
|
||||
OBJECT_DEPENDS precompiled.hpp
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
# create precompiled header
|
||||
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/precompiled.cpp
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "/Ycprecompiled.hpp"
|
||||
OBJECT_OUTPUTS precompiled.hpp
|
||||
)
|
||||
# C and C++ can not use the same precompiled header
|
||||
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/tweetnacl.c
|
||||
|
Loading…
x
Reference in New Issue
Block a user