   Suppress warnings with CMake
  Hi,I am trying to compile my program using CMake and want to supress the warnings coming from external libraries, which were not written by me.I heard rumors that there are two ways to do this, either by 1. using a compiler-flag likeSET(CMAKE_CXX_FLAGS "-isystem${MYPROJECT_MAIN_DIR}/include")or2. by telling CMake that the include-folders belong to a system library by adding SYSTEM to the include-directories like thisINCLUDE_DIRECTORIES(SYSTEM /usr/include/externallibrary)unfortunately, both versions do not seem to work.Can anyone suggest a solution to me?Martin   
  What are the actual warnings you are getting?   ;  There are about 708 warnings just for a very small program using the thrust library.Here's the code: // includes //#include <iostream>#include <cuda_runtime.h>#include <thrust/version.h>#include <thrust/host_vector.h>#include <thrust/device_vector.h>#include <thrust/copy.h>#include <thrust/fill.h>#include <thrust/sequence.h>#include <thrust/transform.h>#include <thrust/replace.h>#include <thrust/functional.h>int main(int argc, char **argv) {// H has storage for 4 integers    thrust::host_vector<int> H(4);    // initialize individual elements    H[0] = 14;    H[1] = 20;    H[2] = 38;    H[3] = 46;    // H.size() returns the size of vector H    std::cout << "H has size " << H.size() << std::endl;    // print contents of H    for(int i = 0; i < H.size(); i++)   std::cout << "H[" << i << "] = " << H << ",  ";    std::cout << std::endl;    // resize H    H.resize(2);    std::cout << "H now has size " << H.size() << std::endl;    // Copy host_vector H to device_vector D    thrust::device_vector<int> D = H;    // elements of D can be modified    D[0] = 99;    D[1] = 88;    // print contents of D    for(int i = 0; i < D.size(); i++)   std::cout << "D[" << i << "] = " << D << ",  ";    std::cout << std::endl;}and here are some of the warnings. They only appear because I set a very high warning level. But I want this high level warnings to check my own code./afs/cg.cs.tu-bs.de/home/lib64/thrust/detail/vector_base.inl:1002: instantiated from ‘void thrust::detail::vector_base<T, Alloc>::allocate_and_copy(size_t, ForwardIterator, ForwardIterator, size_t&, thrust::detail::normal_iterator<typename Alloc::pointer>&) [with ForwardIterator = thrust::detail::normal_iterator<thrust::device_ptr<const int> >, T = int, Alloc = thrust::device_malloc_allocator<int>]’/afs/cg.cs.tu-bs.de/home/lib64/thrust/detail/vector_base.inl:204: instantiated from ‘void thrust::detail::vector_base<T, Alloc>::range_init(ForwardIterator, ForwardIterator, thrust::detail::false_type) [with ForwardIterator = thrust::detail::normal_iterator<thrust::device_ptr<const int> >, T = int, Alloc = thrust::device_malloc_allocator<int>]’/afs/cg.cs.tu-bs.de/home/lib64/thrust/detail/vector_base.inl:79: instantiated from ‘thrust::detail::vector_base<T, Alloc>::vector_base(const thrust::detail::vector_base<T, Alloc>&) [with T = int, Alloc = thrust::device_malloc_allocator<int>]’/afs/cg.cs.tu-bs.de/home/eisemann/lib64/thrust/device_vector.h:92: instantiated from ‘thrust::device_vector<T, Alloc>::device_vector(const thrust::device_vector<T, Alloc>&) [with T = int, Alloc = thrust::device_malloc_allocator<int>]’/afs/cg.cs.tu-bs.de/home/Desktop/Testprograms/CUDA/Thrust/src/app/main.cpp:60: instantiated from here [Edited by - ApochPiQ on August 31, 2010 4:10:36 PM];  This isn't really related to CMake, but rather the particular compiler you are using. You will need to look up documentation specific to that compiler on how to suppress warnings, and apply that information to your exact situation.Also, please prefer [source] tags over [code] tags when posting longer snippets, and FYI the closing character is / not \ [wink]   ;  Whoops, ok. Thank you. I will try to dig deeper into my compiler.   