*Cc:* cmake@cmake.org
> *Subject:* Re: [CMake] issue with target_link_libraries and MSVC
>
>
>
> Ho yes, my bad, however there is still the same issue with forward slashes
>
>
>
> I receive the flag with FindOpenMP module. It's sad we can't do :
>
> target_lin
Subject: Re: [CMake] issue with target_link_libraries and MSVC
Ho yes, my bad, however there is still the same issue with forward slashes
I receive the flag with FindOpenMP module. It's sad we can't do :
target_link_libraries(... ${OpenMP_CXX_FLAGS}) for a few target
In the end I add the flags
Ho yes, my bad, however there is still the same issue with forward slashes
I receive the flag with FindOpenMP module. It's sad we can't do :
target_link_libraries(... ${OpenMP_CXX_FLAGS}) for a few target
In the end I add the flags for the whole project :
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}
Hi Benjamin,
MSVC flags start with “forward” slashes: / (However, MSVC also accepts hyphens
(-) in my experience.)
Documentation for /openmp flag: https://msdn.microsoft.com/library/fw509c3b.aspx
Best regards,
Miroslav
From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Benjamin Ballet
I'm not sure, but I think, you should consider 'set_target_properties'
(https://cmake.org/cmake/help/v3.0/command/set_target_properties.html).
E.g.
target_link_libraries(my_target source1.cpp source2.cpp)
set_target_properties(my_target PROPERTIES LINK_FLAGS "\openmp")
2016-04-12 17:29