Commit f66c49a6 authored by Yann Diorcet's avatar Yann Diorcet

Fix precompiled

parent 6ad533be
...@@ -703,15 +703,19 @@ endif () ...@@ -703,15 +703,19 @@ endif ()
if (MSVC) if (MSVC)
# default for all sources is to use precompiled headers # default for all sources is to use precompiled headers
foreach(source ${sources}) foreach(source ${sources})
set_source_files_properties(${source} if (NOT ${source} STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/src/precompiled.cpp")
PROPERTIES set_source_files_properties(${source}
COMPILE_FLAGS "/Yuprecompiled.hpp" PROPERTIES
) COMPILE_FLAGS "/Yuprecompiled.hpp"
OBJECT_DEPENDS precompiled.hpp
)
endif()
endforeach() endforeach()
# create precompiled header # create precompiled header
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/precompiled.cpp set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/precompiled.cpp
PROPERTIES PROPERTIES
COMPILE_FLAGS "/Ycprecompiled.hpp" COMPILE_FLAGS "/Ycprecompiled.hpp"
OBJECT_OUTPUTS precompiled.hpp
) )
# C and C++ can not use the same precompiled header # C and C++ can not use the same precompiled header
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/tweetnacl.c set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/src/tweetnacl.c
......
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