Re: [CMake] issue with target_link_libraries and MSVC

2016-04-13 Thread Benjamin Ballet via CMake
*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

Re: [CMake] issue with target_link_libraries and MSVC

2016-04-13 Thread Matějů Miroslav , Ing .
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

Re: [CMake] issue with target_link_libraries and MSVC

2016-04-13 Thread Benjamin Ballet via CMake
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}

Re: [CMake] issue with target_link_libraries and MSVC

2016-04-12 Thread Matějů Miroslav , Ing .
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

Re: [CMake] issue with target_link_libraries and MSVC

2016-04-12 Thread Kristian
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